|
发表于 2012-7-29 19:01:41
|
显示全部楼层
来自 中国–江苏–苏州
本帖最后由 726691010 于 2012-7-29 19:02 编辑
不知道之前发的有没源码!所以附上源码如下,自行修改既可,我用手机发的,代码排版可能有点乱,不过问题应该不大,你对照你的那个源码把加权限的地方的句子复制粘贴在你那源码相对应的地方修改下权限既可!
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <float>
new jumpnum[33] = 0
new bool:dojump[33] = false
public plugin_init()
{
register_plugin("MultiJump","1.0","twistedeuphoria")
register_cvar("amx_maxjumps","1")
}
public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public client_disconnect(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public client_PreThink(id)
{
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if(!(get_user_flags(id) & ADMIN_IMMUNITY)) //修改这里为C权限
{
return PLUGIN_CONTINUE
}
if((nbut & IN_JUMP)&&!(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
{
dojump[id] = true
jumpnum[id]
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public client_PostThink(id)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY)) //修改这里为C权限
{
return PLUGIN_CONTINUE
}
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
} |
|