Ghostman Posted June 10, 2017 Report Share Posted June 10, 2017 How can i add something like money for new players but a starter pack (scroll menu). Do you know what i mean Link to comment Share on other sites More sharing options...
Relentless Posted June 10, 2017 Report Share Posted June 10, 2017 You can add start money for new players by changing some code in server_playerLogin.sqf. Spoiler In dayz_server\compile\server_playerLogin.sqf find: PVCDZ_plr_Login = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected,_group,_CharacterCoins,_playerCoins,_BankCoins]; If you want to give the player (so coins are on the body) 5k coins, add this line before it: if (_newPlayer) then {_characterCoins = 5000}; If you want to give the player 5k coins into their bank, add this line instead: if (_newPlayer) then {_bankCoins = 5000}; Source: @salival's ZSC instructions: https://github.com/oiad/ZSC salival 1 Link to comment Share on other sites More sharing options...
Ghostman Posted June 11, 2017 Author Report Share Posted June 11, 2017 I have already added money to new players, but I want to add a starter pack with building Link to comment Share on other sites More sharing options...
Relentless Posted June 11, 2017 Report Share Posted June 11, 2017 Something like a crate in their inventory with building supplies? Link to comment Share on other sites More sharing options...
Ghostman Posted June 11, 2017 Author Report Share Posted June 11, 2017 no spawn box with building Link to comment Share on other sites More sharing options...
juandayz Posted June 11, 2017 Report Share Posted June 11, 2017 @Ghostman 1-open your server_playersetup.spf find this line: PVCDZ_plr_Login2 = [_worldspace,_state]; replace by: PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot]; save, and repack your pbo. 2-At bottom of init.sqf paste: startkit = compile preprocessFileLineNumbers "startkit.sqf"; waitUntil {!isNil ("PVDZ_plr_LoginRecord")}; if (PVCDZ_plr_Login2 select 2) then { player spawn startkit; }; 3-create startkit.sqf (mpmissions\your instance\ ) startkit.sqf Spoiler private ["enter all variables here please"]; systemchat "this is a gift for new players"; sleep 1; _mypos = getposATL player; _dir = getdir player; _mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)]; _crate = createVehicle ["USOrdnanceBox_EP1",_mypos,[], 0, "CAN_COLLIDE"]; _crate setDir _dir; _crate setposATL _mypos; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearBackpackCargoGlobal _crate; //////FILL THE CRATE //weapons && tools below _crate addWeaponCargoGlobal ["ItemToolbox", 2]; _crate addWeaponCargoGlobal ["ItemEtool", 2]; _crate addWeaponCargoGlobal ["ItemCompass", 2]; _crate addWeaponCargoGlobal ["Binocular", 2]; // items below _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["FoodCanSardines", 10]; _crate addMagazineCargoGlobal ["ItemEpinephrine", 10]; waitUntil {(player distance _crate) > 20}; deleteVehicle _crate; Link to comment Share on other sites More sharing options...
Ghostman Posted June 13, 2017 Author Report Share Posted June 13, 2017 On 11.06.2017 at 7:31 PM, juandayz said: @Ghostman 1-open your server_playersetup.spf find this line: PVCDZ_plr_Login2 = [_worldspace,_state]; replace by: PVCDZ_plr_Login2 = [_worldspace,_state,_randomSpot]; save, and repack your pbo. 2-At bottom of init.sqf paste: startkit = compile preprocessFileLineNumbers "startkit.sqf"; waitUntil {!isNil ("PVDZ_plr_LoginRecord")}; if (PVCDZ_plr_Login2 select 2) then { player spawn startkit; }; 3-create startkit.sqf (mpmissions\your instance\ ) startkit.sqf Reveal hidden contents private ["enter all variables here please"]; systemchat "this is a gift for new players"; sleep 1; _mypos = getposATL player; _dir = getdir player; _mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)]; _crate = createVehicle ["USOrdnanceBox_EP1",_mypos,[], 0, "CAN_COLLIDE"]; _crate setDir _dir; _crate setposATL _mypos; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearBackpackCargoGlobal _crate; //////FILL THE CRATE //weapons && tools below _crate addWeaponCargoGlobal ["ItemToolbox", 2]; _crate addWeaponCargoGlobal ["ItemEtool", 2]; _crate addWeaponCargoGlobal ["ItemCompass", 2]; _crate addWeaponCargoGlobal ["Binocular", 2]; // items below _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["FoodCanSardines", 10]; _crate addMagazineCargoGlobal ["ItemEpinephrine", 10]; waitUntil {(player distance _crate) > 20}; deleteVehicle _crate; I'm sorry for the late reply but unfortunately this script does not work Link to comment Share on other sites More sharing options...
Ghostman Posted June 13, 2017 Author Report Share Posted June 13, 2017 in server_playersetup.spf PVCDZ_plr_Login2 = [[0,respawn_west_original],_state,_worldspace,_randomSpot,([_randomSpot,_playerID] call spawn_config)]; and sarver can't run 119 sec server to start ..... Link to comment Share on other sites More sharing options...
juandayz Posted June 13, 2017 Report Share Posted June 13, 2017 Just now, Ghostman said: in server_playersetup.spf PVCDZ_plr_Login2 = [[0,respawn_west_original],_state,_worldspace,_randomSpot,([_randomSpot,_playerID] call spawn_config)]; and sarver can't run 119 sec server to start ..... well now i see youre using ESSV3... this change the things Link to comment Share on other sites More sharing options...
Ghostman Posted June 13, 2017 Author Report Share Posted June 13, 2017 yes i am using essv3, but your script spawn box only for new players on scroll mouse or near player when they spawn on ground? Link to comment Share on other sites More sharing options...
juandayz Posted June 13, 2017 Report Share Posted June 13, 2017 Just now, Ghostman said: yes i am using essv3, but your script spawn box only for new players on scroll mouse or near player when they spawn on ground? for fresh spawns.. they die.. they have a crate. If they log out and relog again then dsnt have a crate. Why you just not use the loadout and config class from ESSV3? Link to comment Share on other sites More sharing options...
Ghostman Posted June 13, 2017 Author Report Share Posted June 13, 2017 I already know what this is script Instead of a box you can set a vehicle Now looking for script you can only one times spawn box. I saw it on another server Link to comment Share on other sites More sharing options...
juandayz Posted June 13, 2017 Report Share Posted June 13, 2017 the one that i give you works, but with out essv3 im using it... but you need change the part in init cuz select 2 is not _randSpot if u use ESsv3 im fixing other thing.. when i fininish gonna install essv3 and give a try with this Link to comment Share on other sites More sharing options...
Ghostman Posted June 13, 2017 Author Report Share Posted June 13, 2017 no problem and thx for your help juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted June 14, 2017 Report Share Posted June 14, 2017 Just now, Ghostman said: no problem and thx for your help ok my friend this is what i wrote for you.. i made some tests and works fine. If u see that meet your expectations please post in arma2/mod forums for everyone. **Note: its only for user of ESSV3 1-You will need open your init.sqf and at very very very bottom paste: waitUntil {!isNil ("PVDZ_plr_LoginRecord")}; if (PVCDZ_plr_Login2 select 3) then { _text = "Claim My Box"; s_player_box = player addAction [format["%1",_text], "scripts\player_startkit.sqf"]; }; 2- into mpmissions\the instance that youre using\scripts\ create this file: player_startkit.sqf (customize the options and the loot at your taste) Spoiler private ["_mypos","_dir","_crate","_inVehicle","_flypos","_msg","_lootOption","_loot_lists","_loot"]; _inVehicle = (vehicle player != player); if (_inVehicle) exitWith {systemchat "<PREVENTION>:Cannot Do it in vehicles";}; _flypos = ((getPosATL (vehicle player)) select 2); if (_flypos > 3) exitWith {systemchat "<PREVENTION>:you must be in the ground";}; //Prevention for HALO SPAWNS since i notice that youre runnig ESSV3 player removeAction s_player_box; s_player_box -1; //=========USER CONFIG============\\ _lootOption = 1; //1 randomize loot //0 allways same loot _msg = 0; //0 uses hint //1 uses systemchat _crateType = "USOrdnanceBox_EP1"; //=========USER CONFIG============\\ if (_msg != 1) then {hint "<SERVER>:GIFT FOR FRESH SPAWNS";}else{systemchat ">SERVER<: GIFT FOR FRESH SPAWNS";}; _mypos = getposATL player; _dir = getdir player; _mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)]; _crate = createVehicle [_crateType,_mypos,[], 0, "CAN_COLLIDE"]; _crate setDir _dir; _crate setposATL _mypos; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearBackpackCargoGlobal _crate; //////FILL THE CRATE if (_lootOption !=1) then { //=============================IF URE USING _lootOption = 0; customize below the loot==========\\ //weapons && tools below _crate addWeaponCargoGlobal ["ItemToolbox", 2]; _crate addWeaponCargoGlobal ["ItemEtool", 2]; _crate addWeaponCargoGlobal ["ItemCompass", 2]; _crate addWeaponCargoGlobal ["Binocular", 2]; // items below _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["FoodCanSardines", 10]; _crate addMagazineCargoGlobal ["ItemEpinephrine", 10]; //=============================IF URE USING _lootOption = 0; customize above the loot==========\\ }else{ //=============================IF URE USING _lootOption = 1; customize below the loot==========\\ _loot_lists = [ [ ["ChainSawR","ItemSledge","ItemPickaxe"], ["CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","PartGeneric"] ], [ ["ItemKeyKit"], ["ItemAntibiotic","ItemBandage","equip_herb_box","ItemGoldBar10oz"] ], [ ["ItemHatchet","ItemMachete","ItemPickaxe","ItemSledge"], ["ItemRuby","ItemMixOil","plot_pole_kit"] ], [ ["ChainSaw"], ["ItemDesertTent","ItemGenerator","equip_brick"] ], [ ["MP5_DZ"], ["ItemComboLock","ItemVault","ItemLockBox"] ] ]; //=============================IF URE USING _lootOption = 1; customize above the loot==========\\ _loot = _loot_lists call BIS_fnc_selectRandom; { _crate addWeaponCargoGlobal [_x,1]; } forEach (_loot select 0); { _crate addMagazineCargoGlobal [_x,1]; } forEach (_loot select 1); }; waitUntil {(player distance _crate) > 20}; deleteVehicle _crate; 3-open your custom variables.sqf Spoiler find: dayz_resetSelfActions = { and before the bracket }; who close this section paste: s_player_box -1; example: //Player self-action handles dayz_resetSelfActions = { //a LOT //OF //DEFAULT //ACTIONS // Custom below s_givemoney_dialog = -1; s_bank_dialog = -1; s_player_checkWallet = -1; s_player_box -1; }; Remember suicide you until test it.. cuz only fresh spawns are allowed to spawns crates. Hooty 1 Link to comment Share on other sites More sharing options...
oldmatechoc Posted June 14, 2017 Report Share Posted June 14, 2017 @juandayz hahahahahah i just made the same thing! heres mine https://puu.sh/wjs7d/3532f145ef.rar Install. in your init.sqf // Find execFSM "\z\addons\dayz_code\system\player_monitor.fsm"; // Paste below [] execVM "dayz_code\external\starter_crate\new_player.sqf"; Hooty and juandayz 2 Link to comment Share on other sites More sharing options...
juandayz Posted June 14, 2017 Report Share Posted June 14, 2017 Just now, oldmatechoc said: @juandayz hahahahahah i just made the same thing! ahaaha you needs credits? LOL post yours!!!! Hooty and oldmatechoc 2 Link to comment Share on other sites More sharing options...
juandayz Posted June 14, 2017 Report Share Posted June 14, 2017 @oldmatechoc now @Ghostman is between the sword and the wall... we gonna get ungry when he pick the choise.. unless it comes mr clean and do it better JohnnyBravo666 1 Link to comment Share on other sites More sharing options...
Hooty Posted June 14, 2017 Report Share Posted June 14, 2017 4 minutes ago, juandayz said: @oldmatechoc now @Ghostman is between the sword and the wall... we gonna get ungry when he pick the choise.. unless it comes mr clean and do it better lol Link to comment Share on other sites More sharing options...
juandayz Posted June 14, 2017 Report Share Posted June 14, 2017 Just now, Hooty said: lol just cleandirella for friends Link to comment Share on other sites More sharing options...
juandayz Posted June 14, 2017 Report Share Posted June 14, 2017 well back to the reallity: @Ghostman 2 ways are better than 2.. here you got: Spoiler Just now, juandayz said: ok my friend this is what i wrote for you.. i made some tests and works fine. If u see that meet your expectations please post in arma2/mod forums for everyone. **Note: its only for user of ESSV3 1-You will need open your init.sqf and at very very very bottom paste: waitUntil {!isNil ("PVDZ_plr_LoginRecord")}; if (PVCDZ_plr_Login2 select 3) then { _text = "Claim My Box"; s_player_box = player addAction [format["%1",_text], "scripts\player_startkit.sqf"]; }; 2- into mpmissions\the instance that youre using\scripts\ create this file: player_startkit.sqf (customize the options and the loot at your taste) Reveal hidden contents private ["_mypos","_dir","_crate","_inVehicle","_flypos","_msg","_lootOption","_loot_lists","_loot"]; _inVehicle = (vehicle player != player); if (_inVehicle) exitWith {systemchat "<PREVENTION>:Cannot Do it in vehicles";}; _flypos = ((getPosATL (vehicle player)) select 2); if (_flypos > 3) exitWith {systemchat "<PREVENTION>:you must be in the ground";}; //Prevention for HALO SPAWNS since i notice that youre runnig ESSV3 player removeAction s_player_box; s_player_box -1; //=========USER CONFIG============\\ _lootOption = 1; //1 randomize loot //0 allways same loot _msg = 0; //0 uses hint //1 uses systemchat _crateType = "USOrdnanceBox_EP1"; //=========USER CONFIG============\\ if (_msg != 1) then {hint "<SERVER>:GIFT FOR FRESH SPAWNS";}else{systemchat ">SERVER<: GIFT FOR FRESH SPAWNS";}; _mypos = getposATL player; _dir = getdir player; _mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)]; _crate = createVehicle [_crateType,_mypos,[], 0, "CAN_COLLIDE"]; _crate setDir _dir; _crate setposATL _mypos; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearBackpackCargoGlobal _crate; //////FILL THE CRATE if (_lootOption !=1) then { //=============================IF URE USING _lootOption = 0; customize below the loot==========\\ //weapons && tools below _crate addWeaponCargoGlobal ["ItemToolbox", 2]; _crate addWeaponCargoGlobal ["ItemEtool", 2]; _crate addWeaponCargoGlobal ["ItemCompass", 2]; _crate addWeaponCargoGlobal ["Binocular", 2]; // items below _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["FoodCanSardines", 10]; _crate addMagazineCargoGlobal ["ItemEpinephrine", 10]; //=============================IF URE USING _lootOption = 0; customize above the loot==========\\ }else{ //=============================IF URE USING _lootOption = 1; customize below the loot==========\\ _loot_lists = [ [ ["ChainSawR","ItemSledge","ItemPickaxe"], ["CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","PartGeneric"] ], [ ["ItemKeyKit"], ["ItemAntibiotic","ItemBandage","equip_herb_box","ItemGoldBar10oz"] ], [ ["ItemHatchet","ItemMachete","ItemPickaxe","ItemSledge"], ["ItemRuby","ItemMixOil","plot_pole_kit"] ], [ ["ChainSaw"], ["ItemDesertTent","ItemGenerator","equip_brick"] ], [ ["MP5_DZ"], ["ItemComboLock","ItemVault","ItemLockBox"] ] ]; //=============================IF URE USING _lootOption = 1; customize above the loot==========\\ _loot = _loot_lists call BIS_fnc_selectRandom; { _crate addWeaponCargoGlobal [_x,1]; } forEach (_loot select 0); { _crate addMagazineCargoGlobal [_x,1]; } forEach (_loot select 1); }; waitUntil {(player distance _crate) > 20}; deleteVehicle _crate; 3-open your custom variables.sqf Reveal hidden contents find: dayz_resetSelfActions = { and before the bracket }; who close this section paste: s_player_box -1; example: //Player self-action handles dayz_resetSelfActions = { //a LOT //OF //DEFAULT //ACTIONS // Custom below s_givemoney_dialog = -1; s_bank_dialog = -1; s_player_checkWallet = -1; s_player_box -1; }; Remember suicide you until test it.. cuz only fresh spawns are allowed to spawns crates. Spoiler Just now, oldmatechoc said: @juandayz hahahahahah i just made the same thing! heres mine https://puu.sh/wjs7d/3532f145ef.rar Install. in your init.sqf // Find execFSM "\z\addons\dayz_code\system\player_monitor.fsm"; // Paste below [] execVM "dayz_code\external\starter_crate\new_player.sqf"; Link to comment Share on other sites More sharing options...
JohnnyBravo666 Posted August 3, 2017 Report Share Posted August 3, 2017 On 6/13/2017 at 10:10 PM, juandayz said: well back to the reallity: @Ghostman 2 ways are better than 2.. here you got: Reveal hidden contents Reveal hidden contents What about somehow tying the starter kit somehow to the player Id once they have claimed it. I was just testing this out and I relogged on my test server and now I don't have the option. This way if we can somehow tie it to the player ID, they can at least come back later if they haven't found a spot yet to claim the kit. Link to comment Share on other sites More sharing options...
salival Posted August 3, 2017 Report Share Posted August 3, 2017 28 minutes ago, JohnnyBravo666 said: What about somehow tying the starter kit somehow to the player Id once they have claimed it. I was just testing this out and I relogged on my test server and now I don't have the option. This way if we can somehow tie it to the player ID, they can at least come back later if they haven't found a spot yet to claim the kit. I do this on my server using extDB, on player login I run a query to see if the player has gotten their start kit yet, if not I addaction for the starterkit script. Link to comment Share on other sites More sharing options...
JohnnyBravo666 Posted August 3, 2017 Report Share Posted August 3, 2017 9 minutes ago, salival said: I do this on my server using extDB, on player login I run a query to see if the player has gotten their start kit yet, if not I addaction for the starterkit script. How would you do a Query ? I'm not even sure how to start with that. Link to comment Share on other sites More sharing options...
juandayz Posted August 4, 2017 Report Share Posted August 4, 2017 11 hours ago, JohnnyBravo666 said: How would you do a Query ? I'm not even sure how to start with that. His talking about a sql function..something like find vehicles without keys. Its a good idea. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now