rhadamanthus79 Posted September 25, 2013 Report Share Posted September 25, 2013 ok this is a setup i made to have multiple custom load outs. things needed: pbo manager & notepad++ & loadout attachment i will try to explain this the best i can inside your dayz_server.pbo you are going to place AGloadout.sqf inside the init folder you are going to want to edit the server_functions.sqf inside the same location and add this line to the very bottom: #include "AGloadout.sqf" inside the same pbo you are going to want to go to the compile folder. you are going to want to edit the server_playerLogin.sqf look for these lines: if (count _this > 2) then { dayz_players = dayz_players - [_this select 2]; }; right under these lines you are going to want to add this: if (_playerID in AG_epoch_top) then { _inventory = [["NVGoggles","ItemEtool","ItemGps","M4A1_AIM_SD_camo","glock17_EP1","ItemKeyKit","ItemMatchbox"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemGoldBar","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemBloodbag","ItemAntibiotic","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage","ItemMorphine","ItemTinBar","ItemTinBar","PartGeneric"]]; _backpack = ["DZ_British_ACU",[[],[]],[[],[]]]; }; if (_playerID in AG_epoch_mid) then { _inventory = [["NVGoggles","ItemEtool","ItemMap","bizon_silenced","ItemMatchbox"], ["64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]]; _backpack = ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; }; if (_playerID in AG_epoch_low) then { _inventory = [["ItemEtool","glock17_EP1","ItemMatchbox","ItemMap"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]]; _backpack = ["DZ_Patrol_Pack_EP1",[[],[]],[[],[]]]; }; if (_playerID in AG_epoch_admin) then { _inventory = [["ItemGPS","NVGoggles","ItemFlashlight","ItemWatch","ItemCompass","M9SD","M4A1_AIM_SD_camo","ItemMatchbox"], ["15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBloodbag","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]]; _backpack = ["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; }; there is an example of this in the loginExample.sqf feel free to edit the loadouts as needed. just follow the format. important under this you will see: //Variables _inventory = []; _backpack = []; _survival = [0,0,0]; _isInfected = 0; _model = ""; you are going to want to comment out or delete these 2 lines: _inventory = []; _backpack = []; now put the following files in your operation arrowhead folder premiumadmin.sqf, premiumtop.sqf, premiummid.sqf, premiumlow.sqf dont forget to add some UID's in these files ( you want UID's -player ID's NOT GUID's Hope this helps you --ZILF form adrenaline-gaming.net loadout.zip Bags2247 and PetuniaEpoch 2 Link to comment Share on other sites More sharing options...
___MeRliN___ Posted September 25, 2013 Report Share Posted September 25, 2013 Hm custom loadouts, looks pretty interesting. Will consider adding this to the formatgames public server. Well atleast so admins start with a different skin and a golden revolver + ammo on their admin "character"/ID. Thanks for sharing this :) Link to comment Share on other sites More sharing options...
rhadamanthus79 Posted September 25, 2013 Author Report Share Posted September 25, 2013 any time let me know how it works out for you Link to comment Share on other sites More sharing options...
PetuniaEpoch Posted September 26, 2013 Report Share Posted September 26, 2013 Hey! Thanks :D I saw your post in the other thread, saying that you'd post this solution... thanks for following through and actually posting :D Link to comment Share on other sites More sharing options...
Ephox Posted September 27, 2013 Report Share Posted September 27, 2013 How does this work? I want a GUID based loudout so only i get admin loadout. Link to comment Share on other sites More sharing options...
rhadamanthus79 Posted September 27, 2013 Author Report Share Posted September 27, 2013 This is what you want UID's work the same as a GUID's Link to comment Share on other sites More sharing options...
Lanmanfm Posted September 27, 2013 Report Share Posted September 27, 2013 How would this work with a fresh spawn who has never played on the server before but has "contributed" so that he gets a premium load out? Will they spawn on the beach with the default load out that everyone else gets until they die or will it give them the proper load out based on this script? Link to comment Share on other sites More sharing options...
PetuniaEpoch Posted September 27, 2013 Report Share Posted September 27, 2013 Hey :) Are you sure you mean that we should put the 4 loadout sqf files in the operation arrowhead folder ? I tried this, and get a black screen :S Link to comment Share on other sites More sharing options...
ghostphantom172 Posted October 1, 2013 Report Share Posted October 1, 2013 This is my rpt log for after i respawned in and selected my sex :/ 4:17:08 "ERROR: Cannot Sync Character GhostPhantom as no characterID" Link to comment Share on other sites More sharing options...
Rocky Posted October 5, 2013 Report Share Posted October 5, 2013 where do i put the sqf files? Link to comment Share on other sites More sharing options...
ranoko Posted October 26, 2013 Report Share Posted October 26, 2013 sorry to bump this but those files go into the server pbo correct? Link to comment Share on other sites More sharing options...
ranoko Posted October 26, 2013 Report Share Posted October 26, 2013 having same issue with the black screen. Players that do not have their UID's inside the files go to black screens and have to disconnect reconnect. Players that have their UID's in the files get fine through Link to comment Share on other sites More sharing options...
karena Posted October 26, 2013 Report Share Posted October 26, 2013 im not a scripter, but, if u put an ELSE statment on every check ? like this if (_playerID in AG_epoch_top) then { _inventory = [["NVGoggles","ItemEtool","ItemGps","M4A1_AIM_SD_camo","glock17_EP1","ItemKeyKit","ItemMatchbox"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemGoldBar","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemBloodbag","ItemAntibiotic","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage","ItemMorphine","ItemTinBar","ItemTinBar","PartGeneric"]]; _backpack = ["DZ_British_ACU",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_mid) then { _inventory = [["NVGoggles","ItemEtool","ItemMap","bizon_silenced","ItemMatchbox"], ["64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]]; _backpack = ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_low) then { _inventory = [["ItemEtool","glock17_EP1","ItemMatchbox","ItemMap"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]]; _backpack = ["DZ_Patrol_Pack_EP1",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_admin) then { _inventory = [["ItemGPS","NVGoggles","ItemFlashlight","ItemWatch","ItemCompass","M9SD","M4A1_AIM_SD_camo","ItemMatchbox"], ["15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBloodbag","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]]; _backpack = ["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; } else { _inventory = []; _backpack = []; }; can someone check this ? Link to comment Share on other sites More sharing options...
squshy7 Posted October 26, 2013 Report Share Posted October 26, 2013 Those else if statements need nested, I think I know how to write it out, ranoko and I will test it later Link to comment Share on other sites More sharing options...
ranoko Posted October 26, 2013 Report Share Posted October 26, 2013 im not a scripter, but, if u put an ELSE statment on every check ? like this if (_playerID in AG_epoch_top) then { _inventory = [["NVGoggles","ItemEtool","ItemGps","M4A1_AIM_SD_camo","glock17_EP1","ItemKeyKit","ItemMatchbox"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemGoldBar","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemBloodbag","ItemAntibiotic","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage","ItemMorphine","ItemTinBar","ItemTinBar","PartGeneric"]]; _backpack = ["DZ_British_ACU",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_mid) then { _inventory = [["NVGoggles","ItemEtool","ItemMap","bizon_silenced","ItemMatchbox"], ["64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]]; _backpack = ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_low) then { _inventory = [["ItemEtool","glock17_EP1","ItemMatchbox","ItemMap"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]]; _backpack = ["DZ_Patrol_Pack_EP1",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_admin) then { _inventory = [["ItemGPS","NVGoggles","ItemFlashlight","ItemWatch","ItemCompass","M9SD","M4A1_AIM_SD_camo","ItemMatchbox"], ["15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBloodbag","ItemPainkiller","ItemEpinephrine","ItemAntibiotic","ItemMorphine","ItemWaterbottle","FoodCanBakedBeans"]]; _backpack = ["DZ_LargeGunBag_EP1",[[],[]],[[],[]]]; } else { _inventory = []; _backpack = []; }; can someone check this ? i am going to try and check this later. I think the code has to read else if but im not 100% sure either. If i have time ill try and check it both ways. or if someone else is willing to take a stab : ) so it would look like this? else if (_playerID in AG_epoch_top) then {_inventory = [["NVGoggles","ItemEtool","ItemGps","M4A1_AIM_SD_camo","glock17_EP1","ItemKeyKit","ItemMatchbox"], ["17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemGoldBar","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemBloodbag","ItemAntibiotic","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage","ItemMorphine","ItemTinBar","ItemTinBar","PartGeneric"]];_backpack = ["DZ_British_ACU",[[],[]],[[],[]]]; } else if (_playerID in AG_epoch_mid) then {_inventory = [["NVGoggles","ItemEtool","ItemMap","bizon_silenced","ItemMatchbox"], ["64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","64Rnd_9x19_SD_Bizon","ItemBloodbag","ItemSodaCoke","FoodCanBakedBeans","ItemBandage","ItemBandage"]];_backpack = ["DZ_ALICE_Pack_EP1",[[],[]],[[],[]]]; } else if and so on? Link to comment Share on other sites More sharing options...
axeman Posted October 26, 2013 Report Share Posted October 26, 2013 http://dayzepoch.com/forum/index.php?/topic/2638-donator-gear-with-database/#entry18914 karena 1 Link to comment Share on other sites More sharing options...
karena Posted October 27, 2013 Report Share Posted October 27, 2013 nice axem :D p.s. in my code i LOSE some " { " for every ELSE must : open after ELSE and before IF { and close all at end of script. Link to comment Share on other sites More sharing options...
axeman Posted October 27, 2013 Report Share Posted October 27, 2013 You can use if(<condition>)then{<do something>}else{<do something else>}; You can even use an array for the then statement: http://community.bistudio.com/wiki/if There is no else if. Rather than nest more if then statements use switch / case: http://community.bistudio.com/wiki/switch (is essentially the same thing as nesting and much tidier). Link to comment Share on other sites More sharing options...
johnnytorrance Posted October 27, 2013 Report Share Posted October 27, 2013 I'm really new at this coding stuff. I dont want admin loadouts or donator loadouts. I just want everyone to start with a certain load out. something other that a little tiny backpack, a bandage and pain killers. can someone direct me to where i can go to get that changed? Link to comment Share on other sites More sharing options...
cen Posted November 1, 2013 Report Share Posted November 1, 2013 DefaultMagazines = ["ItemBandage","ItemPainkiller"]; DefaultWeapons = ["ItemFlashlight"]; DefaultBackpack = ""; DefaultBackpackWeapon = ""; Add that to init.sqf in the config section and customize to your liking. Remember that cools like map/compass/etc are considered weapons. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now