Scripting/Server/Classes/Vehicle/TurretRotation
(v0.5.3+) Read-only, degrees: where the driver of a Rhino turned the turret (or a fire truck its water cannon) - left / right and up / down, 0 until someone turned it. The driver's game reports it and every other player sees the turret turn, also players who join later.
Syntax
vehicle.TurretRotationvehicle.TurretPitchReturns
float
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "turretrotation" )
{
local veh = player.Vehicle;
if ( !veh ) return MessagePlayer( "Sit in a vehicle first.", player );
local result = veh.TurretRotation();
MessagePlayer( "vehicle.TurretRotation returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- vehicle.Remove
- vehicle.Respawn
- vehicle.Fix
- vehicle.Explode
- vehicle.SetBurstableTyres
- player.AttachTo
- object.AttachTo
- object.AttachToBone
- vehicle.SetComponentStatus
- vehicle.SetComponentStatus
- vehicle.SetComponentAngle
- vehicle.SetComponentColour
Section: Vehicle
Categories: Server methods | Vehicle