CLEO Help Car health warning

CLEO related
Status
Not open for further replies.

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
Hi! I've made this car warning kind of thing for taxi drivers. Once it is lower than 500, it will put a warning in chat (chatmsg "warning" -1) however when i get in the car, i get lots of errors in chat then crash. May someone help?
Code:
// repair warning
    IF AND
    25@ == 1
    0602:   actor $PLAYER_ACTOR driving_taxi
    THEN
        00D9: 21@ = actor $PLAYER_ACTOR car
        // Health < 500
        IF 0185:   car 21@ health < 500.0
        THEN
            chatmsg "{ffff00}[TaxiCMD]: {cecece}Car health: %f. Please repair!" -1
            25@ = 0
        END
        
        // Tire deflated
        IF OR
        0496:   tire 1 on_car 21@ deflated
        0496:   tire 2 on_car 21@ deflated
        0496:   tire 3 on_car 21@ deflated
        0496:   tire 4 on_car 21@ deflated
        THEN
            chatmsg "{ffff00}[TaxiCMD]: {cecece}Wheel deflated. Please repair!" -1
            25@ = 0
        END

    END
25@ = anti spam so it doesnt spam the warning in chat
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Ok
PHP:
// repair warning
    IF AND
    25@ == 1
    0602:   actor $PLAYER_ACTOR driving_taxi
    THEN
        03C0: 21@ = actor $PLAYER_ACTOR car
        0227: 22@ = car 21@ health
        // Health < 500
        IF 22@ < 500 
        THEN
            chatmsg "{ffff00}[TaxiCMD]: {cecece}Car health: %f. Please repair!" -1
            25@ = 0
        END
        
        // Tire deflated
        IF OR
        0496:   tire 1 on_car 21@ deflated
        0496:   tire 2 on_car 21@ deflated
        0496:   tire 3 on_car 21@ deflated
        0496:   tire 4 on_car 21@ deflated
        THEN
            chatmsg "{ffff00}[TaxiCMD]: {cecece}Wheel deflated. Please repair!" -1
            25@ = 0
        END
    END
 
Last edited:
Status
Not open for further replies.
Top