CLEO Help 0B37: samp 3@ = get_player_color 2@

CLEO related
Status
Not open for further replies.

Kelsi235

Active member
Joined
Jun 2, 2019
Messages
53
Reaction score
4
0B37: samp 3@ = get_player_color 2@

Never returns correct value?
 

Kelsi235

Active member
Joined
Jun 2, 2019
Messages
53
Reaction score
4
{$CLEO .cs}
0000: NOP
var
3@ : integer
end

:MAIN
wait 0
if and
056D: actor $PLAYER_ACTOR defined
key_down 45
jf @MAIN
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
056D: actor 1@ defined
jf @WOW
2@ = SAMP.GetSAMPPlayerIDByActorHandle(1@)
0B37: samp 3@ = get_player_color 2@
0AD3: 0@v = format "color = %d" 3@
0AF8: samp add_message_to_chat 0@v 3407871
jump @WOW

:WOW
wait 400
goto @MAIN
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Color format is - %x
PHP:
{$CLEO .cs}

0000:
  
WAIT 10000 
 
 
WHILE TRUE
    WAIT 0   
IF
056D:   actor $PLAYER_ACTOR defined 
THEN
    WAIT 0 
    // GET ALL STREAMED PEDS     
    0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
    000A: 29@ += 0x4
    0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
    FOR 30@ = 0 to 35584 step 0x100
        0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
        000A: 29@ += 0x1
        IF AND
            0029:  31@ >= 0x00 
            001B:  0x80 > 31@
        THEN 
            005A: 31@ += 30@
                IF AND
                803B:   31@ == $PLAYER_ACTOR  // (int)
                056D:   actor 31@ defined
                THEN
                    00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
                    00A0: store_actor 31@ position_to 4@ 5@ 6@
                    0509: 7@ = distance_between_XY 1@ 2@ and_XY 4@ 5@
                    IF
                    7@ <= 0.3 // (float) , if player distance smaller or equals 0.3 then....,, you can change any.
                    THEN
                        0B2B: samp 8@ = get_player_id_by_actor_handle 31@
                        0B37: samp 9@ = get_player_color 8@
                        0AD1: "%x" 1337 9@
                    END
               END 
           END
       END
   END
END
 

Kelsi235

Active member
Joined
Jun 2, 2019
Messages
53
Reaction score
4
0509: 7@ = distance_between_XY 1@ 2@ and_XY 4@ 5@

always returns absurdly large number (example : 315890531985)


if
7@ <= 0.8

bugs the game? (gets me tped to loading screen view (the marina part ) )
 
Last edited:

Kelsi235

Active member
Joined
Jun 2, 2019
Messages
53
Reaction score
4
ok i think i found out why the game crashes lmao
0AF8: samp add_message_to_chat crashes it

gonna remove it and try again
 
Status
Not open for further replies.
Top