Hello. I want to make a teleport from a certain object at the entrance to specific coordinates with a certain radius.
For example, the player enters the item "Veins", we tilt it to the coordinates [22491.3,20059.3,0.001] with a radius of 150. Tried to do through server_PlayerLogin
Spoiler
if (!_isNew) then {
//RETURNING CHARACTER
_inventory = _primary select 4;
_backpack = _primary select 5;
_survival = _primary select 6;
_model = _primary select 7;
_hiveVer = _primary select 8;
if !(_model in AllPlayers) then {_model = "Survivor2_DZ";}; if ((count nearestObjects [_playerObj, ["%ClassnameItem%"], 60]) > 0) then {
_newPos = [(getPosATL _playerObj), 80, 100, 10, 0, 20, 0] call BIS_fnc_findSafePos;
_playerObj setPosATL _newPos;
}
} else {
_model = _primary select 3;
_hiveVer = _primary select 4;
if (isNil "_model") then {
_model = "Survivor2_DZ";
} else {
if (_model == "") then {_model = "Survivor2_DZ";};
};
Question
godmode8
Hello. I want to make a teleport from a certain object at the entrance to specific coordinates with a certain radius.
For example, the player enters the item "Veins", we tilt it to the coordinates [22491.3,20059.3,0.001] with a radius of 150. Tried to do through server_PlayerLogin
if (!_isNew) then {
//RETURNING CHARACTER
_inventory = _primary select 4;
_backpack = _primary select 5;
_survival = _primary select 6;
_model = _primary select 7;
_hiveVer = _primary select 8;
if !(_model in AllPlayers) then {_model = "Survivor2_DZ";};
if ((count nearestObjects [_playerObj, ["%ClassnameItem%"], 60]) > 0) then {
_newPos = [(getPosATL _playerObj), 80, 100, 10, 0, 20, 0] call BIS_fnc_findSafePos;
_playerObj setPosATL _newPos;
}
} else {
_model = _primary select 3;
_hiveVer = _primary select 4;
if (isNil "_model") then {
_model = "Survivor2_DZ";
} else {
if (_model == "") then {_model = "Survivor2_DZ";};
};
//Record initial inventory
_config = configFile >> "CfgSurvival" >> "Inventory" >> "Default";
_mags = getArray (_config >> "magazines");
_wpns = getArray (_config >> "weapons");
_bcpk = getText (_config >> "backpack");
//Wait for HIVE to be free
_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
_key call server_hiveWrite;
};
but failed. I ask for help.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now