Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Kewun on Aug 09, 2016, 12:44 PM

Title: Few suggestions
Post by: Kewun on Aug 09, 2016, 12:44 PM
  [Server] Vehicle.GetEngineState
  [Server] Vehicle.Engine = bool;


would be good
Title: Re: Few suggestions
Post by: KAKAN on Aug 09, 2016, 12:45 PM
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.
Title: Re: Few suggestions
Post by: Kewun on Aug 09, 2016, 12:48 PM
hmm ill try making it my self then
Title: Re: Few suggestions
Post by: Kewun on Aug 09, 2016, 12:58 PM
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.
Title: Re: Few suggestions
Post by: KAKAN on Aug 09, 2016, 01:11 PM
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.
Title: Re: Few suggestions
Post by: DizzasTeR 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.

:edit: Oh, just tested it works now!
Title: Re: Few suggestions
Post by: Diego^ on Aug 09, 2016, 10:08 PM
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.
Title: Re: Few suggestions
Post by: KAKAN on Aug 10, 2016, 08:37 AM
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.