[SNIPPET] Get LocalPlayer Name

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
677
Likes
2
Points
18
Location
Lithuania
Website
ugbase.eu
#1
With this snippet we can get nick name.
Good luck...​



Explain with 0.3.7 .:
PHP:
{$CLEO .cs}
0000:

repeat
wait 0
until 0afa:

WHILE TRUE
wait 0

call @Get_LocalPlayer_Name 0 [email protected]
chatmsg "%s" -1 [email protected]

END 

:Get_LocalPlayer_Name
/// 0AB1: call_scm_func @Get_My_NickName 0 [email protected]
0AA2: [email protected] = loadLib "samp.dll" //samp base offset           
[email protected] += 0x21A0F8
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stInfo   
[email protected] += 0x3CD
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPools
[email protected] += 0x18
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPlayerPools
[email protected] += 0xA //szLocalPlayerName
0AB2: ret 1 [email protected]


Snippets.:


0.3.7
[shcode=cpp]
:Get_LocalPlayer_Name
/// 0AB1: call_scm_func @Get_LocalPlayer_Name 0 [email protected]
0AA2: [email protected] = loadLib "samp.dll" //samp base offset           
[email protected] += 0x21A0F8
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stInfo   
[email protected] += 0x3CD
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPools
[email protected] += 0x18
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPlayerPools
[email protected] += 0xA //szLocalPlayerName
0AB2: ret 1 [email protected]
[/shcode]

0.3.7-R2
[shcode=cpp]
:Get_LocalPlayer_Name
/// 0AB1: call_scm_func @Get_LocalPlayer_Name 0 [email protected]
0AA2: [email protected] = loadLib "samp.dll" //samp base offset           
[email protected] += 0x21A100
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stInfo   
[email protected] += 0x3C5
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPools
[email protected] += 0x8
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPlayerPools
[email protected] += 0x6 //szLocalPlayerName
0AB2: ret 1 [email protected]
[/shcode]


0.3.DL
[shcode=cpp]
:Get_LocalPlayer_Name
/// 0AB1: call_scm_func @Get_LocalPlayer_Name 0 [email protected]
0AA2: [email protected] = loadLib "samp.dll" //samp base offset           
[email protected] += 0x2ACA24
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stInfo   
[email protected] += 0x3DE
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPools
[email protected] += 0x8
0A8D: [email protected] = readmem [email protected] sz 4 vp 0 //stPlayerPools
[email protected] += 0x6 //szLocalPlayerName
0AB2: ret 1 [email protected]
[/shcode]

Memory source.:
https://github.com/SAMP-UDF/SAMP-UDF-for-AutoHotKey/blob/master/SAMP.ahk

P.S.
I tested only 0.3.7 , maybe you guys can test for others SA:MP versions?
@springfield
@monday
@supahdupahnubah
 
Top