Scripting/Squirrel/Functions/Vehicles/Angle
From VC-MP Wiki
NOTE: This function has been modified in VC:MP 0.3z r2. It may work as in previous versions, and offer additional functionality.
This instance variable returns or sets the rotation of the vehicle. Note: Since R2 it's been possible to set the vehicle rotation.
Syntax
float Vehicle.Angle Vehicle.Angle = float fNewAngle
Example 1. Returning
This command allows you to know the angle of the vehicle
function onPlayerCommand( player, cmd, text ) { if ( cmd == "vehangle" ) { local veh = FindVehicle( text.tointeger() ); if ( !veh ) PrivMessage( "Error: Wrong ID of the vehicle.", player ); else { PrivMessage( "Vehicle:( " + veh + " ) ID:( " + veh.ID + " ) Angle:( " + veh.Angle + " )), player ); } } }
Notes
TODO
Example 2. Setting
This function needs an example. You can help us complete the wiki by writing one, or maybe even two :o
TODO
Notes
TODO
Related Functions
- CreateVehicle
- FindVehicle
- GetVehicleCount
- GetVehicleModelFromName
- GetVehicleNameFromModel
- Vehicle.Alarm
- Vehicle.Angle
- Vehicle.Colour1
- Vehicle.Colour2
- Vehicle.Driver
- Vehicle.Fix
- Vehicle.Health
- Vehicle.ID
- Vehicle.IsLocked
- Vehicle.KillEngine
- Vehicle.Lights
- Vehicle.Model
- Vehicle.Pos
- Vehicle.Respawn
- Vehicle.RespawnAs
- Vehicle.RespawnAt
- Vehicle.SetFlatTyres
- Vehicle.SpawnPos
- Vehicle.SpawnAngle
- Vehicle.Velocity
- Vehicle.Remove
