I know how to fix this, however I'd also like to know exactly why it happens? I can only assume it's some other kind of entity being spawned which is weird because the hook is for players only and post hook too. Explanation anyone?
This'll remove that error:
PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
public plugin_init()
{
register_plugin("VIPAdd", "1.0", "Plc0tad0")
RegisterHam(Ham_Spawn, "player", "HamPlayerSpawn", 1)
}
public HamPlayerSpawn(id)
{
if( !is_user_alive( id ) )
return HAM_IGNORED;
if(get_user_flags(id) & ADMIN_RESERVATION)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_m3")
give_item(id, "weapon_deagle")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
cs_set_user_bpammo(id, CSW_M3, 32)
set_user_health(id, 200)
set_user_armor(id, 200)
}
return HAM_IGNORED;
}
__________________