qma
|
分享:
▲
▼
這個 難不倒我 我參考了老外的僵屍護甲插件 修改了下看好
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <zombieplague>
new cvar_armor_amount
public plugin_init() { register_plugin("[ZP] Addon: Spawn Armor", "0.2", "fl0wer") RegisterHam(Ham_Spawn, "player", "ZP_Human_Spawn_Give_Armor", 1) cvar_armor_amount = register_cvar("zp_human_spawn_armor_amount", "100") }
public ZP_Human_Spawn_Give_Armor(id) { if(!is_user_alive(id) || zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_survivor(id)) return HAM_IGNORED
if(pev(id, pev_armorvalue) >= get_pcvar_num(cvar_armor_amount)) return HAM_IGNORED
if(!zp_has_round_started()) set_pev(id, pev_armorvalue, get_pcvar_float(cvar_armor_amount)) else if(zp_has_round_started() && !is_user_alive(id)) set_pev(id, pev_armorvalue, get_pcvar_float(cvar_armor_amount)) return HAM_HANDLED }
把上面這些複制進 txt 文檔 再換成 SMA 格式 再去編譯就OK了 經測試 可用
|