Jump to content

What's wrong Lock


Gameraap

Recommended Posts

Posted

you failed while adding event handler, you put OnPlayerVehicleEnter and must be onPlayerVehicleEnter.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

https://wiki.multitheftauto.com/wiki/OnPlayerVehicleExit

check 1st argument, and use it, instead of getting ped occupied veh.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

  • 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

I Hate when i have to quite myself again, because some ignorant is ignoring my answer to his problems...

https://wiki.multitheftauto.com/wiki/OnPlayerVehicleExit

check 1st argument, and use it, instead of getting ped occupied veh.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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...