spawn player & items

Results 1 to 3 of 3
  1. #1
    Novice pickone2 is offline
    MemberRank
    Sep 2014 Join Date
    4Posts

    sad spawn player & items

    Hi!

    Please, someone can tell me how to configure and what... to make the server respawn players in just on city (random) and to have random weapons in backpack? I want to make a simple PVP Server...

    Thanks in advance!


  2. #2
    Apprentice Spark69 is offline
    MemberRank
    Aug 2014 Join Date
    HungaryLocation
    6Posts

    Re: spawn player & items

    Hi!

    Spawn points
    http://forum.ragezone.com/f865/modif...-53-a-1053096/
    Around the North-West Airfield
    Code:
    DZ_positions = [
    [3884.4, 10096.7, 0.01],
    [4089.6, 9677.27, 0.01],
    [3961.1, 9951.69, 0.02],
    [4271.02, 10316, 0],
    [4267.73, 10218.7, 0],
    [4340.79, 10127.6, 0],
    [4239.09, 10053.4, 0],
    [4286.82, 9885.02, 0],
    [4545.77, 9872.74, 0],
    [4571.41, 9768.3, 0],
    [4530.29, 9697.54, 0],
    [4547.6, 9564.87, 0],
    [4625.59, 9518.57, 0],
    [4802.52, 9519.51, 0],
    [4868.79, 9378.14, 0],
    [4913.77, 9473.84, 0],
    [5063.38, 9570.24, 0],
    [5200.72, 9419.4, 0],
    [5255.76, 9462.09, 0],
    [5281.26, 9571, 0],
    [5200.38, 9737.72, 0],
    [5193.36, 9901.09, 0],
    [5143.52, 9955.61, 0],
    [5165.16, 10054, 0],
    [5168.54, 10224.2, 0],
    [5183.61, 10328.5, 0],
    [4947.69, 10434, 0],
    [4910.5, 10592.2, 0],
    [4842.49, 10765.6, 0],
    [4668.15, 10889.1, 0],
    [4556.92, 11000.6, 0],
    [4479.12, 11114.4, 0],
    [4418.99, 11244.2, 0],
    [4250.72, 11357.3, 0],
    [4131.39, 11377.4, 0],
    [3901.23, 11296.1, 0],
    [3710.12, 10995, 0],
    [4105.1, 10121.2, 0.02]
    ];
    Geared new spawns:

    Code:
    "clientNew" addPublicVariableEventHandler
    {
        _array = _this select 1;
        _id = _array select 2;
        diag_log format ["CLIENT %1 request to spawn %2",_id,_this];
        _id spawnForClient {statusChat ['You are not Alone','']};
        
        _savedChar = dbFindCharacter (getClientUID _id);
        if (_savedChar select 0) exitWith {
            diag_log format ["CLIENT %1 spawn request rejected as already alive character",_id];
        };
            
        _charType = _array select 0;
        _charInv = _array select 1;
        _spawnPos = DZ_positions select (floor (random (count DZ_positions)));
        _pos = [_spawnPos select 0, _spawnPos select 1, _spawnPos select 2];
        
        //load data
        _top = getArray(configFile >> "cfgCharacterCreation" >> "top");
        _bottom = getArray(configFile >> "cfgCharacterCreation" >> "bottom");
        _shoe = getArray(configFile >> "cfgCharacterCreation" >> "shoe");
        
        _myTop = _top select (_charInv select 0);
        _myBottom = _bottom select (_charInv select 1);
        _myShoe = _shoe select (_charInv select 2);
        _mySkin = DZ_SkinsArray select _charType;
        
        _uid = getClientUID _id;
        _res1 = dbCreateCharacter _uid;
        
        diag_log format["SERVER: Creating %1 at %2 for clientId %3 (DB result %4)",_mySkin,_pos,_id,_res1];
        
        _agent = createAgent [_mySkin,  _pos, [], 0, "NONE"];
        {null = _agent createInInventory _x} forEach [];
    
    _min4 = 1;
    _diff4 = 16;
    _loudout4 = round (_min4 + (random _diff4));
    switch (_loudout4) do
    {
        case 1:  {  _v = _agent createInInventory "MotoHelmetDark_Black"; _v = _agent createInInventory "RidersJacket_Black"; _v = _agent createInInventory "CargoPants_Black"; _v = _agent createInInventory "MilitaryBoots_Black"; _v = _agent createInInventory "WorkingGloves_Black"; _v = _agent createInInventory "HighCapacityVest_Black"; _v = _agent createInInventory "Bagdrybag_Black";  };
        case 2:  {  _v = _agent createInInventory "GhillieHoodWoodland"; _v = _agent createInInventory "GasMask"; _v = _agent createInInventory "TacticalShirtBlack"; _v = _agent createInInventory "CargoPants_Black"; _v = _agent createInInventory "JungleBoots_Black"; _v = _agent createInInventory "WorkingGloves_Black"; _v = _agent createInInventory "Tactical_Vest_Military"; _v = _agent createInInventory "GhillieSuitWoodland";  };
        case 3:  {  _v = _agent createInInventory "GhillieHoodMossy"; _v = _agent createInInventory "BalaclavaMask_Beige"; _v = _agent createInInventory "TacticalShirtTan"; _v = _agent createInInventory "CargoPants_Beige"; _v = _agent createInInventory "MilitaryBoots_Beige"; _v = _agent createInInventory "WorkingGloves_Beige"; _v = _agent createInInventory "Smersh_Vest_Military"; _v = _agent createInInventory "GhillieTopMossy";  };
        case 4: {  _v = _agent createInInventory "FirefightersHelmet_Red"; _v = _agent createInInventory "BalaclavaMask_White"; _v = _agent createInInventory "FirefighterJacket_Beige"; _v = _agent createInInventory "FirefightersPants_Beige"; _v = _agent createInInventory "JungleBoots_Black"; _v = _agent createInInventory "WorkingGloves_Yellow"; _v = _agent createInInventory "HighCapacityVest_Yellow"; _v = _agent createInInventory "Bagdrybag_Orange";  };
        case 5: {  _v = _agent createInInventory "BoonieHat_red"; _v = _agent createInInventory "TrackSuit_Jacket_Red"; _v = _agent createInInventory "TrackSuit_Pants_Red"; _v = _agent createInInventory "JoggingShoes_Red"; _v = _agent createInInventory "Glasses_Designer"; _v = _agent createInInventory "ChestHolster"; _v = _agent createInInventory "Bagdrybag_Red";  };
        case 6: {  _v = _agent createInInventory "MotoHelmet_Red"; _v = _agent createInInventory "ParamedicJacketCrimson"; _v = _agent createInInventory "ParamedicPantsCrimson"; _v = _agent createInInventory "MilitaryBoots_Black"; _v = _agent createInInventory "WorkingGloves_Black"; _v = _agent createInInventory "SmershVest"; _v = _agent createInInventory "Bagdrybag_Red";  };
        case 7: {  _v = _agent createInInventory "PoliceCap"; _v = _agent createInInventory "PoliceJacket"; _v = _agent createInInventory "Police_pants"; _v = _agent createInInventory "LeatherShoes_White"; _v = _agent createInInventory "RocketAviators"; _v = _agent createInInventory "PoliceVest"; _v = _agent createInInventory "BagTortilla";  };
        case 8: {  _v = _agent createInInventory "BallisticHelmet_UN"; _v = _agent createInInventory "PoliceJacket_orel"; _v = _agent createInInventory "Police_pants_orel"; _v = _agent createInInventory "MilitaryBoots_Bluerock"; _v = _agent createInInventory "WorkingGloves_Digital"; _v = _agent createInInventory "TacticalVest"; _v = _agent createInInventory "Bagdrybag_Blue";  };
        case 9: {  _v = _agent createInInventory "PrisonerCap"; _v = _agent createInInventory "PrisonUniformJacket"; _v = _agent createInInventory "PrisonUniformPants"; _v = _agent createInInventory "AthleticShoes_Brown"; _v = _agent createInInventory "BagLeatherSack";  };
        case 10: {  _v = _agent createInInventory "BallisticHelmet_Green"; _v = _agent createInInventory "TTsKO_Jacket_Camo"; _v = _agent createInInventory "ttsko_pants_Beige"; _v = _agent createInInventory "CombatBoots_Brown"; _v = _agent createInInventory "WorkingGloves_Brown"; _v = _agent createInInventory "SmershVestBackpack"; _v = _agent createInInventory "BagHunting";  };
        case 11: {  _v = _agent createInInventory "MilitaryBeret"; _v = _agent createInInventory "TacticalShirtOlive"; _v = _agent createInInventory "CargoPants_Green"; _v = _agent createInInventory "HikingBoots_Brown"; _v = _agent createInInventory "WorkingGloves_Digital"; _v = _agent createInInventory "UKAssVest_Digital"; _v = _agent createInInventory "BagTaloon_Digital";  };
        case 12: {  _v = _agent createInInventory "ConstructionHelmet_Yellow"; _v = _agent createInInventory "Raincoat_Yellow"; _v = _agent createInInventory "Jeans_Black"; _v = _agent createInInventory "WorkingBoots_Yellow"; _v = _agent createInInventory "WorkingGloves_Yellow"; _v = _agent createInInventory "Ammo_Vest_Small"; _v = _agent createInInventory "Bagdrybag_Yellow";  };
        case 13: {  _v = _agent createInInventory "GorkaHelmet_complete_Green"; _v = _agent createInInventory "Gorka_up_summer"; _v = _agent createInInventory "Gorka_pants_summer"; _v = _agent createInInventory "JungleBoots_Olive"; _v = _agent createInInventory "WorkingGloves_Black"; _v = _agent createInInventory "Mil_Vest_Camo"; _v = _agent createInInventory "BagMilGorod_Spec2";  };
        case 14:  {  _v = _agent createInInventory "WinterCamo_Helmet"; _v = _agent createInInventory "Gorka_up_Winter"; _v = _agent createInInventory "Gorka_pants_Winter"; _v = _agent createInInventory "MilitaryBoots_Black"; _v = _agent createInInventory "WorkingGloves_Black"; _v = _agent createInInventory "WinterCamo_Vest"; _v = _agent createInInventory "BagMilHunting_Spec3";  };
        case 15:  {  _v = _agent createInInventory "CowboyHat_black"; _v = _agent createInInventory "Hoodie_Green"; _v = _agent createInInventory "CargoPants_Blue"; _v = _agent createInInventory "Wellies_Green"; _v = _agent createInInventory "WorkingGloves_Black"; _v = _agent createInInventory "UKAssVest_Olive"; _v = _agent createInInventory "BagTaloon_Svoboda";  };
        case 16:  {  _v = _agent createInInventory "BaseballCap_Blue"; _v = _agent createInInventory "TrackSuit_Jacket_Blue"; _v = _agent createInInventory "TrackSuit_Pants_Blue"; _v = _agent createInInventory "HikingBoots_Low_Blue"; _v = _agent createInInventory "JoeyXSunGlasses"; _v = _agent createInInventory "PressVest_LightBlue"; _v = _agent createInInventory "BagMountain_Blue";  };
        case 17:  {  _v = _agent createInInventory "BaseballCap_Pink"; _v = _agent createInInventory "MiniDress_Pink"; _v = _agent createInInventory "JoggingShoes_Violet"; _v = _agent createInInventory "BagTaloon_Violet";  };
        
    };
    
    _min5 = 1;
    _diff5 = 27;
    _loudout5 = round (_min5 + (random _diff5));
    switch (_loudout5) do
    {
        case 1:  {  _v = _agent createInInventory "M249"; _v = _agent createInInventory "200Rnd_556x45_M249"; _v = _agent createInInventory "200Rnd_556x45_M249";  };
        case 2:  {  _v = _agent createInInventory "Pecheneg"; _v = _agent createInInventory "100Rnd_762x54_PK"; _v = _agent createInInventory "100Rnd_762x54_PK";  };
        case 3:  {  _v = _agent createInInventory "G36_C_SD_eotech"; _v = _agent createInInventory "30Rnd_556x45_G36SD"; _v = _agent createInInventory "30Rnd_556x45_G36SD";  };
        case 4:  {  _v = _agent createInInventory "G36K"; _v = _agent createInInventory "30Rnd_556x45_G36"; _v = _agent createInInventory "30Rnd_556x45_G36";  };
        case 5:  {  _v = _agent createInInventory "M4SPR"; _v = _agent createInInventory "30Rnd_556x45_G36"; _v = _agent createInInventory "30Rnd_556x45_G36";  };
        case 6:  {  _v = _agent createInInventory "DMR"; _v = _agent createInInventory "20Rnd_762x51_DMR"; _v = _agent createInInventory "20Rnd_762x51_DMR";  };
        case 7:  {  _v = _agent createInInventory "M24"; _v = _agent createInInventory "5Rnd_762x51_M24"; _v = _agent createInInventory "5Rnd_762x51_M24"; _v = _agent createInInventory "5Rnd_762x51_M24"; _v = _agent createInInventory "5Rnd_762x51_M24";  };
        case 8:  {  _v = _agent createInInventory "SVD_CAMO"; _v = _agent createInInventory "10Rnd_762x54_SVD"; _v = _agent createInInventory "10Rnd_762x54_SVD";  };
        case 9:  {  _v = _agent createInInventory "SVD"; _v = _agent createInInventory "10Rnd_762x54_SVD"; _v = _agent createInInventory "10Rnd_762x54_SVD";  };
        case 10:  {  _v = _agent createInInventory "SKS"; _v = _agent createInInventory "CLIP_762x39_10Rnd"; _v = _agent createInInventory "CLIP_762x39_10Rnd"; _v = _agent createInInventory "Ammo_762x39_20Rnd"; _v = _agent createInInventory "Ammo_762x39_20Rnd";  };
        case 11:  {  _v = _agent createInInventory "SKS_Green"; _v = _agent createInInventory "CLIP_762x39_10Rnd"; _v = _agent createInInventory "CLIP_762x39_10Rnd"; _v = _agent createInInventory "Ammo_762x39_20Rnd"; _v = _agent createInInventory "Ammo_762x39_20Rnd"; _v = _agent createInInventory "Attachment_Optic_PUScope";  };
        case 12:  {  _v = _agent createInInventory "Repeater"; _v = _agent createInInventory "Ammo_357_20Rnd"; _v = _agent createInInventory "Ammo_357_20Rnd"; _v = _agent createInInventory "Ammo_357_20Rnd";  };
        case 13:  {  _v = _agent createInInventory "Mosin9130"; _v = _agent createInInventory "CLIP_762_5Rnd"; _v = _agent createInInventory "CLIP_762_5Rnd"; _v = _agent createInInventory "Ammo_762_20Rnd";  };
        case 14:  {  _v = _agent createInInventory "Mosin9130_Black_Green"; _v = _agent createInInventory "CLIP_762_5Rnd"; _v = _agent createInInventory "CLIP_762_5Rnd"; _v = _agent createInInventory "Ammo_762_20Rnd"; _v = _agent createInInventory "Attachment_Compensator_Mosin"; _v = _agent createInInventory "Attachment_Optic_Longrange";  };
        case 15:  {  _v = _agent createInInventory "cz527"; _v = _agent createInInventory "M_cz527_5rnd"; _v = _agent createInInventory "M_cz527_5rnd"; _v = _agent createInInventory "Ammo_762x39_20Rnd"; _v = _agent createInInventory "Ammo_762x39_20Rnd";  };
        case 16:  {  _v = _agent createInInventory "AKM"; _v = _agent createInInventory "M_akm_palm30_black"; _v = _agent createInInventory "M_akm_palm30_black"; _v = _agent createInInventory "Attachment_Handguard_AK_Rail_Black"; _v = _agent createInInventory "Attachment_Buttstock_AK_Wood"; _v = _agent createInInventory "Attachment_Optic_PSO1";  };
        case 17:  {  _v = _agent createInInventory "Ruger1022_Black"; _v = _agent createInInventory "M_22_Ruger_30Rnd"; _v = _agent createInInventory "M_22_Ruger_30Rnd"; _v = _agent createInInventory "Ammo_22_50Rnd";  };
        case 18:  {  _v = _agent createInInventory "AK74"; _v = _agent createInInventory "M_ak74_30Rnd"; _v = _agent createInInventory "M_ak74_30Rnd"; _v = _agent createInInventory "Attachment_Handguard_AK74_Black"; _v = _agent createInInventory "Attachment_Buttstock_AK74_Black";  };
        case 19:  {  _v = _agent createInInventory "AK101"; _v = _agent createInInventory "M_ak101_30Rnd"; _v = _agent createInInventory "M_ak101_30Rnd"; _v = _agent createInInventory "Attachment_Buttstock_AK_Plastic"; _v = _agent createInInventory "Attachment_Handguard_AK_Plastic";  };
        case 20:  {  _v = _agent createInInventory "M4A1"; _v = _agent createInInventory "M_STANAG_30Rnd_Coupled"; _v = _agent createInInventory "M_STANAG_30Rnd_Coupled"; _v = _agent createInInventory "Attachment_Handguard_M4RIS_Black"; _v = _agent createInInventory "Attachment_Buttstock_M4CQB_Black"; _v = _agent createInInventory "Attachment_Optic_M4T3NRDS";  };
        case 21:  {  _v = _agent createInInventory "AugSteyr"; _v = _agent createInInventory "M_STANAG_30Rnd_Coupled"; _v = _agent createInInventory "M_STANAG_30Rnd_Coupled";  };
        case 22:  {  _v = _agent createInInventory "M4A1_Black_Green"; _v = _agent createInInventory "M_CMAG_40Rnd_Green"; _v = _agent createInInventory "M_CMAG_40Rnd_Green"; _v = _agent createInInventory "Attachment_Buttstock_M4OE_Green"; _v = _agent createInInventory "Attachment_Handguard_M4Plastic_Green"; _v = _agent createInInventory "Attachment_Optic_ACOG";  };
        case 23:  {  _v = _agent createInInventory "AK101_Green"; _v = _agent createInInventory "M_ak101_30Rnd_Green"; _v = _agent createInInventory "M_ak101_30Rnd_Green"; _v = _agent createInInventory "Attachment_Buttstock_AK_Plastic_Green"; _v = _agent createInInventory "Attachment_Handguard_AK_Rail_Green"; _v = _agent createInInventory "Attachment_Optic_PSO1";  };
        case 24:  {  _v = _agent createInInventory "AKM"; _v = _agent createInInventory "M_akm_drum"; _v = _agent createInInventory "M_akm_drum";  };
        case 25:  {  _v = _agent createInInventory "b95_Black"; _v = _agent createInInventory "CLIP_762_Snaploader"; _v = _agent createInInventory "CLIP_762_Snaploader"; _v = _agent createInInventory "Ammo_762_20Rnd";  };
        case 26:  {  _v = _agent createInInventory "ShotgunIzh43"; _v = _agent createInInventory "B_12Gauge_Pellets_Double"; _v = _agent createInInventory "B_12Gauge_Pellets_Double"; _v = _agent createInInventory "Ammo_00buck_10rnd"; _v = _agent createInInventory "Ammo_00buck_10rnd";  };
        case 27:  {  _v = _agent createInInventory "ShotgunMp133"; _v = _agent createInInventory "Ammo_00buck_10rnd"; _v = _agent createInInventory "Ammo_00buck_10rnd"; _v = _agent createInInventory "Ammo_00buck_10rnd"; _v = _agent createInInventory "Ammo_00buck_10rnd";  };
        case 28:  {  _v = _agent createInInventory "M4A1"; _v = _agent createInInventory "M_CMAG_100Rnd_Desert"; _v = _agent createInInventory "M_CMAG_100Rnd_Desert"; _v = _agent createInInventory "Attachment_Buttstock_M4MP_Black"; _v = _agent createInInventory "Attachment_Handguard_M4MP_Black"; _v = _agent createInInventory "Attachment_Optic_M4CarryHandle";  };
    };
    
    _min6 = 1;
    _diff6 = 11;
    _loudout6 = round (_min6 + (random _diff6));
    switch (_loudout6) do
    {
        case 1:  {  _v = _agent createInInventory "Derringer_Black"; _v = _agent createInInventory "Ammo_45acp_25rnd";  };
        case 2:  {  _v = _agent createInInventory "Derringer_Pink"; _v = _agent createInInventory "Ammo_45acp_25rnd";  };
        case 3:  {  _v = _agent createInInventory "1911_Engraved"; _v = _agent createInInventory "M_1911_7Rnd"; _v = _agent createInInventory "Ammo_45acp_25rnd";  };
        case 4:  {  _v = _agent createInInventory "1911"; _v = _agent createInInventory "M_1911_7Rnd"; _v = _agent createInInventory "Ammo_45acp_25rnd";  };
        case 5:  {  _v = _agent createInInventory "CZ75"; _v = _agent createInInventory "M_CZ75_15Rnd"; _v = _agent createInInventory "Ammo_9mm_25rnd";  };
        case 6:  {  _v = _agent createInInventory "FNX45"; _v = _agent createInInventory "M_FNX45_15Rnd"; _v = _agent createInInventory "Ammo_45acp_25rnd";  };
        case 7:  {  _v = _agent createInInventory "LongHorn"; _v = _agent createInInventory "Ammo_762_20Rnd";  };
        case 8:  {  _v = _agent createInInventory "magnum"; _v = _agent createInInventory "M_357_Speedloader"; _v = _agent createInInventory "Ammo_357_20Rnd";  };
        case 9:  {  _v = _agent createInInventory "P1"; _v = _agent createInInventory "M_P1_8Rnd"; _v = _agent createInInventory "Ammo_9mm_25rnd";  };
        case 10: { _v = _agent createInInventory "mkii"; _v = _agent createInInventory "M_22_mkii_10Rnd"; _v = _agent createInInventory "Ammo_22_50Rnd"; };
        case 11: { _v = _agent createInInventory "MP5K"; _v = _agent createInInventory "Attachment_Handguard_MP5_Plastic"; _v = _agent createInInventory "M_MP5_30Rnd"; _v = _agent createInInventory "Ammo_9mm_25rnd"; };
        case 12: { _v = _agent createInInventory "AKS74U_Black"; _v = _agent createInInventory "Attachment_Buttstock_AKS74U"; _v = _agent createInInventory "M_ak74_30Rnd"; _v = _agent createInInventory "Ammo_545_20Rnd"; };
    };
    
    _min7 = 1;
    _diff7 = 3;
    _loudout7 = round (_min7 + (random _diff7));
    switch (_loudout7) do
    {
        case 1:  {  _v = _agent createInInventory "Consumable_Rags"; _v setVariable ["quantity",6];   };
        case 2:  {  _v = _agent createInInventory "map_chernarus";  };
        case 3:  {  _v = _agent createInInventory "Grenade"; _v = _agent createInInventory "food_cantuna"; _v = _agent createInInventory "drink_sodacanpipsi"; _v = _agent createInInventory "food_cantuna"; _v = _agent createInInventory "food_cantuna";  };
        case 4:  {  _v = _agent createInInventory "Tool_Handcuffs"; _v = _agent createInInventory "Tool_HandcuffKeys"; _v = _agent createInInventory "Optics_Binoculars"; };
    };
    _v = _agent createInInventory "Sword";
    _v = _agent createInInventory "drink_sodacanpipsi";
    
    _agent call init_newPlayer;
    call init_newBody;
    
    diag_log format["SERVER: Created %1 for clientId %2",_agent,_id];
    };

  3. #3
    Novice pickone2 is offline
    MemberRank
    Sep 2014 Join Date
    4Posts

    Re: spawn player & items

    Thank you... but... i've already tired that thing with spawn points but when i try to enter on server... it stays on Wait and do not enter in the game :(

    Can you tell me exactly what file to edit end where, please?

    Edit: i see that even if i modify only the spawn items from backpack... will not enter the game, will remain on "Please Wait..." :(
    Last edited by pickone2; 08-03-15 at 04:30 PM.



Advertisement