Raised This Month: $51 Target: $400
 12% 

ItemInfoArray


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-19-2015 , 05:34   ItemInfoArray
Reply With Quote #1

Is there I way to acces ItemInfoArray global variable ? I think it is, but I don't know how. What I want to do is to access some values like:
Code:
	int		iSlot;
	int		iPosition;
	const char	*pszAmmo1;	// ammo 1 type
	int		iMaxAmmo1;		// max ammo 1
	const char	*pszAmmo2;	// ammo 2 type
	int		iMaxAmmo2;		// max ammo 2
	const char	*pszName;
	int		iMaxClip;
	int		iId;
	int		iFlags;
	int		iWeight;// this value used to determine this weapon's importance in autoselection.
__________________

Last edited by HamletEagle; 08-19-2015 at 06:06.
HamletEagle is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-19-2015 , 06:44   Re: ItemInfoArray
Reply With Quote #2

Ham_Item_GetItemInfo
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-19-2015 , 07:47   Re: ItemInfoArray
Reply With Quote #3

Quote:
Originally Posted by NiHiLaNTh View Post
Ham_Item_GetItemInfo
Which is from 1.8.3. Basically, I need a way for amxmodx 1.8.2. I'm pretty sure this can be done by making a signature, but I'm not sure how to do it, since I did only signatures for functions.
__________________
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2015 , 07:55   Re: ItemInfoArray
Reply With Quote #4

GetItemInfo is a virtual function, you don't need signatures. I think there are some tutorial for Orpheu about it.
__________________

Last edited by Arkshine; 08-19-2015 at 07:56.
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-19-2015 , 08:09   Re: ItemInfoArray
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
GetItemInfo is a virtual function, you don't need signatures. I think there are some tutorial for Orpheu about it.
Yes, I'm using already GetItemInfo, but I would like to know if we can directly access the global array(without using a function that return it). Or a more general question, is possible to alter any global variabile directly ?
__________________

Last edited by HamletEagle; 08-19-2015 at 08:25.
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2015 , 08:56   Re: ItemInfoArray
Reply With Quote #6

It's a global variables, so just find its address, and alter what you want.
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-19-2015 , 09:24   Re: ItemInfoArray
Reply With Quote #7

Your tutorial about signatures does not cover variables. Is the same technique ?
__________________
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2015 , 09:55   Re: ItemInfoArray
Reply With Quote #8

A signature is a signature, it doesn't matter what you want to match.
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-19-2015 , 12:33   Re: ItemInfoArray
Reply With Quote #9

I can't manage to get it's signature in windows. What I did was to open the names windows in ida, and search for the array. For linux I found _ZN15CBasePlayerItem13ItemInfoArrayE. I also located the windows one in the list but I have no fucking ideea from where to get the signature, because its' not a function. Can you give some hints ?
__________________

Last edited by HamletEagle; 08-19-2015 at 12:53.
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2015 , 12:38   Re: ItemInfoArray
Reply With Quote #10

For windows, you usually need to find a function where it's used, preferably used at the top, then you get the function address and add n bytes as displacement where the global variable address is located.
__________________
Arkshine 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 23:44.


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