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

Get player pointer


Post New Thread Reply   
 
Thread Tools Display Modes
S34Qu4K3
Veteran Member
Join Date: Jan 2010
Location: Galicia
Old 08-25-2011 , 18:47   Re: Get player pointer
Reply With Quote #11

Thank you
Een so, IŽll try to find why GET_PLAYER_POINTER_I didnŽt work
__________________

- ASM2SMA: Experimental AMXX Assembly encoder

- Defuse Bar Fix

Quote:
Originally Posted by Arkshine
I DON'T WANT TO SEE NOOOOOOOOOOOOOOO AHHHHH. MY EYES ARE ALREADY HURT.
S34Qu4K3 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-25-2011 , 19:00   Re: Get player pointer
Reply With Quote #12

Because it's something internal to amxmodx module which point on an array of CPlayer. :
Code:
#define GET_PLAYER_POINTER_I(i) (&g_players[i])
Code:
CPlayer g_players[33];
CPlayer beeing a specific structure in amxx module.


Such function is used to get the CPlayer pointer for the current player from the index passed, like MF_GetPlayerCurweapon, which does :

Code:
int MNF_GetPlayerCurweapon(int id)
{
	if (id < 1 || id > gpGlobals->maxClients)
		return 0;
	
	return GET_PLAYER_POINTER_I(id)->current;
}
__________________
Arkshine is offline
S34Qu4K3
Veteran Member
Join Date: Jan 2010
Location: Galicia
Old 08-25-2011 , 19:16   Re: Get player pointer
Reply With Quote #13

Thank you again Arkshine
All questions solved
__________________

- ASM2SMA: Experimental AMXX Assembly encoder

- Defuse Bar Fix

Quote:
Originally Posted by Arkshine
I DON'T WANT TO SEE NOOOOOOOOOOOOOOO AHHHHH. MY EYES ARE ALREADY HURT.
S34Qu4K3 is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-25-2011 , 21:40   Re: Get player pointer
Reply With Quote #14

int currentWeapon = MF_GetPlayerCurweapon( params[ 1 ] );
is ok
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Old 09-14-2011, 01:08
harrymac
This message has been deleted by Emp`. Reason: spam
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 11:53.


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