[Server] Vehicle.GetEngineState
[Server] Vehicle.Engine = bool;
would be good
I think someone already made a KillEngine and a StartEngine function. Search the forum to get it. And about GetEngineState, it's pretty easy to do though.
hmm ill try making it my self then
done engine off script.
if ( player.Vehicle ) {
player.Vehicle.SetHandlingData(13,0)
//player.Vehicle.Pos = player.Pos;
player.Vehicle.Speed = Vector(0,0,0)
MessagePlayer("[#00ff00]You turned off vehicle engine",player)
}
after that , u need use player.Vehicle.SetHandlingData(13,150) to launch engine again.
And for your other things, here's your script :p
Moved to pastebin for easier reading and syntax highlighting: http://pastebin.com/VznhwQrR
Untested code though.
@KAKAN, If I remember correctly, we can't add new member vars to the Player, Vehicle classes etc which come from the squirrel plugin.:edit: Oh, just tested it works now!
Quote from: Kewun on Aug 09, 2016, 12:58 PMdone engine off script.
if ( player.Vehicle ) {
player.Vehicle.SetHandlingData(13,0)
//player.Vehicle.Pos = player.Pos;
player.Vehicle.Speed = Vector(0,0,0)
MessagePlayer("[#00ff00]You turned off vehicle engine",player)
}
after that , u need use player.Vehicle.SetHandlingData(13,150) to launch engine again.
Each vehicle has its value MaxSpeed, i suggest you use:
player.Vehicle.ResetHandlingData( 13 ) to launch engine again. This works only for cars and bikes.
Quote from: Doom_Kill3R on Aug 09, 2016, 01:40 PM@KAKAN, If I remember correctly, we can't add new member vars to the Player, Vehicle classes etc which come from the squirrel plugin.
Yes doom, you're right. The topic was actually posted by karan2000...( about that new member thingy ). That's why I posted it as untested code.