CLEO Help [LOCK] SAMP car door status [LOCK]

CLEO related
Status
Not open for further replies.

Grubitsh

Active member
Joined
Jul 28, 2014
Messages
104
Reaction score
0
Hi,

Could someone give me the opcode(s) to know the door status (lock/unlock) of a SAMP vehicule ?

Thanks
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
Re: SAMP car door status

[member=23473]Grubitsh[/member] no sa-mp exclusive opcode, but you can use 09B3 and fetch the value to it.

Code:
{$CLEO}

thread "status"

repeat
wait 0
until SAMP.Available()

cmd "st" @st

while true
wait 0
end

:st
wait 0
0B35: 0@
        if
            0AD4: 1@ = 0@ "%d" 2@
        then
            if
                0AFF: samp 3@ = car_handle_by_samp_vehicle_id 2@
            then
                09B3: get_car 3@ door_status 4@
                if
                    4@ == 0
                then
                    chatmsg "Vehicle ID: %d is unlocked." 0x008000 2@
                else
                if
                    4@ == 1
                then
                    chatmsg "Vehicle ID: %d is locked." 0xFF0000 2@
                end
                end
            else
                chatmsg "Invalid vehicle ID or the vehicle is not streamed." 0x728000     
            end
        else
            chatmsg "USAGE: /st [ID], use /dl to find vehicle IDs." 0x801A00    
        end
cmdret
 
Status
Not open for further replies.
Top