首先大家打开zp_extra_zombie_bomb.sma
看到一堆的sound 和 模组
在往下点会看到
复制程式
new const g_szItemName[] = "狂暴手榴弹" new const g_iItemPrice = 1
我们先把他del掉
然后把下边的
复制程式
和
复制程式
g_iNadeID = zp_register_extra_item (g_szItemName, g_iItemPrice, ZP_TEAM_ZOMBIE)
也del掉
接着搜寻public zp_extra_item_selected(id, Item)
复制程式
public zp_extra_item_selected(id, Item)
{
if (Item == g_iNadeID)
{
if (g_iJumpingNadeCount[id] >= 5)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + g_iItemPrice)
client_print(id, print_chat, "[ZP] 你不能取得更多 狂暴手榴弹 !")
return PLUGIN_HANDLED;
}
give_zp_item(id)
}
return PLUGIN_CONTINUE
}
give_zp_item(id)
{
if (!zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return;
new iBpAmmo = cs_get_user_bpammo(id, CSW_SMOKEGRENADE)
if (g_iJumpingNadeCount[id] >= 1)
{
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, iBpAmmo+1)
emit_sound(id, CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
AmmoPickup(id,13,1)
g_iJumpingNadeCount[id]++
}
else
{
give_item(id,"weapon_smokegrenade")
emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
AmmoPickup(id, 13, 1)
g_iJumpingNadeCount[id] = 1
}
}
把这些也del去了
搜寻if (g_iJumpingNadeCount[id] == 0)
复制程式
if (g_iJumpingNadeCount[id] == 0)
{
if (g_bot_use[id]) g_bot_use[id] = false
new ammo = zp_get_user_ammo_packs(id)
new bot_buy = random_num(1, 50)
if (bot_buy == 1 || bot_buy == 2 && ammo > g_iItemPrice + 3)
{
give_zp_item(id)
zp_set_user_ammo_packs(id, ammo - g_iItemPrice)
}
else return FMRES_IGNORED;
}]
del掉这些
就完成了 你不会看到在m选单可以买狂暴手榴弹了