GetVehicleTurretRot: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome|desc=Returns the turret rotation of the vehicle, if it have one| params=<source>(vehicleid)</source> <poem>vehicleid : The ID of the vehicle, whose turret rotation is to be obtained.</poem>| retvals=The Turret rotation of the vehicle as Vector on success, Vector(0,0,0) on failure ( invalid vehicleid/not streamedin ). If the vehicle has no turret, it is expected to return 0 as both the horizontal and vertical turret resulting in Vector(0,0,0) }}")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;">
This function was added in v1.7 and will not work on previous versions.
</poem>
{{Welcome|desc=Returns the turret rotation of the vehicle, if it have one|
{{Welcome|desc=Returns the turret rotation of the vehicle, if it have one|
params=<source>(vehicleid)</source>
params=<source>(vehicleid)</source>
<poem>vehicleid : The ID of the vehicle, whose turret rotation is to be obtained.</poem>|
<poem>vehicleid : The ID of the vehicle, whose turret rotation is to be obtained.</poem>|
retvals=The Turret rotation of the vehicle as Vector on success, Vector(0,0,0) on failure ( invalid vehicleid/not streamedin ). If the vehicle has no turret, it is expected to return 0 as both the horizontal and vertical turret resulting in Vector(0,0,0) }}
retvals=The Turret rotation of the vehicle as Vector on success, Vector(0,0,0) on failure ( invalid vehicleid/not streamedin ). If the vehicle has no turret, it is expected to return 0 as both the horizontal and vertical turret resulting in Vector(0,0,0).|
relfuncs=*[[GetVehicleRotation]]
*[[GetVehiclePos]]
*[[GetVehicleSpeed]]
*[[GetVehicleDriver]]
*[[GetLocalValue]] }}

Latest revision as of 05:48, 25 August 2023

This function was added in v1.7 and will not work on previous versions.


Description:
Returns the turret rotation of the vehicle, if it have one


Parameters:

(vehicleid)

vehicleid : The ID of the vehicle, whose turret rotation is to be obtained.


Return Values:
The Turret rotation of the vehicle as Vector on success, Vector(0,0,0) on failure ( invalid vehicleid/not streamedin ). If the vehicle has no turret, it is expected to return 0 as both the horizontal and vertical turret resulting in Vector(0,0,0).



Related Functions

The following functions may be helpful as they relate to this function in one way or another.