Help how to get nickname W/O sampfuncs

SamThapa

Active member
Joined
Jan 22, 2018
Messages
68
Reaction score
1
i saw thread @springfield gave this line below but i have no clue how it will get nick name no struct no specific player handle or ID how it will show players nickname?
i need script



:nickname
if 0AA2: 0@ = loadLib "samp.dll" //samp base offset
then 0@ += 0x212A80
0A8D: 0@ = readmem 0@ sz 4 vp 0 //stInfo
000A: 0@ + 0x3D9
0A8D: 0@ = readmem 0@ sz 4 vp 0 //stPools
000A: 0@ + 0x14
0A8D: 0@ = readmem 0@ sz 4 vp 0 //stPlayerPools
000A: 0@ + 0x0A //szLocalPlayerName
end
ret 1 0@


example:
:Get
0006: 1@ = 0
0A8D: 14@ = 0xB74490 size 4 vp 0
000A: 14@ + 4
0A8D: 14@ = 14@ size 4 vp 0
for 15@ = 0x0 to 0x8B00 step 0x100
0A8D: 16@ = 14@ size 1 vp 0
000A: 14@ + 1
if and
0029: 16@ > 0x0
001B: 0x80 > 16@
jf continue
005A: 16@ + 15@ //(int)
if 056D: ped 16@ defined
jf continue
if and
8118: ped 16@ dead
02CB: actor 16@ bounding_sphere_visible
jf continue
call @nickname 1 16@ _returnnickname here 30@
end
ret 0

:nickname
if 0AA2: 0@ = loadLib "samp.dll" //samp base offset
then 0@ += 0x212A80
0A8D: 0@ = readmem 0@ sz 4 vp 0 //stInfo
000A: 0@ + 0x3D9
0A8D: 0@ = readmem 0@ sz 4 vp 0 //stPools
000A: 0@ + 0x14
0A8D: 0@ = readmem 0@ sz 4 vp 0 //stPlayerPools
000A: 0@ + 0x0A //szLocalPlayerName
end
ret 1 0@
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
646
Reaction score
48
By parazitas:
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,293
Solutions
6
Reaction score
929
Location
Lithuania
Hello,

Your question should be more specific..
You didn't provide who's nick name you need.

It can be yours or other players...
 

SamThapa

Active member
Joined
Jan 22, 2018
Messages
68
Reaction score
1
:O yea
and why you asking specific :) i think its same if i want single player or many. is there any different script to make ? for single player or many ?
 

SamThapa

Active member
Joined
Jan 22, 2018
Messages
68
Reaction score
1
lets say this
0AD2: 0@ = Player $Player_Char Targeted_Ped
you get actor by aiming then get nickname and yea another thing if i damage that guy i get his remaining health only if i damage him because ill write in text file how much damage i did which weapon it was ill do rest script you just give 2 things

1: aiming then i get player name
2: i damage then it should show remaining health
rest ill do my self
thanks
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,293
Solutions
6
Reaction score
929
Location
Lithuania
lets say this
0AD2: 0@ = Player $Player_Char Targeted_Ped
you get actor by aiming then get nickname and yea another thing if i damage that guy i get his remaining health only if i damage him because ill write in text file how much damage i did which weapon it was ill do rest script you just give 2 things

1: aiming then i get player name
2: i damage then it should show remaining health
rest ill do my self
thanks
Since finally everything is clear i will provide necessary snippets once get free time.

By the way for which samp version you look snippets
 
Last edited:

SamThapa

Active member
Joined
Jan 22, 2018
Messages
68
Reaction score
1
how to get player ID from player handle ?
as this opcode does
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR

but i want without sampfunc
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,293
Solutions
6
Reaction score
929
Location
Lithuania
how to get player ID from player handle ?
as this opcode does
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR

but i want without sampfunc

 
Last edited:
Top