Loadout-Vorgabe an die Spieler
Ihr möchtet in eurer Mission das Loadout vorgeben? Das könnt ihr je nach Spieler ID regeln, durch den Classnamen der Einheit und wenn beides nicht erforderlich ist oder ihr zb. einen Classnamen vergessen habt, kann man auf den default (Grundwert) zurückgreifen ...
Für die InitPlayer.sqf
_unit = param [0,objNull,[objNull]];
IF(!local _unit) exitwith {};_uid = getPlayerUID _unit;
switch(_uid) Do {
// spieler mit ID
case "78544855557": {[_unit] execVM "loadout\operationsleitung.sqf";
};case "333344557": {
[_unit] execVM "loadout\operationsleitung.sqf";
};default {
// Nach Classnames
switch(typeOf _unit) do {
// TrpFhr CO
case "B_officer_F" : { [_unit] execVM "loadout\trpfhr.sqf"; };
// Arzt
case "B_medic_F" : { [_unit] execVM "loadout\medic.sqf"; };
// Pionier
case "B_soldier_exp_F" : { [_unit] execVM "loadout\pionier.sqf"; };
// Grenadier
case "B_support_GMG_F" : { [_unit] execVM "loadout\grenadier.sqf"; };
//MG
case "B_soldier_AR_F" : { [_unit] execVM "loadout\mg.sqf"; };
//sniper
case "B_Soldier_F" : { [_unit] execVM "loadout\grenadier.sqf"; };
//Panzerabwehr
case "B_Soldier_F" : { [_unit] execVM "loadout\pzabwehr.sqf"; };
default {
//sollte Einheit oder Spieler ID nicht bekannt sein
[_unit] execVM "loadout\rifle.sqf";
};
};
};
};
Als Beispiel ein Loadout als Arsenalausgabe. Dh. Ihr könnt Eure Einheit im Virtual Arsenal zusammenstellen, dann exportieren und in einer .sqf Datei speichern. Das Beispiel dazu:
waitUntil {!isNull player};
_unit = _this select 0;
IF(!local _unit) exitwith {};for "_i" from 1 to 3 do {_unit addItemToUniform "rhs_mag_30Rnd_556x45_Mk318_Stanag";};
for "_i" from 1 to 2 do {_unit addItemToUniform "rhsusf_mag_15Rnd_9x19_FMJ";};_unit addItemToVest "rhsusf_acc_ACOG2_USMC";
for "_i" from 1 to 5 do {_unit addItemToVest "ACE_CableTie";};
_unit addItemToVest "rhsusf_acc_nt4_black";
for "_i" from 1 to 2 do {_unit addItemToVest "rhsusf_mag_15Rnd_9x19_JHP";};
for "_i" from 1 to 8 do {_unit addItemToVest "rhs_mag_30Rnd_556x45_Mk318_Stanag";};
_unit addItemToVest "SmokeShellYellow";
_unit addItemToVest "SmokeShellRed";_unit addItemToBackpack "ACE_EarPlugs";
_unit addItemToBackpack "ACE_Flashlight_XL50";
for "_i" from 1 to 15 do {_unit addItemToBackpack "ACE_quikclot";};
for "_i" from 1 to 25 do {_unit addItemToBackpack "ACE_morphine";};
for "_i" from 1 to 15 do {_unit addItemToBackpack "ACE_elasticBandage";};
for "_i" from 1 to 15 do {_unit addItemToBackpack "ACE_packingBandage";};
for "_i" from 1 to 25 do {_unit addItemToBackpack "ACE_fieldDressing";};
for "_i" from 1 to 12 do {_unit addItemToBackpack "ACE_epinephrine";};
for "_i" from 1 to 2 do {_unit addItemToBackpack "ACE_plasmaIV_250";};
for "_i" from 1 to 2 do {_unit addItemToBackpack "ACE_bloodIV_250";};
for "_i" from 1 to 4 do {_unit addItemToBackpack "ACE_salineIV_250";};
for "_i" from 1 to 2 do {_unit addItemToBackpack "ACE_bloodIV_500";};
for "_i" from 1 to 2 do {_unit addItemToBackpack "ACE_plasmaIV_500";};
for "_i" from 1 to 6 do {_unit addItemToBackpack "ACE_personalAidKit";};
_unit addItemToBackpack "ACE_surgicalKit";
_unit addItemToBackpack "ACE_DefusalKit";
comment "Add weapons";
_unit addWeapon "rhs_weap_m4a1_carryhandle_grip";
_unit addPrimaryWeaponItem "rhsusf_acc_anpeq15side";
_unit addWeapon "rhsusf_weap_m9";
_unit addWeapon "Rangefinder";comment "Add items";
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "tf_microdagr";
_unit linkItem "tf_anprc152_1";
_unit linkItem "ItemGPS";
_unit linkItem "rhsusf_ANPVS_15";
if (true) exitWith {};
Wichtig! In dieser .sqf alle this einträge auf _unit ändern. Wie in diesem Beispiel einfach verfahren.