|
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <fun>
- #define PLUGIN "Starting Health or Armor"
- #define VERSION "1.1"
- #define AUTHOR "mashihao"
- public plugin_init() {
- register_plugin("PLUGIN","VERSION","AUTHOR")
- register_event("ResetHUD", "new_round", "be")
- register_cvar("amx_start_hp","100")
- register_cvar("amx_start_ar","0")
- return PLUGIN_CONTINUE
- }
- public new_round(id) {
- {
- set_user_health(id,get_cvar_num("amx_start_hp"))
- if (get_cvar_num("amx_start_ar")==2)
- {
- give_item(id,"item_kevlar")
- }
- if (get_cvar_num("amx_start_ar")==1)
- {
- give_item(id,"item_assaultsuit")
- }
- return PLUGIN_CONTINUE
- }
- }
复制代码 这样 只要amx_start_ar设为1或2,即开局给护甲,开局时就会退出 |
|