ACE3/addons/respawn/functions/fnc_initRallypoint.sqf

39 lines
765 B
Plaintext
Raw Normal View History

/*
Name: ACE_Respawn_fnc_initRallypoint
Author(s):
commy2
Description:
init code for rally points
Parameters:
0: OBJECT - rally
Returns:
VOID
*/
#include "script_component.hpp"
2015-01-12 09:07:03 +00:00
private ["_rallypoint", "_respawnMarker", "_name"];
2015-01-12 09:07:03 +00:00
_rallypoint = _this select 0;
_respawnMarker = _this select 1;
2015-01-12 09:07:03 +00:00
if (!local _rallypoint) exitWith {};
_name = typeOf _rallypoint;
if (isNil _name) then {
2015-01-13 14:28:03 +00:00
missionNamespace setVariable [_name, _rallypoint];
publicVariable _name;
2015-01-12 09:07:03 +00:00
} else {
2015-01-13 14:28:03 +00:00
deleteVehicle _rallypoint;
diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type.";
2015-01-12 09:07:03 +00:00
};
if (isServer && {_respawnMarker != ""} && {!(_respawnMarker in allMapMarkers)}) then {
createMarker [_respawnMarker, _rallypoint];
};