Raised This Month: $ Target: $400
 0% 

Ham_Item_Deploy


Post New Thread Reply   
 
Thread Tools Display Modes
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-29-2013 , 05:47   Re: Ham_Item_Deploy
Reply With Quote #11

Got an error in the logs:
[HAMSANDWICH] Entity out of range (-1)

How can it be fixed?
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-29-2013 , 06:19   Re: Ham_Item_Deploy
Reply With Quote #12

Start to show your code.
__________________
Arkshine is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-29-2013 , 06:22   Re: Ham_Item_Deploy
Reply With Quote #13

Code:
public heroon(id, menu, item) {     if(item == MENU_EXIT) {     menu_destroy(menu)     return PLUGIN_HANDLED }     static dst[32], data[5], access, callback     menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)     menu_destroy(menu)         switch(data[0]) <...> case('4'):     {     new money = get_user_frags(id)     set_user_frags(id,money+2)     set_user_armor(id,200)     set_user_health(id,200)     set_bit(g_PlayerSuperKnife, id)     if(IsValidPrivateData(id))     {     new pEntity = get_pdata_cbase(id, m_pActiveItem , OFFSET_LINUX)     ExecuteHamB(Ham_Item_Deploy, pEntity)     }     }
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-29-2013 , 06:51   Re: Ham_Item_Deploy
Reply With Quote #14

what is m_pActiveItem and OFFSET_LINUX value ?
__________________
Arkshine is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-29-2013 , 06:59   Re: Ham_Item_Deploy
Reply With Quote #15

Code:
new const m_pActiveItem = 373 new const OFFSET_LINUX = 5 #define IsValidPrivateData(%0)   (pev_valid(%0) == 2)
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-29-2013 , 07:15   Re: Ham_Item_Deploy
Reply With Quote #16

Then, the player has no active weapon (which would be weird, unless weapons are stripped at some point), something you should check too.
__________________

Last edited by Arkshine; 03-29-2013 at 07:17.
Arkshine is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-29-2013 , 07:18   Re: Ham_Item_Deploy
Reply With Quote #17

Yes, again.
Because I need to change view model of the knife again immediately sometimes.
And at this times player usually have only knife.
__________________
Sorry for my English, I'm Russian.

Last edited by Kard1nal; 03-29-2013 at 07:20.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
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 08:29.


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