Jump to content

Need a little help


dalexoxo

Recommended Posts

Posted

Hey there,

i'm creating a vehicle exit system if my seatbelt state=true i can go out, but idk why, who can help me?

 

Code:

addEventHandler("onClientVehicleStartExit",root,function(tPlayer)
    outputChatBox("1")
    if(tPlayer==localPlayer)then
        if(getElementType(localPlayer)=="player" and getElementData(localPlayer,"seatbelt")==true)then
            outputChatBox("2")
            cancelEvent()
            outputChatBox("3")
        end
    end
end)

  • Moderators
Posted
2 minutes ago, DorteY said:

i'm creating a vehicle exit system if my seatbelt state=true i can go out, but idk why, who can help me?

You can only cancel the server variant.
onClientVehicleStartExit

If the wiki doesn't indicates that it can be cancelled, then you can't cancel it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...