- 听众
- 收听
- 积分
- 3894
- 主题
- 回帖
- 0
- 精华
注册时间2008-4-22
最后登录1970-1-1
该用户从未签到
|
发表于 2010-5-25 00:34:57
|
显示全部楼层
本帖最后由 SiMen.K. 于 2010-5-25 00:36 编辑
- /* 欢迎光临赛盟极限跳跃网 Kz.SiMen.cn 本信息由 AMXX-Studio 自动生成 */
- //开启/关闭 控制台输入 amx_godmode "name"
- #include <amxmodx>
- #include <amxmisc>
- #include <fun>
- #define PLUGIN "godmode"
- #define VERSION "1.0"
- #define AUTHOR "nooby is Fool"
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_concmd("amx_godmode","amx_godmode",ADMIN_BAN,"<target>")
- }
- public amx_godmode(id,level,cid) {
- if (!cmd_access(id,level,cid,2))
- return PLUGIN_HANDLED
- new arg[32], admin_name[32], target_name[32]
- read_argv(1,arg,31)
- new player = cmd_target(id,arg,14)
- if (!player) return PLUGIN_HANDLED
- get_user_name(id,admin_name,31)
- get_user_name(player,target_name,31)
- if (!get_user_godmode(player)) {
- set_user_godmode(player,1)
- switch(get_cvar_num("amx_show_activity")) {
- case 2: client_print(0,print_chat,"ADMIN %s: enabled godmode on %s",admin_name,target_name)
- case 1: client_print(0,print_chat,"ADMIN: enabled godmode on %s",target_name)
- }
- } else {
- set_user_godmode(player)
- switch(get_cvar_num("amx_show_activity")) {
- case 2: client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
- case 1: client_print(0,print_chat,"ADMIN: disabled godmode on %s",target_name)
- }
- }
- return PLUGIN_HANDLED
- }
复制代码 |
|