Jump to content

[CLEO] [SNIPPET] GetSAMPPlayerRGBAColor


Tupi
 Share

Recommended Posts

Snippet:

:GetSAMPPlayerRGBAColor 
{
	0AB1: @GetSAMPPlayerRGBAColor 1 FromPlayer 0@ StoreRGBAColorTo 31@
}
if 0AA2: 31@ = load_library "samp.dll"
then
    31@ += 0x216378
    0@ *= 4
    005A: 31@ += 0@
    0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
end
ret 1 31@

 

Exemple:

{$CLEO}

0000:
repeat
wait 50
until 0AFA:

0B34: "command" @command

WHILE TRUE
WAIT 0
END

:command
SAMP.IsCommandTyped(0@)
if 0AD4: 33@ = scan_string 0@ format "%d" 1@
then
       if SAMP.IsPlayerConnected(1@)
       then
              0AB1: @GetSAMPPlayerRGBAColor 1 FromPlayer 1@ StoreRGBAColorTo 2@
              chatmsg "PlayerID: %d | PlayerColor: %x" -1 1@ 2@
        else chatmsg "Player is offline!" -1
        end
else chatmsg "Use: /command <playerID>" -1
end
SAMP.CmdRet

 

Explicația:

Snippet-ul se foloseste de o anumita adresa pe care o scrie in memorie pentru a putea afla culoarea jucatorului respectiv.

Acest snippet poate fi folosit intr-o multitudine de situații, când vrem să aflăm care este codul de culoarea a unui anumit jucator pentru a putea ulterior sa ne folosim de el, etc.

Link to comment
Share on other sites

  • Tupi locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.