|
发表于 2013-4-27 11:16:00
|
显示全部楼层
来自 中国–广东–汕头
- #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[NEACNMF][]={
- "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[i])
- }
- 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)
- }
复制代码 试试试试试看 |
|