Quote:
Originally Posted by ConnorMcLeod
I think backpackammo is given when you pickup an armoury_entity but no number is stored into the armoury, whatever the map, when you pickup up an m3, same amount of clip and ammo are given.
Don't remove entities, set pev_effect to EF_NODRAW (that's what's happening when you pickup the weapon).
|
Thank you very much!
I tested the code is successful:
PHP Code:
public Ham_Touch_entity_Pre(ent,id)
{
if (id < 1 || id > max_player || (!is_user_alive(id)) || ent <= max_player || (!pev_valid(ent)))
return HAM_IGNORED;
if (pev(ent,pev_effects) == EF_NODRAW) return HAM_IGNORED;
new wid = cs_get_armoury_type(ent);
//Give player weapon...
set_pev(ent,pev_effects,EF_NODRAW);
return HAM_SUPERCEDE;
}