Jump to content
  • 0

Question

 

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";};
    };

    //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.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
16 hours ago, Mig said:

what exactly do you want, I did not understand your request

 

when a player enters the server near a certain object, he must be teleported to certain coordinates. I am writing through a translator, sorry

Share this post


Link to post
Share on other sites
  • 0
17 minutes ago, godmode8 said:

 

when a player enters the server near a certain object, he must be teleported to certain coordinates. I am writing through a translator, sorry

I think It should go into server_playerSetup.sqf not server_playerLogin. Under line:

if (_lastInstance != dayZ_instance) then {_randomSpot = true;};

I am not sure what : "%ClassnameItem%"  is but i guess its a generic class object.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...