CLEO Help to read player money on samp

CLEO related

Sathiel

Member
Joined
Nov 16, 2021
Messages
14
Reaction score
1
Location
Chile
Exists an opcode to make the script reads the player money on samp? and if the answer is yes, how to use? i want to make my script stops when the player money is lower than $10.000, if its possible this please comment the opcode and how it works below, want to learn​
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Exists an opcode to make the script reads the player money on samp? and if the answer is yes, how to use? i want to make my script stops when the player money is lower than $10.000, if its possible this please comment the opcode and how it works below, want to learn​
Good idea, " if i get time " i will make code for that.
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
0x0B7CE54 - ADDR_CPED_MONEY
PHP:
{$CLEO .cs}
0000:

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 00EC:   actor $PLAYER_ACTOR sphere 0 near_point 1444.70 -1010.80 radius 1.0 1.0
    THEN
        0@ = 0x0B7CE54
        0A8D: 0@ = read_memory 0@ size 4 virtual_protect 1
        0AC8: 1@ = allocate_memory_size 1024
        0AD3: 1@ = format "/wplac %d" 0@
        0AB1: @SEND_CMD 2 SampVersionID 3 Text 1@
        WAIT 30000   
    END
END

END
0A93: terminate_this_custom_script
 

Sathiel

Member
Joined
Nov 16, 2021
Messages
14
Reaction score
1
Location
Chile
0x0B7CE54 - ADDR_CPED_MONEY
PHP:
{$CLEO .cs}
0000:

WHILE TRUE
WAIT 0

IF 0256:   player $PLAYER_CHAR defined
THEN
    IF 00EC:   actor $PLAYER_ACTOR sphere 0 near_point 1444.70 -1010.80 radius 1.0 1.0
    THEN
        0@ = 0x0B7CE54
        0A8D: 0@ = read_memory 0@ size 4 virtual_protect 1
        0AC8: 1@ = allocate_memory_size 1024
        0AD3: 1@ = format "/wplac %d" 0@
        0AB1: @SEND_CMD 2 SampVersionID 3 Text 1@
        WAIT 30000  
    END
END

END
0A93: terminate_this_custom_script
i will try this now, thanks!
 
Top