Hello,
I have put the following into
server_playerLogin.sqf:
This works fine, when you spawn on the server you are given the above items.
How can I create a Custom Loadout based on UID ?
I have tried to mix and match some code to get this working but can't figure it out
In
init.sqf
loadout.sqf
In Scripts\Loadout\:
1.sqf
I literally just want to be able to add some UID's to the loadout.sqf file which would have them receive a different set of starting gear.
Can anyone please help me to get this working,,
Many thanks
I have put the following into
server_playerLogin.sqf:
Code:
//Variables
_inventory = [["glock17_EP1","ItemHatchet","ItemMap","ItemToolbox"], ["ItemAntibiotic","ItemBandage","ItemBloodbag","ItemMorphine","17Rnd_9x19_glock17","17Rnd_9x19_glock17"]];
_backpack = [];
_items = [];
_magazines = [];
_weapons = [];
_medicalStats = [];
_survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;
This works fine, when you spawn on the server you are given the above items.
How can I create a Custom Loadout based on UID ?
I have tried to mix and match some code to get this working but can't figure it out
In
init.sqf
Code:
if (!isDedicated) then {
[] ExecVM "custom_monitor.sqf";
[] ExecVM "loadout.sqf";
[] execVM "Scripts\kh_actions.sqf";
if (dayz_POIs) then { execVM "\z\addons\dayz_code\system\mission\chernarus\poi\init.sqf"; };
loadout.sqf
Code:
//Written by Matt L http://opendayz.net/members/matt-l.7134/
// 5/12/2014
//Feel free to edit to your liking, just give credit where it is due!
//Thanks to Armbot for the idea && test server
if ((getPlayerUID player) in ["########"]) then { //Clan: Name, Name
_pathToScriptsHero1 = "Scripts\Loadout\";
_scriptArrayHero1 = "1.sqf";
_randomScriptHero1 = [_scriptArrayHero1] call BIS_fnc_selectRandom;
[] execVM format["%1%2",_pathToScriptsHero1,_randomScriptHero1];
sleep 2;
};
In Scripts\Loadout\:
1.sqf
Code:
//Written by Matt L http://opendayz.net/members/matt-l.7134/
// 5/12/2014
//Feel free to edit to your liking, just give credit where it is due!
//Thanks to Armbot for the idea && test server
if (dayz_combat == 1) then {
titleText ["wut.", "PLAIN DOWN", 3];
sleep 5;
titleFadeOut 1;
} else {
player addWeapon 'MeleeHatchet';
player addWeapon 'M9';
player selectWeapon 'M9';
player addMagazine '15Rnd_9x19_M9';
player addMagazine 'ItemMorphine';
player addMagazine 'ItemSodaMdew';
player addMagazine 'FoodCanBakedBeans';
player addMagazine 'ItemPainkiller';
player addMagazine 'ItemBandage';
player addMagazine 'ItemBandage';
player addWeapon 'ItemMap';
player addWeapon 'ItemKnife';
player addWeapon 'ItemEtool';
removeBackpack player;
player addBackPack "DZ_CompactPack_EP1";
reload player;
cuttext ["you are a hero level 1", "PLAIN DOWN"];
sleep 2;
};
I literally just want to be able to add some UID's to the loadout.sqf file which would have them receive a different set of starting gear.
Can anyone please help me to get this working,,
Many thanks