Suchergebnisse: *Es können bis zu maximal 15 Ergebnisse auf einmal angezeigt werden*

ACCESS DENIED!

Error!

ACCESS GRANTED!

Success!

ACCESS DENIED!

Error!

ACCESS GRANTED!

Success!

ARMA 3 Editor:

 Loadout - initPlayerLocal.sqf

Titelbild

Loadout - initPlayerLocal.sqf


Um feste Loadouts dem Spielern zuzuordnen, nutzt man am besten die initPlayerLocal.sqf. Mein Beispiel ist in 3 mögliche Optionen unterteilt:

  • nach Spieler ID
  • nach Classname der platzierten Einheit
  • default - falls keine der oberen Optionen zutrifft

 

Die  initPlayerLocal.sqf (Beispiel):

_unit = param [0,objNull,[objNull]];
IF(!local _unit) exitwith {};

_null     =    _unit     execVM "briefing\briefing.sqf"
_null     =    _unit     execVM "mission\mission1.sqf"

_uid = getPlayerUID _unit;

hint format["Willkommen, %1", name player];
switch(_uid) Do {

// Nach Classnames
switch(typeOf _unit) do {

// Nach Classnames switch(typeOf _unit) do {

// Teamleader case "B_Soldier_TL_F" : { [_unit] execVM "loadout\rifle.sqf"; };

//Sanitäter case "B_medic_F": { [_unit] execVM "loadout\medic.sqf"; };

//Grenadier case "B_Soldier_GL_F": { [_unit] execVM "loadout\grenadier.sqf"; };

//Sprengmeister case "B_soldier_exp_F": { [_unit] execVM "loadout\demolition.sqf"; };

//Scharfschütze case "B_soldier_M_F": { [_unit] execVM "loadout\sniper.sqf"; };

//MG case "B_soldier_AR_F": { [_unit] execVM "loadout\mg.sqf"; };

//Schütze case "B_Soldier_F": { [_unit] execVM "loadout\rifle.sqf"; };

//pzabwehr case "B_soldier_LAT_F": { [_unit] execVM "loadout\pzabwehr.sqf"; };

default { //sollte Einheit oder Spieler ID nicht bekannt sein

[_unit] execVM "loadout\rifle.sqf"

; }

; }

; }

; };

 

Dazu einmal das Loadout des Rifles (BEISPIEL).

Der hier markierte Bereich kommt aus dem Virtual Arsenal... hier einfach this gegen _unit austauschen und in die Datei einfügen:

rifle.sqf

waitUntil {!isNull player};   
_unit = _this select 0;    
IF(!local _unit) exitwith {};

// ARSENAL ANFANG
comment "Remove existing items"
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;

comment "Add containers";
_unit forceAddUniform "TRYK_U_B_3c";
for "_i" from 1 to 3 do {_unit addItemToUniform "ACE_CableTie";};
for "_i" from 1 to 3 do {_unit addItemToUniform "rhsusf_mag_7x45acp_MHP";};
_unit addItemToUniform "SmokeShellRed";
_unit addVest "TRYK_V_ArmorVest_tan2";
_unit addItemToVest "ACE_personalAidKit";
_unit addItemToVest "ACE_DefusalKit";
_unit addItemToVest "ACE_Flashlight_XL50";
for "_i" from 1 to 5 do {_unit addItemToVest "ACE_fieldDressing";};
for "_i" from 1 to 3 do {_unit addItemToVest "ACE_packingBandage";};
for "_i" from 1 to 2 do {_unit addItemToVest "ACE_elasticBandage";};
_unit addItemToVest "rhsusf_acc_eotech_552";
_unit addItemToVest "TRYK_H_Booniehat_3CD";
for "_i" from 1 to 9 do {_unit addItemToVest "hlc_30rnd_556x45_EPR";};
_unit addBackpack "B_AssaultPack_mcamo";
for "_i" from 1 to 5 do {_unit addItemToBackpack "ACE_fieldDressing";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "ACE_packingBandage";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "ACE_elasticBandage";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "ACE_morphine";};
_unit addItemToBackpack "ACE_personalAidKit";
for "_i" from 1 to 5 do {_unit addItemToBackpack "ACE_CableTie";};
_unit addItemToBackpack "ACE_EarPlugs";
for "_i" from 1 to 3 do {_unit addItemToBackpack "ACE_quikclot";};
_unit addItemToBackpack "SmokeShellRed";
_unit addItemToBackpack "SmokeShellGreen";
for "_i" from 1 to 2 do {_unit addItemToBackpack "Chemlight_green";};
for "_i" from 1 to 2 do {_unit addItemToBackpack "Chemlight_red";};
for "_i" from 1 to 4 do {_unit addItemToBackpack "ACE_M84";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "hlc_30rnd_556x45_EPR";};
for "_i" from 1 to 4 do {_unit addItemToBackpack "HandGrenade";};
_unit addHeadgear "TRYK_H_Helmet_3C";
_unit addGoggles "G_Bandanna_khk"

comment "Add weapons";
_unit addWeapon "hlc_rifle_CQBR";
_unit addPrimaryWeaponItem "rhsusf_acc_nt4_black";
_unit addPrimaryWeaponItem "BWA3_acc_LLM01_irlaser";
_unit addPrimaryWeaponItem "rhsusf_acc_ACOG2_USMC";
_unit addWeapon "rhsusf_weap_m1911a1";
_unit addWeapon "Rangefinder"

comment "Add items";
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "tf_microdagr";
_unit linkItem "tf_anprc152_2";
_unit linkItem "TRYK_Shemagh_shade_N";
_unit linkItem "ItemGPS"

 

// ARSENAL ENDE

if (true) exitWith {};

Die letzten Einträge