Thread: [Suggestion / Subplugin Request] Checking if zombies has weapons and remove them
View Single Post
zXCaptainXz
Member
Join Date: May 2017
Old 01-12-2022 , 04:13   Re: Checking if zombies has weapons and remove them
Reply With Quote #4

i'm not really sure what's going on, if you're saying that zombies are picking up weapons from the ground, then ZP43 should prevent them by default, so in-case you modified something there, add this plugin and it should prevent zombies from picking weapons up

Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

public plugin_init()
{
	register_plugin("[ZP] Prevent Zombie Weapon","1.0","ZP Team")
	RegisterHam(Ham_Touch, "weaponbox", "fw_TouchWeapon")
	RegisterHam(Ham_Touch, "armoury_entity", "fw_TouchWeapon")
	RegisterHam(Ham_Touch, "weapon_shield", "fw_TouchWeapon")
}

// Ham Weapon Touch Forward
public fw_TouchWeapon(weapon, id)
{
	// Not a player
	if (!is_user_connected(id))
		return HAM_IGNORED;
	
	// Dont pickup weapons if zombie or survivor (+PODBot MM fix)
	if (zp_get_user_zombie(id) || (zp_get_user_survivor(id) && !is_user_bot(id)))
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
zXCaptainXz is offline