Jump to content

What's wrong Lock


Gameraap

Recommended Posts

  • Discord Moderators
Posted
Whats wrong here?
function outcar ( )   
 theVehicle = getPedOccupiedVehicle ( source ) 
  if ( theVehicle ) then                                 
       if isVehicleLocked ( theVehicle ) then       
      setVehicleLocked ( theVehicle , false ) 
     outputChatBox ( "#C6FE0D[unlock] Your car has been unlocked",source, 255, 255, 255, true ) 
  else  
     outputChatBox ( "#C6FE0D[unlock] Failed Your car was already unlocked",source, 255, 255, 255, true )  
end 
end 
end 
addEventHandler ( "onPlayerVehicleExit", getRootElement(), outcar ) 

I don't understand the logic here, you check if a dude is in a vehicle on vehicle exit?

It's like checking if your pet is floating in your bathtub while you're holding it

Posted (edited)

I want check when you leave your car and the lock is of. than he say: outputChatBox ( "#C6FE0D[unlock] Failed Your car was already unlocked",source, 255, 255, 255, true ) but when the lock was on he say outputChatBox ( "#C6FE0D[unlock] Your car has been unlocked",source, 255, 255, 255, true )

Edited by Guest
Posted

Gameraap, why did you remove your earlier posts' contents? Please don't do that in the future. Somebody else may have the same issue in the future and wouldn't be able to search for 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...