Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: UncleRus on Aug 17, 2020, 12:32 PM

Title: Flip command for car
Post by: UncleRus on Aug 17, 2020, 12:32 PM
Who give me command flip with this command function

function onPlayerCommand( player, command, arguments )

local cmd, text;
cmd = command.tolower();
text = arguments;
local params;
Title: Re: Flip command for car
Post by: SHy^ on Aug 17, 2020, 03:03 PM

if ( cmd == "flip" )
{
if ( !player.Vehicle ) MessagePlayer( "[#ff1111]Error: [#ffffff]You need to be in a Vehicle to use this command." , player )
else
{
local veh = player.Vehicle;
veh.Rotation = Quaternion( 0.0, 0.0, 0.0, 0.0 );
MessagePlayer( "[#00ff00][INFO] [#ffffff]You have flipped your car." , player )
}
}
Use search button next time plx.
Title: Re: Flip command for car
Post by: NicusorN5 on Aug 17, 2020, 03:51 PM
Question: Why not use the quaternion identity value with W =1 and the rest of the values 0?
Title: Re: Flip command for car
Post by: UncleRus on Aug 17, 2020, 03:57 PM
Thanks guys