DORTEY Posted July 29, 2020 Share Posted July 29, 2020 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) Link to comment
Moderators IIYAMA Posted July 29, 2020 Moderators Share Posted July 29, 2020 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. Link to comment
DORTEY Posted July 29, 2020 Author Share Posted July 29, 2020 i can't use that clientside? Link to comment
Moderators Patrick Posted July 29, 2020 Moderators Share Posted July 29, 2020 3 minutes ago, DorteY said: i can't use that clientside? You can't, because not possible to cancel onClientVehicleStartExit. But you can cancel onVehicleStartExit, on server side. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now