Jump to content

[HELP]execute function when driving vehicle


Black2

Recommended Posts

Posted

Hello, I was wondering how I can do to run the Test2 function when in a specific car, let's say infernus whose ID is 411, when driving with the vehicle perform this function, instead of with the command,would be grateful for your help, thank you :)

If you have not understood very well,I made a script and it performs the function with the command, I want to convert it to work when you are inside the vehicle and driving,Thx again :)

addCommandHandler( "Test", Test2 ) 

Posted

All what you need

isPedInVehicle() -- To check if the player is currently in a vehicle. 
getPedOccupiedVehicle() -- Gets the vehicle that the player is currently in. 
getElementModel() -- Get the vehicle model ID 
getVehicleController() -- Get the controller (driver) of the vehicle 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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