|
修改自start_hp插件 介入start_armor功能
看截图
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #include <fun>
- #define PLUGIN "Starting Health or Armor"
- #define VERSION "1.0"
- #define AUTHOR "mashihao"
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_event("HLTV", "NewRound", "a", "1=0", "2=0")
- register_event("TeamInfo","new_player","a","2=CT","2=TERRORIST")
- register_cvar("amx_starthp","100")
- register_cvar("amx_startar","100")
- }
- public new_player()
- {
- new id = read_data(1)
-
- if(is_user_connected(id) && is_user_alive(id))
- set_user_health(id,get_cvar_num("amx_starthp"))
- set_user_armor(id,get_cvar_num("amx_startar"))
- }
- public NewRound()
- set_task(0.1,"set_health")
- set_task(0.1,"set_armor")
- public set_health()
- for(new i = 0; i <= get_playersnum(); ++i)
- if(is_user_connected(i) && is_user_alive(i))
- set_user_health(i,get_cvar_num("amx_starthp"))
- public set_armor()
- for(new l = 0; l <= get_playersnum(); ++l)
- if(is_user_connected(l) && is_user_alive(l))
- set_user_armor(l,get_cvar_num("amx_startar"))
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|