Raised This Month: $ Target: $400
 0% 

Getting pev_iuser* on FM_SetModel


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 04-19-2013 , 11:56   Getting pev_iuser* on FM_SetModel
Reply With Quote #1

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(iWeaponpev_iuser11
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(iEntpev_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.

Last edited by bibu; 04-19-2013 at 11:57.
bibu is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode