Raised This Month: $ Target: $400
 0% 

Problem with Ham_Item_Deploy and _cl_autowepswitch 1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-15-2014 , 16:40   Re: Problem with Ham_Item_Deploy and _cl_autowepswitch 1
Reply With Quote #1

Quote:
set_pdata_float( ent, 46, 9999.0, 5 );

it should be 4 not 5, because 5 is diff for player entities. For weapon ents its +4.
__________________


Last edited by NiHiLaNTh; 11-15-2014 at 16:40.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Aydeev
Junior Member
Join Date: Oct 2014
Old 11-15-2014 , 20:26   Re: Problem with Ham_Item_Deploy and _cl_autowepswitch 1
Reply With Quote #2

What a stupid mistake to make... I was only looking at the get_pdata_cbase offset and completely forgot the other one

Thanks for your help
Aydeev is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 11-18-2014 , 12:32   Re: Problem with Ham_Item_Deploy and _cl_autowepswitch 1
Reply With Quote #3

Quote:
Originally Posted by Aydeev View Post
What a stupid mistake to make... I was only looking at the get_pdata_cbase offset and completely forgot the other one
you should use const for your offset, it avoid this kind of common error.
like
const XO_WEAPON = 4
const XO_PLAYER = 5

or more talkative

const EXTRA_OFFSET_WEAPON = 4
const EXTRA_OFFSET_PLAYER = 5

Even for offset. what the hell is 46. no one know...
Fr33m@n is offline
Reply



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 17:44.


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