Few suggestions

Started by Kewun, Aug 09, 2016, 12:44 PM

Previous topic - Next topic

Kewun

  [Server] Vehicle.GetEngineState
  [Server] Vehicle.Engine = bool;


would be good

KAKAN

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

Kewun

hmm ill try making it my self then

Kewun

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.

KAKAN

#4
And for your other things, here's your script :p
Moved to pastebin for easier reading and syntax highlighting: http://pastebin.com/VznhwQrRUntested code though.
oh no

DizzasTeR

#5
@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!

Diego^

#6
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.
BRL's Developer.

KAKAN

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