On deploy of a weapon, I set this on the weapon after some conditions:
PHP Code:
new iWeapon = give_item(id, "weapon_deagle")
set_pev(iWeapon, pev_iuser1, 1)
This gets well called and remains always on the weapon. I debugged it already, all fine till here.
But in SetModel, if I drop the weapon, I check it like this:
PHP Code:
if(pev_valid(iEnt) && equal(szModel, "models/w_m249.mdl"))
Also fine, debugged it. But after the next check, it just always returns me false.
PHP Code:
if(pev(iEnt, pev_iuser1))
Somehow, instead of using pev_iuser1, I tried to use pev_owner, and that worked just fine. Has anyone got an idea?
EDIT: btw, If I pick the weapon up, and I hooked the deploy of it, pev_iuser1 returns me 1.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.