schadler17
Member-
Content Count
137 -
Joined
-
Last visited
-
Medals
Everything posted by schadler17
-
// Squad Rallypoint System // Written By Schadler.C _unit = _this select 0; _type = typeOf _unit; _unitPos = _unit modelToWorld [0,2,0]; _srpPos = [_unitPos select 0, _unitPos select 1, ((getPosATL _unit) select 2)]; _safeZone = getMarkerPos "westSafeZone"; _surface = surfaceNormal _srpPos; _searchRadius = 100; _position = getPos _unit; _friendlySide = WEST; _neutralSide = CIVILIAN; _enemyArray = _position nearEntities [["AllVehicles"], _searchRadius]; // Check for nearby enemies { if ((side _x == _friendlySide) || (side _x == _neutralSide)) then { _enemyArray = _enemyArray - [_x]; }; } count _enemyArray; if ((count _enemyArray) > 0) exitWith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>Enemies are too close! (100m)<br/><br/>Secure the area before deploying a Rallypoint!"]; }; // Check for nearby safezone if ((_unit distance _safezone) < 250) exitwith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You are too close to main base to deploy a rallypoint!"]; }; // Check for player in vehicle if (vehicle _unit != player) exitwith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You must be on foot to deploy a rallypoint!"]; }; // Check for Cooldowns if ((_unit == SL1) && (r1Cooldown == 1)) exitWith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You must wait 5 minutes after placing a rally to deploy another!"]; }; if ((_unit == SL2) && (r2Cooldown == 1)) exitWith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You must wait 5 minutes after placing a rally to deploy another!"]; }; if ((_unit == SL3) && (r3Cooldown == 1)) exitWith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You must wait 5 minutes after placing a rally to deploy another!"]; }; if ((_unit == SL4) && (r4Cooldown == 1)) exitWith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You must wait 5 minutes after placing a rally to deploy another!"]; }; if ((_unit == SL5) && (r5Cooldown == 1)) exitWith { hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You must wait 5 minutes after placing a rally to deploy another!"]; }; // If checks pass if (true) then { _passed = 1; _units = units group _unit; _x = count _units; _y = 0; _z = _x - 1; if (_x < 2) exitwith { _passed=0; hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You need at least 2 squad members to place a rally!"]; }; while {_z > -1} do { if ((_units select _z) distance _unit > 20) then { _y = _y + 1; }; if ((_y > _x - 2) and _z == 0) exitwith { _passed=0; hint parseText format ["<t size = '1.5' color = '#FF0000'>Not Available!</t><br/><br/>You need at least one squad member within 20m of you to place a rally!"]; }; _z = _z - 1 }; if (_passed == 1) then { if ((_unit == SL1) && (_type == "rhsusf_usmc_marpat_d_squadleader")) then { if (!(isNil "rally1")) exitWith { // Delete Existing Rallypoint deleteVehicle rally1; deleteMarker "rMarker1"; srp1 call BIS_fnc_removeRespawnPosition; // Deploy New Rallypoint r1Cooldown=1; rally1 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally1 setDir ((getDir _unit)-90); rally1 setVectorUp _surface; rally1 enableSimulation false; rally1 addEventHandler ["HandleDamage",{0}]; _rMarker1 = createMarker ["rMarker1", position rally1]; "rMarker1" setMarkerText "SRP - [Alpha]"; "rMarker1" setmarkershape "ICON"; "rMarker1" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp1 = [(group _unit), (getPos rally1), "Squad Rally Point [Alpha]"] call bis_fnc_addRespawnPosition; sleep 300; r1Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally1; deleteMarker "rMarker1"; srp1 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; r1Cooldown=1; rally1 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally1 setDir ((getDir _unit)-90); rally1 setVectorUp _surface; rally1 enableSimulation false; rally1 addEventHandler ["HandleDamage",{0}]; _rMarker1 = createMarker ["rMarker1", position rally1]; "rMarker1" setMarkerText "SRP - [Alpha]"; "rMarker1" setmarkershape "ICON"; "rMarker1" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp1 = [(group _unit), (getPos rally1), "Squad Rally Point [Alpha]"] call bis_fnc_addRespawnPosition; sleep 300; r1Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally1; deleteMarker "rMarker1"; srp1 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; if ((_unit == SL2) && (_type == "rhsusf_usmc_marpat_d_squadleader")) then { if (!(isNil "rally2")) exitWith { // Delete Existing Rallypoint deleteVehicle rally2; deleteMarker "rMarker2"; srp2 call BIS_fnc_removeRespawnPosition; // Deploy New Rallypoint r2Cooldown=1; rally2 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally2 setDir ((getDir _unit)-90); rally2 setVectorUp _surface; rally2 enableSimulation false; rally2 addEventHandler ["HandleDamage",{0}]; _rMarker2 = createMarker ["rMarker2", position rally2]; "rMarker2" setMarkerText "SRP - [Bravo]"; "rMarker2" setmarkershape "ICON"; "rMarker2" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp2 = [(group _unit), (getPos rally2), "Squad Rally Point [Bravo]"] call bis_fnc_addRespawnPosition; sleep 300; r2Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally2; deleteMarker "rMarker2"; srp2 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; r2Cooldown=1; rally2 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally2 setDir ((getDir _unit)-90); rally2 setVectorUp _surface; rally2 enableSimulation false; rally2 addEventHandler ["HandleDamage",{0}]; _rMarker2 = createMarker ["rMarker2", position rally2]; "rMarker2" setMarkerText "SRP - [Bravo]"; "rMarker2" setmarkershape "ICON"; "rMarker2" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp2 = [(group _unit), (getPos rally2), "Squad Rally Point [Bravo]"] call bis_fnc_addRespawnPosition; sleep 300; r2Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally2; deleteMarker "rMarker2"; srp2 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; if ((_unit == SL3) && (_type == "rhsusf_usmc_marpat_d_squadleader")) then { if (!(isNil "rally3")) exitWith { // Delete Existing Rallypoint deleteVehicle rally3; deleteMarker "rMarker3"; srp3 call BIS_fnc_removeRespawnPosition; // Deploy New Rallypoint r3Cooldown=1; rally3 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally3 setDir ((getDir _unit)-90); rally3 setVectorUp _surface; rally3 enableSimulation false; rally3 addEventHandler ["HandleDamage",{0}]; _rMarker3 = createMarker ["rMarker3", position rally3]; "rMarker3" setMarkerText "SRP - [Charlie]"; "rMarker3" setmarkershape "ICON"; "rMarker3" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp3 = [(group _unit), (getPos rally3), "Squad Rally Point [Charlie]"] call bis_fnc_addRespawnPosition; sleep 300; r3Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally3; deleteMarker "rMarker3"; srp3 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; r3Cooldown=1; rally3 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally3 setDir ((getDir _unit)-90); rally3 setVectorUp _surface; rally3 enableSimulation false; rally3 addEventHandler ["HandleDamage",{0}]; _rMarker3 = createMarker ["rMarker3", position rally3]; "rMarker3" setMarkerText "SRP - [Charlie]"; "rMarker3" setmarkershape "ICON"; "rMarker3" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp3 = [(group _unit), (getPos rally3), "Squad Rally Point [Charlie]"] call bis_fnc_addRespawnPosition; sleep 300; r3Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally3; deleteMarker "rMarker3"; srp3 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; if ((_unit == SL4) && (_type == "rhsusf_usmc_marpat_d_crewman")) then { if (!(isNil "rally4")) exitWith { // Delete Existing Rallypoint deleteVehicle rally4; deleteMarker "rMarker4"; srp4 call BIS_fnc_removeRespawnPosition; // Deploy New Rallypoint r4Cooldown=1; rally4 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally4 setDir ((getDir _unit)-90); rally4 setVectorUp _surface; rally4 enableSimulation false; rally4 addEventHandler ["HandleDamage",{0}]; _rMarker4 = createMarker ["rMarker4", position rally4]; "rMarker4" setMarkerText "SRP - [Delta]"; "rMarker4" setmarkershape "ICON"; "rMarker4" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp4 = [(group _unit), (getPos rally4), "Squad Rally Point [Delta]"] call bis_fnc_addRespawnPosition; sleep 300; r4Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally4; deleteMarker "rMarker4"; srp4 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; r4Cooldown=1; rally4 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally4 setDir ((getDir _unit)-90); rally4 setVectorUp _surface; rally4 enableSimulation false; rally4 addEventHandler ["HandleDamage",{0}]; _rMarker4 = createMarker ["rMarker4", position rally4]; "rMarker4" setMarkerText "SRP - [Delta]"; "rMarker4" setmarkershape "ICON"; "rMarker4" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp4 = [(group _unit), (getPos rally4), "Squad Rally Point [Delta]"] call bis_fnc_addRespawnPosition; sleep 300; r4Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally4; deleteMarker "rMarker4"; srp4 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; if ((_unit == SL5) && (_type == "rhsusf_usmc_marpat_d_helipilot")) then { if (!(isNil "rally5")) exitWith { // Delete Existing Rallypoint deleteVehicle rally5; deleteMarker "rMarker5"; srp5 call BIS_fnc_removeRespawnPosition; // Deploy New Rallypoint r5Cooldown=1; rally5 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally5 setDir ((getDir _unit)-90); rally5 setVectorUp _surface; rally5 enableSimulation false; rally5 addEventHandler ["HandleDamage",{0}]; _rMarker5 = createMarker ["rMarker5", position rally5]; "rMarker5" setMarkerText "SRP - [Foxtrot]"; "rMarker5" setmarkershape "ICON"; "rMarker5" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp5 = [(group _unit), (getPos rally5), "Squad Rally Point [Foxtrot]"] call bis_fnc_addRespawnPosition; sleep 300; r5Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally5; deleteMarker "rMarker5"; srp5 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; r5Cooldown=1; rally5 = createVehicle ["Land_TentDome_F", _srpPos, [], 0, "NONE"]; rally5 setDir ((getDir _unit)-90); rally5 setVectorUp _surface; rally5 enableSimulation false; rally5 addEventHandler ["HandleDamage",{0}]; _rMarker5 = createMarker ["rMarker5", position rally5]; "rMarker5" setMarkerText "SRP - [Foxtrot]"; "rMarker5" setmarkershape "ICON"; "rMarker5" setMarkerType "mil_start"; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Placed!</t><br/><br/>It will be removed after 10 minutes!"]; srp5 = [(group _unit), (getPos rally5), "Squad Rally Point [Foxtrot]"] call bis_fnc_addRespawnPosition; sleep 300; r5Cooldown = 0; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Available!</t><br/><br/>You Can Deploy It Through Scroll Menu!"]; sleep 300; deleteVehicle rally5; deleteMarker "rMarker5"; srp5 call BIS_fnc_removeRespawnPosition; hint parseText format ["<t size = '1.5' color = '#4DB0E2'>Squad Rally Point Removed!</t><br/><br/>You Can Deploy A New One Through Scroll Menu!"]; }; }; }; Wrote this for an Insurgency script I was creating, but never got around to releasing yet. Pretty basic and works for up to 5 squad leaders (and can be increased/edited easily.) Works based off their classname (_type) and name (_unit). Feel free to do with it as you'd like.
-
Item Restriction Description: Restricts Item Classnames To Specified Player Classnames Detects Weapon Attachments, Assigned Items, Inventory Items, Magazines/Grenades. Gives a hint with Image/Item Name upon removal of items. Usage: [["playerClass1", "playerClass2"],["itemClass1","itemClass2"]] execVM "itemRestriction.sqf"; itemRestriction.sqf: // Item Restriction Script // Created By Schadler.C while {true} do { _rClass = _this select 0; _rItem = _this select 1; _weaponAttachments = player weaponAccessories primaryWeapon player; _assignedItems = assignedItems player; _items = items player; _mags = magazines player; _curMag = currentMagazine player; // Weapon Attachments if (!isNil "_weaponAttachments") then { _attachmentCount = count _weaponAttachments; for "_x" from (_attachmentCount -1) to 0 step -1 do { _attachment = _weaponAttachments select _x; if ((_attachment in _rItem) && !(typeOf player in _rClass)) then { _attachmentName = getText(configFile >> "CfgWeapons" >>_attachment >> "displayName"); _attachmentPicture = getText(configfile >> "CfgWeapons" >>_attachment >> "picture"); player removePrimaryWeaponItem _attachment; player removeSecondaryWeaponItem _attachment; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED ATTACHMENT</t><br/><br/><img image='%2' size='5'/><br /><br />Your class is not allowed<br/>to use %1.",_attachmentName, _attachmentPicture]; }; }; }; // Assigned Items if (!isNil "_assignedItems") then { _assignedItemsCount = count _assignedItems; for "_x" from (_assignedItemsCount -1) to 0 step -1 do { _assignedItem = _assignedItems select _x; if ((_assignedItem in _rItem) && !(typeOf player in _rClass)) then { _assignedItemName = getText(configFile >> "CfgWeapons" >>_assignedItem >> "displayName"); _assignedItemPicture = getText(configfile >> "CfgWeapons" >>_assignedItem >> "picture"); player unlinkItem _assignedItem; player removeWeapon _assignedItem; // Incase Of Binoculars hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED ITEM</t><br/><br/><img image='%2' size='5'/><br /><br />Your class is not allowed<br/>to use %1.",_assignedItemName, _assignedItemPicture]; }; }; }; // Inventory Items if (!isNil "_items") then { _itemsCount = count _items; for "_x" from (_itemsCount -1) to 0 step -1 do { _item = _items select _x; if ((_item in _rItem) && !(typeOf player in _rClass)) then { _itemName = getText(configFile >> "CfgWeapons" >>_item >> "displayName"); _itemPicture = getText(configfile >> "CfgWeapons" >>_item >> "picture"); player removeItems _item; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED ITEM</t><br/><br/><img image='%2' size='5'/><br /><br />Your class is not allowed<br/>to use %1.",_itemName, _itemPicture]; }; }; }; // Magazines if (!isNil "_mags") then { _magCount = count _mags; for "_x" from (_magCount -1) to 0 step -1 do { _mag = _mags select _x; if ((_mag in _rItem) && !(typeOf player in _rClass)) then { _magName = getText(configFile >> "CfgMagazines" >>_mag >> "displayName"); _magPicture = getText(configfile >> "CfgMagazines" >>_mag >> "picture"); player removeMagazines _mag; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED ITEM</t><br/><br/><img image='%2' size='5'/><br /><br />Your class is not allowed<br/>to use %1.",_magName, _magPicture]; }; }; }; if ((_curMag in _rItem) && !(typeOf player in _rClass)) then { _curMagName = getText(configFile >> "CfgMagazines" >>_curMag >> "displayName"); _curMagPicture = getText(configfile >> "CfgMagazines" >>_curMag >> "picture"); player removePrimaryWeaponItem _curMag; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED ITEM</t><br/><br/><img image='%2' size='5'/><br /><br />Your class is not allowed<br/>to use %1.",_curMagName, _curMagPicture]; }; sleep 3; }; Weapon Restriction Description: Restricts Weapon Classnames To Specified Player Classnames. Detects both Primary and Secondary Weapons. (Working on sidearms) Gives hint with Weapon Image/Name on removal. Usage: [["playerClass1", "playerClass2"],["weaponClass1","weaponClass2"]] execVM "weaponRestriction.sqf"; weaponRestriction.sqf: // Weapon Restriction Script // Created By Schadler.C private ["_class", "_weapon", "_primaryWeapon", "_secondaryWeapon", "_primaryName", "_secondaryName"]; while {true} do { sleep 3; _class = _this select 0; _weapon = _this select 1; _primaryWeapon = primaryWeapon player; _secondaryWeapon = secondaryWeapon player; if ((_primaryWeapon in _weapon) && !(typeOf player in _class)) then { _primaryName = getText(configFile >> "CfgWeapons" >>_primaryWeapon >> "displayName"); _primaryPicture = getText(configFile >> "CfgWeapons" >>_primaryWeapon >> "picture"); player removeWeapon _primaryWeapon; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED WEAPON</t><br/><br/><img image='%2' size='5'/><br />Your class is not qualified<br/>to use %1",_primaryName, _primaryPicture]; }; if ((_secondaryWeapon in _weapon) && !(typeOf player in _class)) then { _secondaryName = getText(configFile >> "CfgWeapons" >>_secondaryWeapon >> "displayName"); _secondaryPicture = getText(configFile >> "CfgWeapons" >>_secondaryWeapon >> "picture"); player removeWeapon _secondaryWeapon; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED WEAPON</t><br/><br/><img image='%2' size='5'/><br />Your class is not qualified<br/>to use %1",_secondaryName, _secondaryPicture]; }; }; Feel free to use them however you please.
-
Help with multiple custom loadouts
schadler17 replied to Neviothr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
defaultGear.sqf; // Player Loadouts Via Classnames // Written by Schadler.C private ["_unit", "_type", "_side"]; _unit = _this select 0; _type = (typeOf _unit); _side = (side _unit); // Remove Starting Items removeallWeapons _unit; removeAllAssignedItems _unit; removeBackpack _unit; // Common Items _unit addWeapon "ItemMap"; _unit addWeapon "ItemCompass"; _unit addWeapon "ItemWatch"; _unit addItem "FirstAidKit"; // Start Gear Assignment switch (_side) do { // Blufor Loadout case west: { // Common WEST Gear _unit addWeapon "NVGoggles"; // Common Ammo/Items/etc here if needed. switch (_type) do { // Commander case "rhsusf_usmc_marpat_d_officer": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "ItemGPS"; _unit linkItem "tf_anprc152"; _unit addWeapon "Laserdesignator"; _unit addMagazine "LaserBatteries"; }; // Squad Leader case "rhsusf_usmc_marpat_d_squadleader": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "ItemGPS"; _unit linkItem "tf_anprc152"; _unit addWeapon "Laserdesignator"; _unit addMagazine "LaserBatteries"; }; // Team Leader case "rhsusf_usmc_marpat_d_teamleader": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit addWeapon "Binocular"; _unit linkItem "tf_anprc152"; }; // UAV Operator case "rhsusf_usmc_marpat_d_uav": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "B_UavTerminal"; _unit linkItem "tf_anprc152"; }; // Rifleman case "rhsusf_usmc_marpat_d_rifleman": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit addWeapon "Binocular"; _unit linkItem "tf_anprc152"; }; // Medic case "rhsusf_usmc_marpat_d_rifleman_light": { // Backpack _unit addBackpack "B_kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShell", 8]; _unit addMagazines ["rhs_mag_m67", 2]; // Items _unit linkItem "tf_anprc152"; (unitbackpack _unit) addItemCargoGlobal ["FirstAidKit", 15]; _unit addItem "Medikit"; _unit addWeapon "Binocular"; }; // Grenadier case "rhsusf_usmc_marpat_d_grenadier": { // Weapons _unit addWeapon "rhs_weap_m4a1_m320"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_M441_HE", 8]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Combat Engineer case "rhsusf_usmc_marpat_d_engineer": { // Backpack _unit addBackpack "B_kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["DemoCharge_Remote_Mag", 5]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "MineDetector"; }; // Light MG case "rhsusf_usmc_marpat_d_autorifleman_m249": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m249_pip_L"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhsusf_100Rnd_556x45_soft_pouch", 6]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Heavy MG case "rhsusf_usmc_marpat_d_machinegunner": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon ""; _unit addPrimaryWeaponItem ""; // Ammo _unit addMagazines ["", 0]; _unit addMagazines ["rhs_mag_m67", 0]; _unit addMagazines ["SmokeShell", 0]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Light AT case "rhsusf_usmc_marpat_d_riflemanat": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; _unit addWeapon "rhs_weap_M136"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_m136_mag", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Heavy AT case "rhsusf_usmc_marpat_d_javelin": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; _unit addWeapon "rhs_weap_fgm148"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_fgm148_Magazines_AT", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Marksman case "rhsusf_usmc_marpat_d_marksman": { // Weapons _unit addWeapon "rhs_weap_m14ebrri_leu"; _unit addPrimaryWeaponItem "rhsusf_acc_LEUPOLDMK4"; // Ammo _unit addMagazines ["rhsusf_20Rnd_762x51_m118_special_Mag", 8]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Sniper case "rhsusf_usmc_marpat_d_sniper": { // Remove Default Uniform removeUniform _unit; removeGoggles _unit; removeVest _unit; removeHeadgear _unit; removeAllAssignedItems _unit; // Uniform _unit addUniform "U_B_GhillieSuit"; _unit addHeadgear "rhs_Booniehat_marpatwd"; _unit addVest "rhsusf_spc_marksman"; // Weapons _unit addWeapon "rhs_weap_XM2010"; _unit addPrimaryWeaponItem "rhsusf_acc_LEUPOLDMK4_2"; _unit addPrimaryWeaponItem "rhsusf_acc_harris_bipod"; // Ammo _unit addMagazines ["rhsusf_5Rnd_300winmag_xm2010", 10]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Rangefinder"; }; // Crewman case "rhsusf_usmc_marpat_d_crewman": { // Weapons _unit addWeapon "rhs_weap_m4a1"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["SmokeShell", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "ItemGPS"; }; // Heli Pilot case "rhsusf_usmc_marpat_d_helipilot": { // Parachute _unit addBackpack "B_Parachute"; // Weapons _unit addWeapon "rhs_weap_m4a1"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["SmokeShell", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "ItemGPS"; }; // Default default {/*Default Loadout or Error Message*/}; }; }; // Opfor Loadout case east: { /* EAST LOADOUT HERE! */ }; case guer: { /* RESISTANCE LOADOUT HERE! */ }; case civ: { /* CIV LOADOUT HERE! */ }; }; initPlayerLocal.sqf: (also onPlayerRespawn.sqf if you want it to save on respawning) _nil = [player] execVM "defaultGear.sqf"; This is what I use. Feel free to edit/fix it anyway that you need too. -
Restrict weapons and gear to certain units.
schadler17 replied to dpatt711's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Restrict Weapons via Player Classname. // Weapon Restriction Script // Created By Schadler.C private ["_class", "_weapon", "_primaryWeapon", "_secondaryWeapon", "_primaryName", "_secondaryName"]; while {true} do { sleep 3; _class = _this select 0; _weapon = _this select 1; _primaryWeapon = primaryWeapon player; _secondaryWeapon = secondaryWeapon player; if ((_primaryWeapon in _weapon) && !(typeOf player in _class)) then { _primaryName = getText(configFile >> "CfgWeapons" >>_primaryWeapon >> "displayName"); _primaryPicture = getText(configFile >> "CfgWeapons" >>_primaryWeapon >> "picture"); player removeWeapon _primaryWeapon; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED WEAPON</t><br/><br/><img image='%2' size='5'/><br />Your class is not qualified<br/>to use %1",_primaryName, _primaryPicture]; }; if ((_secondaryWeapon in _weapon) && !(typeOf player in _class)) then { _secondaryName = getText(configFile >> "CfgWeapons" >>_secondaryWeapon >> "displayName"); _secondaryPicture = getText(configFile >> "CfgWeapons" >>_secondaryWeapon >> "picture"); player removeWeapon _secondaryWeapon; hint parseText format ["<t size = '1.5' color = '#FF0000'>RESTRICTED WEAPON</t><br/><br/><img image='%2' size='5'/><br />Your class is not qualified<br/>to use %1",_secondaryName, _secondaryPicture]; }; } forEach allUnits; Call in initPlayerLocal.sqf: _nil = [["rhsusf_usmc_marpat_d_grenadier"],["rhs_weap_m4a1_m203","rhs_weap_m4_m203"]] execVM "scripts\units\weaponRestriction.sqf"; This restricts the specified weapons to the specified classname. No other units (except grenadier) can ever equip these weapons. Works for primary/secondary weapons. -
Looking for temporary, free, test-server hosting.
schadler17 posted a topic in ARMA 3 - SERVERS & ADMINISTRATION
I'm creating a my own version of an Insurgency mission and have a very solid base for it so far. I'm looking for a temporary host that could host my mission for testing purposes. I'm not asking for anything major, just a box to throw my server on to test stability with multiple players, and on downtime (when I don't feel like scripting) to actually play/test certain features. In time, I plan on renting a server with the hopes of keeping it dedicated and up 24/7, but for now, I'm not asking for anything special, just a test box. Anyone interested in helping(script/server wise) can PM me or post here. Mission features: Mods: - All in Arma Terrain Pack - RHS(USAF/AFRF) - TFAR - CBA Custom Scripts: - Player Loadouts (Based on player class) - Item Restrictions (Based on player class) - Commander/Squad Leader Support System (Work in Progress) - Custom Ammobox Loadouts - Mobile Headquarters - Squad Rallypoints - Safezone Community Made Scripts: (Some will most likely be re-made/tweaked to meet my OCD needs) - Load/Save Loadout - Enemy Occupy System - Civilian Occupy System - Randomly Generated Roadside IEDs - Light Vehicle Respawn - Restricted Vehicles (Armor/Helis) [Deactivated for now] - Little Immersion Tweaks - Cupcake Medical System To be done: - Configuring EOS/COS Zones - Random IED placement zones - GUI for Commander/SL support system - Player/AI Suppression System - Finding more Realism/Tactical Gameplay scripts. - Destroyable Caches - Civilian Interrigation - Random Intel Drops On Killed AI. There will be more, but I'm the only one working on it, and I'm pretty new to scripting, so time will tell. Note: If you don't plan on helping or providing insight towards the mission creation, please refrain from posting or your posts will be reported/removed. -
AMD A-10 5800k OC'd @ 4.3ghz 8gb 1866mhz 1gb AMD Raedon 7750 GPU Stuck at 20-30 FPS on servers with 40+ players, sometimes dropping to below 10-15 FPS. Tried to save money with AMD, works for most games fine, but not for Arma (which sucks cause its the main game I play.) Plan on upgrading to an Intel CPU next time around. From what I've heard, Single Threading performance is what you need to look for in Arma. Dont take my word for it, but I'll be looking into it when I do upgrade and we'll see what happens.
- 95 replies
-
Need help with mission.sqm file being corrupt.
schadler17 replied to cookies2432's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Enable Scripting Errors. It'll tell you where you messed up. Post the error here. -
mission images into a mod
schadler17 replied to davidoss's topic in ARMA 3 - MISSION EDITING & SCRIPTING
He wants to add images to his mod that he can call for in his mission to use to keep the mission file small. There's a way, just don't know how to call for them. -
US Air Force Torch Cuts Through Almost Anything Just Like A Lightsaber
schadler17 replied to eddo36's topic in OFFTOPIC
Simple but effective. I like it. I like how it can be used for military and civilian/industrial situations. Only problem I see is the big ball of flames it creates towards the user, but as long as you use the right safety gear all should be fine. -
Default Gear/Loadout based on player Classname
schadler17 replied to schadler17's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://forums.bistudio.com/topic/185212-safezone-loop/ That might also be useful for you. -
Default Gear/Loadout based on player Classname
schadler17 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Made this a while ago but never got around to using it. Could be useful for some. Assigns loadouts to a player based on their classname. Feel free to do with it as you please. Call for it in initPlayerLocal.sqf: [player] execVM "defaultGear.sqf"; defaultGear.sqf: // Player Loadouts Via Classnames // Written by Schadler.C private ["_unit", "_type", "_side"]; _unit = _this select 0; _type = (typeOf _unit); _side = (side _unit); // Remove Starting Items removeallWeapons _unit; removeAllAssignedItems _unit; removeBackpack _unit; // Common Items _unit addWeapon "ItemMap"; _unit addWeapon "ItemCompass"; _unit addWeapon "ItemWatch"; _unit addItem "FirstAidKit"; // Start Gear Assignment switch (_side) do { // Blufor Loadout case west: { // Common WEST Gear _unit addWeapon "NVGoggles"; // Common Ammo/Items/etc here if needed. switch (_type) do { // Commander case "rhsusf_usmc_marpat_d_officer": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "ItemGPS"; _unit linkItem "tf_anprc152"; _unit addWeapon "Laserdesignator"; _unit addMagazine "LaserBatteries"; }; // Squad Leader case "rhsusf_usmc_marpat_d_squadleader": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "ItemGPS"; _unit linkItem "tf_anprc152"; _unit addWeapon "Laserdesignator"; _unit addMagazine "LaserBatteries"; }; // Team Leader case "rhsusf_usmc_marpat_d_teamleader": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit addWeapon "Binocular"; _unit linkItem "tf_anprc152"; }; // UAV Operator case "rhsusf_usmc_marpat_d_uav": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "B_UavTerminal"; _unit linkItem "tf_anprc152"; }; // Rifleman case "rhsusf_usmc_marpat_d_rifleman": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit addWeapon "Binocular"; _unit linkItem "tf_anprc152"; }; // Medic case "rhsusf_usmc_marpat_d_rifleman_light": { // Backpack _unit addBackpack "B_kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShell", 8]; _unit addMagazines ["rhs_mag_m67", 2]; // Items _unit linkItem "tf_anprc152"; (unitbackpack _unit) addItemCargoGlobal ["FirstAidKit", 15]; _unit addItem "Medikit"; _unit addWeapon "Binocular"; }; // Grenadier case "rhsusf_usmc_marpat_d_grenadier": { // Weapons _unit addWeapon "rhs_weap_m4a1_m320"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_M441_HE", 8]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Combat Engineer case "rhsusf_usmc_marpat_d_engineer": { // Backpack _unit addBackpack "B_kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["DemoCharge_Remote_Mag", 5]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "MineDetector"; }; // Light MG case "rhsusf_usmc_marpat_d_autorifleman_m249": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m249_pip_L"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhsusf_100Rnd_556x45_soft_pouch", 6]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Heavy MG case "rhsusf_usmc_marpat_d_machinegunner": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon ""; _unit addPrimaryWeaponItem ""; // Ammo _unit addMagazines ["", 0]; _unit addMagazines ["rhs_mag_m67", 0]; _unit addMagazines ["SmokeShell", 0]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Light AT case "rhsusf_usmc_marpat_d_riflemanat": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; _unit addWeapon "rhs_weap_M136"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_m136_mag", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Heavy AT case "rhsusf_usmc_marpat_d_javelin": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; _unit addWeapon "rhs_weap_fgm148"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_fgm148_Magazines_AT", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Marksman case "rhsusf_usmc_marpat_d_marksman": { // Weapons _unit addWeapon "rhs_weap_m14ebrri_leu"; _unit addPrimaryWeaponItem "rhsusf_acc_LEUPOLDMK4"; // Ammo _unit addMagazines ["rhsusf_20Rnd_762x51_m118_special_Mag", 8]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Sniper case "rhsusf_usmc_marpat_d_sniper": { // Remove Default Uniform removeUniform _unit; removeGoggles _unit; removeVest _unit; removeHeadgear _unit; removeAllAssignedItems _unit; // Uniform _unit addUniform "U_B_GhillieSuit"; _unit addHeadgear "rhs_Booniehat_marpatwd"; _unit addVest "rhsusf_spc_marksman"; // Weapons _unit addWeapon "rhs_weap_XM2010"; _unit addPrimaryWeaponItem "rhsusf_acc_LEUPOLDMK4_2"; _unit addPrimaryWeaponItem "rhsusf_acc_harris_bipod"; // Ammo _unit addMagazines ["rhsusf_5Rnd_300winmag_xm2010", 10]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Rangefinder"; }; // Crewman case "rhsusf_usmc_marpat_d_crewman": { // Weapons _unit addWeapon "rhs_weap_m4a1"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["SmokeShell", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "ItemGPS"; }; // Heli Pilot case "rhsusf_usmc_marpat_d_helipilot": { // Parachute _unit addBackpack "B_Parachute"; // Weapons _unit addWeapon "rhs_weap_m4a1"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["SmokeShell", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "ItemGPS"; }; // Default default {/*Default Loadout or Error Message*/}; }; }; // Opfor Loadout case east: { /* EAST LOADOUT HERE! */ }; case guer: { /* RESISTANCE LOADOUT HERE! */ }; case civ: { /* CIV LOADOUT HERE! */ }; }; -
Adding custom items/user made content directly to a mission
schadler17 replied to Vectif's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Even if it were possible, adding them too the mission file would make your mission its-self huge. Normal size (with images/music/etc) is about 2-3mb, (less than 1mb without images/music) Some objects are MB's in size depending on what they are. Depending on how many objects you added your mission file could be huge, which would take players a while to download when connecting to your server. It'd consume alot of bandwidth of the server, which could cause it to lag, if you're limited. But in the end, I don't think its possible, but even if it was, it wouldn't be reasonable to do. (imo)- 9 replies
-
- Custom Items
- Automatic download f/ mission
-
(and 1 more)
Tagged with:
-
Default Gear/Loadout based on player Classname
schadler17 replied to schadler17's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah thats why as you see in all of my classname cases, I add the Uniform/Vests/Clothing(Backpacks in my case cause I was using default uniforms/vests). Then the weapons, then magazines, then assigned Items. Can't add items to a player when he has nowhere to add them too. Only issue is there will be no magazines loaded into the player's weapon, but really, its not an issue. Prevents players from accidentally firing on mission-startup (incase they're alt tabbed when it starts) To fix that, do: _unit addPrimaryWeaponItem "MagazineClassname"; But yeah, all brackets are needed to finish the script. Use Notepad++ and enable script errors on startup for the game and it shoulda told you that from the beginning. -
Default Gear/Loadout based on player Classname
schadler17 replied to schadler17's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just make sure the classname is correct for your uniform. Are the other items being added? Weapons/assignedItems? -
// Player Loadouts Via Classnames // Written by Schadler.C private ["_unit", "_type", "_side"]; _unit = _this select 0; _type = (typeOf _unit); _side = (side _unit); // Remove Starting Items removeallWeapons _unit; removeAllAssignedItems _unit; removeBackpack _unit; // Common Items _unit addWeapon "ItemMap"; _unit addWeapon "ItemCompass"; _unit addWeapon "ItemWatch"; _unit addItem "FirstAidKit"; // Start Gear Assignment switch (_side) do { // Blufor Loadout case west: { // Common WEST Gear _unit addWeapon "NVGoggles"; // Common Ammo/Items/etc here if needed. switch (_type) do { // Commander case "rhsusf_usmc_marpat_d_officer": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "ItemGPS"; _unit linkItem "tf_anprc152"; _unit addWeapon "Laserdesignator"; _unit addMagazine "LaserBatteries"; }; // Squad Leader case "rhsusf_usmc_marpat_d_squadleader": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "ItemGPS"; _unit linkItem "tf_anprc152"; _unit addWeapon "Laserdesignator"; _unit addMagazine "LaserBatteries"; }; // Team Leader case "rhsusf_usmc_marpat_d_teamleader": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit addWeapon "Binocular"; _unit linkItem "tf_anprc152"; }; // UAV Operator case "rhsusf_usmc_marpat_d_uav": { // Backpack/Radio _unit addBackpack "tf_rt1523g_big_rhs"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "B_UavTerminal"; _unit linkItem "tf_anprc152"; }; // Rifleman case "rhsusf_usmc_marpat_d_rifleman": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "optic_Hamr"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit addWeapon "Binocular"; _unit linkItem "tf_anprc152"; }; // Medic case "rhsusf_usmc_marpat_d_rifleman_light": { // Backpack _unit addBackpack "B_kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["SmokeShell", 8]; _unit addMagazines ["rhs_mag_m67", 2]; // Items _unit linkItem "tf_anprc152"; (unitbackpack _unit) addItemCargoGlobal ["FirstAidKit", 15]; _unit addItem "Medikit"; _unit addWeapon "Binocular"; }; // Grenadier case "rhsusf_usmc_marpat_d_grenadier": { // Weapons _unit addWeapon "rhs_weap_m4a1_m320"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_mag_M441_HE", 8]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Combat Engineer case "rhsusf_usmc_marpat_d_engineer": { // Backpack _unit addBackpack "B_kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["DemoCharge_Remote_Mag", 5]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "MineDetector"; }; // Light MG case "rhsusf_usmc_marpat_d_autorifleman_m249": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m249_pip_L"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; // Ammo _unit addMagazines ["rhsusf_100Rnd_556x45_soft_pouch", 6]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Heavy MG case "rhsusf_usmc_marpat_d_machinegunner": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon ""; _unit addPrimaryWeaponItem ""; // Ammo _unit addMagazines ["", 0]; _unit addMagazines ["rhs_mag_m67", 0]; _unit addMagazines ["SmokeShell", 0]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Light AT case "rhsusf_usmc_marpat_d_riflemanat": { // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; _unit addWeapon "rhs_weap_M136"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_m136_mag", 1]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Heavy AT case "rhsusf_usmc_marpat_d_javelin": { // Backpack _unit addBackpack "B_Kitbag_rgr"; // Weapons _unit addWeapon "rhs_weap_m4a1_grip"; _unit addPrimaryWeaponItem "rhsusf_acc_SFMB556"; _unit addPrimaryWeaponItem "rhsusf_acc_compm4"; _unit addWeapon "rhs_weap_fgm148"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", 2]; _unit addMagazines ["rhs_fgm148_Magazines_AT", 2]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Marksman case "rhsusf_usmc_marpat_d_marksman": { // Weapons _unit addWeapon "rhs_weap_m14ebrri_leu"; _unit addPrimaryWeaponItem "rhsusf_acc_LEUPOLDMK4"; // Ammo _unit addMagazines ["rhsusf_20Rnd_762x51_m118_special_Mag", 8]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; }; // Sniper case "rhsusf_usmc_marpat_d_sniper": { // Remove Default Uniform removeUniform _unit; removeGoggles _unit; removeVest _unit; removeHeadgear _unit; removeAllAssignedItems _unit; // Uniform _unit addUniform "U_B_GhillieSuit"; _unit addHeadgear "rhs_Booniehat_marpatwd"; _unit addVest "rhsusf_spc_marksman"; // Weapons _unit addWeapon "rhs_weap_XM2010"; _unit addPrimaryWeaponItem "rhsusf_acc_LEUPOLDMK4_2"; _unit addPrimaryWeaponItem "rhsusf_acc_harris_bipod"; // Ammo _unit addMagazines ["rhsusf_5Rnd_300winmag_xm2010", 10]; _unit addMagazines ["rhs_mag_m67", 2]; _unit addMagazines ["SmokeShell", 2]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Rangefinder"; }; // Crewman case "rhsusf_usmc_marpat_d_crewman": { // Weapons _unit addWeapon "rhs_weap_m4a1"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["SmokeShell", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "ItemGPS"; }; // Heli Pilot case "rhsusf_usmc_marpat_d_helipilot": { // Parachute _unit addBackpack "B_Parachute"; // Weapons _unit addWeapon "rhs_weap_m4a1"; // Ammo _unit addMagazines ["rhs_mag_30Rnd_556x45_M855A1_Stanag", 5]; _unit addMagazines ["SmokeShell", 2]; _unit addMagazines ["SmokeShellRed", 1]; _unit addMagazines ["SmokeShellOrange", 1]; _unit addMagazines ["SmokeShellBlue", 1]; // Items _unit linkItem "tf_anprc152"; _unit addWeapon "Binocular"; _unit linkItem "ItemGPS"; }; // Default default {/*Default Loadout or Error Message*/}; }; }; // Opfor Loadout case east: { /* EAST LOADOUT HERE! */ }; case guer: { /* RESISTANCE LOADOUT HERE! */ }; case civ: { /* CIV LOADOUT HERE! */ }; }; Something I've made and never released. Multiple Classnames can be defined with different loadouts for each. Called for in initPlayerLocal.sqf: _nil = [player] execVM "scripts\units\defaultGear.sqf";
-
If you use Modules, I'm pretty sure theres a way to determine what kind of vehicle is used when editing it. Not sure though, as I haven't used Support Modules in a while.
-
Basically I'm trying to create a script that detects if a player has a radio in his inventory, and if not, to assign him one. My problem is, sometimes the radio classname shows up as tf_anprc152, tf_anprc152_1, tf_anprc152_2, etc. My question is an easy way to find out which one is equipped without having to add an endless array of radio classname possibilities. What I want: if (!("tf_anprc152" in assignedItems player)) then {player linkItem "tf_anprc152";} else {hint "Radio Found!";};
-
Varying Classnames?
schadler17 replied to schadler17's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Fixed. _unit = _this select 0; while {true} do { sleep 3; _assignedItems = assignedItems _unit; _Items = items _unit; _hasRadio = { toLower _x find "tf_anprc152" >= 0 } count (_items + _assignedItems) > 0; { if (_hasRadio) then { hint format ["Radio Found!"]; } else { hint format ["Radio Not Found!"]; }; } forEach [ "tf_anprc152", "tf_anprc152_1", "tf_anprc152_2", "tf_anprc152_3", "tf_anprc152_4", "tf_anprc152_5", "tf_anprc152_6", "tf_anprc152_7", "tf_anprc152_8", "tf_anprc152_9" ]; }; -
Varying Classnames?
schadler17 replied to schadler17's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Doesn't work. https://community.bistudio.com/wiki/toLower My issue, is sometimes the classname is "tf_anprc152" If you assign another radio, or if the player picks one up, it'll switch to "tf_anprc152_1", "tf_anprc152_2", "tf_anprc152_2", etc. I need to detect all possibilities of the _x up to about 10. -
Give an specific player an insignia
schadler17 replied to Moon_chilD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Feel free. I'll help ya the best I can. -
Give an specific player an insignia
schadler17 replied to Moon_chilD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try doing it this way instead of with eventHandlers. Create onPlayerRespawn.sqf and enter the code below for that and initPlayerLocal Drag the script where you want it and change the path to find it. onPlayerRespawn.sqf & initPlayerLocal.sqf [player] execVM "script.sqf"; Change your script.sqf file to look like this: _unit = _this select 0; _pid = (getplayerUID _unit); _rank1 = ["_SP_PLAYER_"]; _rank2 = ["_SP_PLAYER_"]; while {true} do { sleep 3; _insignia = _unit call BIS_fnc_getUnitInsignia; if (!alive _unit) exitWith { [_unit,""] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; if ((_pid in _rank1) && !(_insignia isEqualTo "111thID")) then { [_unit,"111thID"] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; if ((_pid in _rank2) && !(_insignia isEqualTo "BI")) then { [_unit,"BI"] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; }; Added a check for if the player is alive, if not it will reset their insignia, which should help fix the issue on respawn. Make sure to edit the insignias to the right ones, used vanilla ones on this to make sure it worked. -
Give an specific player an insignia
schadler17 replied to Moon_chilD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
initPlayerLocal.sqf: [player] execVM "uid.sqf"; player addEventHandler ["Respawn", {[player] execVM "uid.sqf";}]; UID.sqf: _unit = _this select 0; _pid = (getplayerUID _unit); _rank1 = ["76561197971387924", "76561197971387924"]; _rank2 = ["76561197971387924", "76561197971387924"]; while {true} do { sleep 3; _insignia = _unit call BIS_fnc_getUnitInsignia; if ((_pid in _rank1) && !(_insignia isEqualTo "EF_Germany")) then { [_unit,"EF_Germany"] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; if ((_pid in _rank2) && !(_insignia isEqualTo "EF_Germany2")) then { [_unit,"EF_Germany2"] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; }; -
I'd love to see these on arma lol.
-
Give an specific player an insignia
schadler17 replied to Moon_chilD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
tbh, you should create a new script in your mission folder and call for it how I showed above. But if you wanna use initPlayerLocal, just add the code below to what you've already got. If you wanna go the other route (which makes the mission look neater and easier to add more scripts) then let me know and I'll help you set it up. player addEventHandler ["Respawn", { _unit = _this select 0; _pid = (getplayerUID _unit); _rank1 = ["76561197971387924", "76561197971387924"]; _rank2 = ["76561197971387924", "76561197971387924"]; while {true} do { sleep 3; _insignia = _unit call BIS_fnc_getUnitInsignia; if ((_pid in _rank1) && !(_insignia isEqualTo "EF_Germany")) then { [_unit,"EF_Germany"] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; if ((_pid in _rank2) && !(_insignia isEqualTo "EF_Germany2")) then { [_unit,"EF_Germany2"] call bis_fnc_setUnitInsignia; hint parsetext format ["Insignia:<br />%1<br /><br />UID:<br />%2", _insignia, _pid]; }; }; }]; EDIT: Thinking about it, you might be able to just do: player addEventHandler ["Respawn", {[player] execVM "initPlayerLocal.sqf"}]; -
Give an specific player an insignia
schadler17 replied to Moon_chilD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In initPlayerLocal.sqf: player addEventHandler ["Respawn", {[player] execVM "script.sqf"}]; Should work.