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了 经测试 可用
|