Scripting/Squirrel/Functions/Vehicle.Angle

From Vice City Multiplayer
Revision as of 13:57, 15 August 2016 by MatheuS (talk | contribs) (Created page with "This instance variable returns vehicle's angle. == Syntax == <pre>string vehicle.Angle();</pre> == Example == <source lang=squirrel> function OnPlayerCommand( player , cmd...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

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

The functions MessagePlayer, Player.Name and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.