UID Based Spawn?

Discussion in 'Scripting/Addon Discussion' started by KrisiS, Jan 8, 2016.

  1. KrisiS

    KrisiS Member

    Joined:
    Aug 17, 2013
    Messages:
    89
    Likes Received:
    1
    Would anyone know how to create a script based on the following:

    Have all the usual spawn points.

    Then for certain UID's , let these guys have an additional Spawn Location named 'Home' which would allow them to spawn at their respective bases.


    Each base would be from a coordinate that is specific to that particular player.

    Any help is much appreciated :)
     
  2. 31_D!4b10

    31_D!4b10 New Member

    Joined:
    Aug 7, 2014
    Messages:
    5
    Likes Received:
    0
    i got a script in my server, where i can customize a spawn position for certain uids... i think it would be easy to add it to your wishes ^^
     
  3. KrisiS

    KrisiS Member

    Joined:
    Aug 17, 2013
    Messages:
    89
    Likes Received:
    1
    Thank you man, I could certainly give it a go :)
    Any chance you have a link to a download?
     
  4. 31_D!4b10

    31_D!4b10 New Member

    Joined:
    Aug 7, 2014
    Messages:
    5
    Likes Received:
    0
    i could look for all infos u need
    its not alot... moment, i will collect and upload ;)
     
  5. 31_D!4b10

    31_D!4b10 New Member

    Joined:
    Aug 7, 2014
    Messages:
    5
    Likes Received:
    0
    in your init.sqf under the "if (!isDedicated) then {" -Section you add the following:

    Code:
    // UID Spawns
        bambi = compile preprocessFileLineNumbers "addons\uid_coustom_spawn.sqf";
        waitUntil {!isNil "PVDZE_plr_LoginRecord"};
        if (dayzPlayerLogin2 select 2) then {
            player spawn bambi;
            sleep 5;
        };
    in your "uid_coustom_spawn.sqf" (in your "addons" -Folder) u write the following:

    Code:
    if (!isDedicated) then {
        sleep 1;
        if ((getPlayerUID player) in ["11111111111111111","22222222222222222"]) exitWith {                                            //Player UID's
            player setPosATL [16850.059,14128.018,3.8146973e-006];                                                    // Custom Spawn Location 1 - Format: [X,Y,Z]
            bambi = false;
        };
        if ((getPlayerUID player) in ["11111111111111111","22222222222222222","33333333333333333"]) exitWith {        //Player UID's
            player setPosATL [8605.9639,6950.9312,-4.4584274e-005];                                                    // Custom Spawn Location 2 - Format: [X,Y,Z]
            bambi = false;
        };
    };
    
    thats all.. i think you understand the most.. if not, ask again or pm me :)
     
  6. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    that works just like the ess spawn, teleports the player after spawn and will do the trick
    there is an alternative if you use the 'default map' of dayz where you click on the postcards. ..,if you dont then ignore this post and proceed with the previous solution ....
    i havent fooled with this in a few years so you might have to toss the bullshit flag on this .. but i think it will work.
    i would have to look up the files again but what occurs is that those postcard images are stored in the dayz_code. replace the chernarus random spawn image with one of a player base. change the spawn file that checks which image you clicked to spawn at the base .. of course you would need an external file to spawn at custom locations like this so it wiuld likely end up using the original solution provided by the el diablo along with the images click, but the execution of clicking on an image of a base would be better ... if you are using a version that permits the imagemap.
     

Share This Page