|
发表于 2007-6-25 12:47:29
|
显示全部楼层
|阅读模式
来自 中国–云南–大理白族自治州
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
public plugin_init()
{
register_plugin("OP特权插件", "1.0", "猫猫")
register_logevent("SetHeal",2,"0=World triggered","1=Round_Start")
register_cvar("OPSetAP","100")
register_cvar("OPSetHP","125")
register_cvar("OPFootsteps","0")
register_cvar("OPGodMode","0")
register_cvar("OPNoclip","0")
register_cvar("OPRed","1")
register_cvar("OPGetWeapon","1")
register_cvar("OPNoFire","0")
}
public SetHeal()
{
new playerscount = get_playersnum()
new i
new isadmin
new whatteam
for (i = 1; i <= playerscount; i++)
{
isadmin = is_user_admin(i)
if (isadmin)
{
new playername[32]
get_user_name(i,playername,31)
if (get_cvar_num("OPNoFire")>=0)
{
set_user_hitzones(i,0,0)
strip_user_weapons(i)
}
if(get_cvar_num("OPSetHP") >= 0)
{
set_user_health(i,get_cvar_num("OPSetHP"))
}
if(get_cvar_num("OPSetAP") >= 0)
{
set_user_armor(i,get_cvar_num("OPSetAP"))
}
if(get_cvar_num("OPFootSteps") != 0)
{
set_user_footsteps(i,1)
}
if(get_cvar_num("OPGodMode") != 0)
{
set_user_godmode(i,1)
}
if(get_cvar_num("OPNoclip") != 0)
{
set_user_noclip(i,1)
}
if(get_cvar_num("OPRed") != 0)
{
set_user_rendering(i,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
}
if(get_cvar_num("OPGetWeapon") !=0)
{
whatteam = get_user_team(i)
if (whatteam == 1)
{
give_item(i,"weapon_ak47")
}
else
{
give_item(i,"weapon_m4a1")
}
}
set_hudmessage(0, 255, 0, 0.10, 0.80, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0,"OP %s 已经进入游戏.",playername)
}
}
}
所有功能都正常,怎么register_cvar("OPNoFire","0")这里无论改1或者0,OP都不可以打人。
我想达到OP和正常玩家一样可以攻击人.谢谢帮助一下 |
|