BBB
Active member
- Joined
 - Apr 5, 2013
 
- Messages
 - 62
 
- Reaction score
 - 1
 
hi,
I'm trying to figure out how to take this sobeit function into my project
its 0.3x r1 but it doesnt matter because I just want to learn that
	
	
		
			
	
	
	
		
		
	
the function addressess are easy to find but I dont know how to deal with this "g_Players->pLocalPlayer" :bawww:
			
			I'm trying to figure out how to take this sobeit function into my project
its 0.3x r1 but it doesnt matter because I just want to learn that
		Code:
	
	#define FUNC_SAY		0x4DD0
#define FUNC_SENDCMD	0x7AA50
void addSayToChatWindow ( char *msg )
{
	if ( g_SAMP == NULL )
		return;
	if ( msg == NULL )
		return;
	if ( isBadPtr_readAny(msg, 128) )
		return;
	traceLastFunc( "addSayToChatWindow()" );
	if ( msg[0] == '/' )
	{
		uint32_t	func = g_dwSAMP_Addr + FUNC_SENDCMD;
		__asm push msg
		__asm call func
	}
	else
	{
		uint32_t	func = g_dwSAMP_Addr + FUNC_SAY;
		void		*lpPtr = g_Players->pLocalPlayer;
		__asm mov ebx, dword ptr[lpPtr]
		__asm push msg
		__asm call func
		__asm pop ebx
	}
}
	the function addressess are easy to find but I dont know how to deal with this "g_Players->pLocalPlayer" :bawww: