|
发表于 2006-12-6 14:49:53
|
显示全部楼层
来自 中国–北京–北京–海淀区
回复: 请问没有没修改frag的插件???
- #include <amxmodx>
- #include <amxmisc>
- #include <fun>
- #define PLUGIN "SetUserFrag"
- #define VERSION "1.0"
- #define AUTHOR "Jim"
- #define FRAG_MIN -999
- #define FRAG_MAX 999
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd("amx_setfrag","set_frag",ADMIN_BAN,"<target><amount>")
- }
- public set_frag(id,level,cid) {
- if(!cmd_access(id,level,cid,3))
- return PLUGIN_HANDLED
- new argv1[32],player
- read_argv(1,argv1,31)
- player = cmd_target(id,argv1,0)
- if(!player)
- return PLUGIN_HANDLED
- new argv2[5],frags
- read_argv(2,argv2,4)
- frags = str_to_num(argv2)
- frags = clamp(frags, FRAG_MIN, FRAG_MAX)
- set_user_frags(player,frags)
- return PLUGIN_HANDLED
- }
复制代码 未测试,最小-999,最大999 |
|