Scripting/Squirrel/Functions/Vehicle.Angle: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This instance variable returns vehicle's angle. == Syntax == <pre>string vehicle.Angle();</pre> == Example == <source lang=squirrel> function OnPlayerCommand( player , cmd...")
 
No edit summary
Line 20: Line 20:


=== Notes ===
=== Notes ===
The functions [[Scripting/Squirrel/Functions/MessagePlayer|MessagePlayer]], [[Scripting/Squirrel/Functions/Player.Name|Player.Name]] and call [[Scripting/Squirrel/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in corresponding pages.


== Related Functions ==
== Related Functions ==
{{Scripting/Squirrel/Functions/Player Functions}}

Revision as of 13:57, 15 August 2016

This instance variable returns vehicle's angle.

Syntax

string vehicle.Angle();

Example

function OnPlayerCommand( player , cmd , text )
{
	if ( cmd == "vAngle" ) {
        else if ( !player.Vehicle ) MessagePlayer("You are not in a vehicle.", player );
        else {
           MessagePlayer( " Your vehicle angle is: " + player.Vehicle.Angle(), player );
        }
       }
}

Notes

Related Functions