Thank you, this is how I fixed this
At the end of every round, I added
pf_check_weapon_life()
If anyone know any better way, I would like to hear it.
PHP Code:
public zp_fw_gamemodes_end() // Round just ended.
{
pf_check_weapon_life();
}
stock pf_check_weapon_life()
{
new i;
for(i = 1; i <= g_maxplayers; i++)
{
if(is_user_alive(i))
{
pf_check_user_inventory(i);
}
}
}
stock pf_check_user_inventory(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num)
for (new i = 0; i < num; i++)
{
if (weapons[i] > 0)
{
new iEnt = pf_find_weapon_ent_id(id, weapons[i]);
new iEntLife = entity_get_int(iEnt, ENT_INDENT_LIFE);
switch(iEntLife)
{
case ENT_KEY_LIFE_ONEROUND:
{
fm_strip_user_gun(id, weapons[i]);
}
}
}
}
}
stock pf_find_weapon_ent_id(id, CSW_ID)
{
static ent, szClassname[24]; ent = -1;
get_weaponname(CSW_ID, szClassname, charsmax(szClassname));
while ((ent = find_ent_by_class(ent, szClassname)) > 0 && entity_get_edict(ent, EV_ENT_owner) != id) { }
return (ent > 0 && entity_get_edict(ent, EV_ENT_owner) == id) ? ent:0;
}