- 听众
- 收听
- 积分
- 3894
- 主题
- 回帖
- 0
- 精华
注册时间2008-4-22
最后登录1970-1-1
该用户从未签到
|
发表于 2011-9-8 22:20:35
|
显示全部楼层
- #include <amxmodx>
- #include <amxmisc>
- #include <engine>
- new view[32]
- public plugin_precache()
- precache_model("models/rpgrocket.mdl")
- public plugin_init() {
- register_plugin("Change View","v1.0","OneEyed")
- register_concmd("amx_view","changeView",ACCESS_TYPE,"Cycles through 4 different view types.")
- }
- public client_disconnect(id)
- view[id] = 1
- public client_connect(id)
- view[id] = 1
- public changeView(id,level,cid) {
- if ( !cmd_access(id,level,cid,0) )
- return PLUGIN_HANDLED
- new viewtype[32]
- if(view[id] > 3)
- view[id] = 0
- switch(view[id])
- {
- case 0: format(viewtype,31,"Normal")
- case 1: format(viewtype,31,"3rd Person")
- case 2: format(viewtype,31,"3rd Person (Up Left)")
- case 3: format(viewtype,31,"3rd Person (Top Down)")
- }
- client_print(id,print_chat,"Changing View to %s",viewtype)
- set_view(id, view[id])
- view[id]++
- return PLUGIN_HANDLED
- }
复制代码 bind f6 amx_view
|
|