有大神能再里面加个权限么。。。加个权限就好了。。
本帖最后由 winnie7t 于 2013-4-26 12:13 编辑这个虽然是用在DOD上面的,但是应该都差不多,大神加个A权限就好。。#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <dodx>
#include <dodfun>
#include <fakemeta>
#define PLUGIN"HuanZhuang"
#define VERSION "1.0.0"
#define AUTHOR"NeaCN.COM"
#define NEACNMF 4
#define NEACNNF 17
new szMFL[]={
"models/player/neacn-china/neacn-china.mdl",
"models/player/neacn-china/neacn-chinaT.mdl",
"models/player/neacn-japan/neacn-japan.mdl",
"models/player/neacn-japan/neacn-japanT.mdl"
}
new pCVAR_HZ
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD","neacn_respawn","be")
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
register_forward(FM_SetModel, "fw_SetModel")
}
public plugin_precache()
{
pCVAR_HZ = register_cvar("NeaCN_HZ", "1")
if (get_pcvar_num(pCVAR_HZ))
{
for (new i=0; i<NEACNMF; i++)
precache_model(szMFL)
}
return PLUGIN_CONTINUE
}
public neacn_respawn(id)
{
neacn_doHz(id)
return PLUGIN_HANDLED
}
public neacn_doHz(player)
{
if(AXIS==get_user_team(player))
{
dod_set_model(player, "neacn-japan")
}
if(ALLIES==get_user_team(player))
{
dod_set_model(player, "neacn-china")
}
return PLUGIN_HANDLED
}
public dod_client_changeteam(id, team, oldteam)
{
neacn_doHz(id)
}
ADMIN_IMMUNITY 就是A权限吧。。 本帖最后由 winnie7t 于 2013-4-26 12:14 编辑
385897365 发表于 2013-4-26 00:46 static/image/common/back.gif
27. if (is_user_alive(id) && (get_user_flags(id)&ADMIN_IMMUNITY))
这句就是了
...我发错了,,这是我自己添加进去的。。。但是编译不出来,,这个原本是没有权限的,,,,
我把没有权限的改好了。。大神再看一下啊,,,应该怎么加才对啊。。。 385897365 发表于 2013-4-27 01:53 static/image/common/back.gif
试试这个看看
Plugin file open error <plugins "huanzhang.amxx">
和我自己添加权限显示的一样的错误。。 #include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <dodx>
#include <dodfun>
#include <fakemeta>
#define PLUGIN"HuanZhuang"
#define VERSION "1.0.0"
#define AUTHOR"NeaCN.COM"
#define NEACNMF 4
#define NEACNNF 17
new szMFL[]={
"models/player/neacn-china/neacn-china.mdl",
"models/player/neacn-china/neacn-chinaT.mdl",
"models/player/neacn-japan/neacn-japan.mdl",
"models/player/neacn-japan/neacn-japanT.mdl"
}
new pCVAR_HZ
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD","neacn_respawn","be")
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
register_forward(FM_SetModel, "fw_SetModel")
}
public plugin_precache()
{
pCVAR_HZ = register_cvar("NeaCN_HZ", "1")
if (get_pcvar_num(pCVAR_HZ))
{
for (new i=0; i<NEACNMF; i++)
precache_model(szMFL)
}
return PLUGIN_CONTINUE
}
public neacn_respawn(id)
{
neacn_doHz(id)
return PLUGIN_HANDLED
}
public neacn_doHz(player)
{
if (!(get_user_flags(player)&ADMIN_IMMUNITY))
{
return PLUGIN_HANDLED
}
if(AXIS==get_user_team(player))
{
dod_set_model(player, "neacn-japan")
}
if(ALLIES==get_user_team(player))
{
dod_set_model(player, "neacn-china")
}
return PLUGIN_HANDLED
}
public dod_client_changeteam(id, team, oldteam)
{
neacn_doHz(id)
}试试试试试看 dong520 发表于 2013-4-27 11:16 static/image/common/back.gif
试试试试试看
unknown unknownunknown huanzhang.amxx bad load
不知道哪里出问题了。挺郁闷
页:
[1]
2