fn_getUnitPositionId
This commit is contained in:
parent
0407c62377
commit
fd215c17fa
|
@ -2,25 +2,28 @@
|
|||
File: fn_getUnitPositionId.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2019-12-03
|
||||
Last Update: 2019-12-03
|
||||
Last Update: 2019-12-07
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
No description added yet.
|
||||
Gets the position ID of given unit with vehicleVarName bypassing.
|
||||
|
||||
Parameter(s):
|
||||
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
|
||||
_unit - Unit to get the position ID from [OBJECT, defaults to objNull]
|
||||
|
||||
Returns:
|
||||
Function reached the end [BOOL]
|
||||
Position ID [NUMBER]
|
||||
*/
|
||||
// TODO
|
||||
params [ "_unit" ];
|
||||
private ["_vvn", "_str"];
|
||||
|
||||
_vvn = vehicleVarName _unit;
|
||||
params [
|
||||
["_unit", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (isNull _unit) exitWith {["Null object given"] call BIS_fnc_error; -1};
|
||||
|
||||
private _vvn = vehicleVarName _unit;
|
||||
_unit setVehicleVarName "";
|
||||
_str = str _unit;
|
||||
private _str = str _unit;
|
||||
_unit setVehicleVarName _vvn;
|
||||
|
||||
parseNumber (_str select [(_str find ":") + 1])
|
||||
|
|
Loading…
Reference in New Issue