CLEO Help Can anyone fix my code?

CLEO related
Status
Not open for further replies.

Juanbustillos

Active member
Joined
Mar 29, 2014
Messages
29
Reaction score
4
Location
Ecuador
Code:
{$CLEO .cs}
0000:

repeat
    wait 40
until SAMP.Available()

0B6D: 0@ = "Arial" 10 5

WHILE TRUE
WAIT 0
    alloc 17@ 260
    FOR 18@ = 0 to 1000
        IF 0B51: samp 19@ = get_pickup_handle 18@
        THEN
        20@++
        END
    END
    format 17@ "StreamedPickups: %d" 20@
    Render.DrawText(0@, 17@, 45, 220, -1)
    free 17@
    20@ = 0
    
    IF key_down 20
    THEN IF Actor.Driving($PLAYER_ACTOR)
        THEN
        1@ = Actor.CurrentCar($PLAYER_ACTOR)
        07D5: set_car 1@ velocity 0.0 0.0 0.2 rot 0.0 0.0 unk 0.0
        wait 200 //This wait is necessary to avoid get bugged but blinks my render
        END
    END
END
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
    IF AND
        32@ > 200
        key_down 20
    THEN IF Actor.Driving($PLAYER_ACTOR)
        THEN
        1@ = Actor.CurrentCar($PLAYER_ACTOR)
        07D5: set_car 1@ velocity 0.0 0.0 0.2 rot 0.0 0.0 unk 0.0
        32@ = 0
        END
    END

Assuming you need that wait to not accidentally spam the key. Alternatively, you can create another thread with 0C6A, and have one thread for drawing and another one for car stuffs.
 
Status
Not open for further replies.
Top