Jump to content
Sign in to follow this  
snniper

Possible To Do Custom LoadOuts By UID?

Recommended Posts

I was wondering if you can do it with like a _UIDArray or something. Kinda a noob at scripting So I can to the best place to fined help.

Share this post


Link to post
Share on other sites

This should do, adjust to your liking.

EDIT: More readable version down below

Edited by bob100101
forgot a };

Share this post


Link to post
Share on other sites

Thanks for this, I will see what I can do. Where did you get this form or did you just make it on the spot.

Share this post


Link to post
Share on other sites
Where did you get this form or did you just make it on the spot.

Made it just for you :D

Share this post


Link to post
Share on other sites

one last thing what is the line "_specialGats","_specialGatMags"

and If I wanted to add more loads who would I do that with the Whole Gat thing at the end.

Share this post


Link to post
Share on other sites

Revised for "readability"

"Gat" is slang for gun, I've changed it.

Also be advised, it's untested.

// by Bad_Bob

if (isServer) exitWith {};

private ["_uid","_player"];
_uid = getPlayerUID player;
_player = player;

//Note that this is global...
specialPeoples = 
[
"playerUID1",
"playerUID2",
"playerUID3"
];
notSoSpecialPeoples = 
[
"playerUID4",
"playerUID5",
"playerUID6"
];
admins = 
[
"adminUID1",
"adminUID2",
"adminUID3"
];

if ((_uid in specialPeoples) || (_uid in notSoSpecialPeoples) || (_uid in admins)) then
{
if (_uid in specialPeoples) then
{
	private ["_specialWeapons","_specialGatMags"];
	_specialWeapons =
	[
		"ACE_TT",
		"ACE_AK74M_SD_Kobra_F"
	];
	_specialGatMags = 
	[
		"ACE_8Rnd_762x25_B_Tokarev",
		"ACE_75Rnd_545x39_T_RPK",
	];

	for "_i" from 1 to 8 do 
	{
		{
			_player addMagazine _x;
		} forEach _specialMags;
	};
	{_player addWeapon _x} forEach _specialWeapons;
	_player selectWeapon (primaryWeapon _player);
	[] spawn
	{
		hint format ["Welcome Special Person."];
		sleep 5;
		hint format ["Primary Weapon: AK-74M SD Kobra. Pistol: Tokarev"];
		sleep 5;
		hint format [""];
	};
};
if (_uid in notSoSpecialPeoples) then
{
	private ["_notSoSpecialWeapons","_notSoSpecialMags"];
	_notSoSpecialWeapons =
	[
		"ACE_M3A1",
		"ACE_APS"
	];
	_notSoSpecialMags =
	[
		"ACE_30Rnd_1143x23_B_M3",
		"ACE_20Rnd_9x18_APS"
	];
	for "_i" from 1 to 8 do
	{
		{
			_player addMagazine _x;
		} forEach _notSoSpecialMags;
	};
	{_player addWeapon _x} forEach _specialWeapons;
	_player selectWeapon (primaryWeapon player);
	[] spawn
	{
		hint format ["Welcome Non-Special Person"];
		sleep 5;
		hint format ["Primary Weapon: Grease Gun. Pistol: Makarov"];
		sleep 5;
		hint format [""];
	};
};
if (_uid in admins) then
{
	private ["adminWeapons","_adminMags"];
	_adminWeapons =
	[
		"ACE_M16A4_EOT",
		"ACE_USP"
	];
	_adminMags =
	[
		"ACE_12Rnd_45ACP_USP",
		"ACE_30Rnd_556x45_SB_Stanag"
	];
	for "_i" from 1 to 8 do
	{
		{
			player addMagazine _x
		} forEach _adminMags;
	};
	{_player addWeapon _x} forEach _adminWeapons;
	[] spawn 
	{
		hint format ["Welcome Administrator"];
		sleep 5;
		hint format ["Primary Weapon: M16A4 EOT. Pistol: USP45 Tactical"];
		sleep 5;
		hint format [""];
	};
};
};
if ( !(_uid in specialPeoples) && !(_uid in notSoSpecialPeoples) && !(_uid in admins)) then 
{
private ["_defaultGat","_defaultMags"];
_defaultGat = 
[
	"ACE_AK103",
	"ACE_L9A1"
];
_defaultMags = 
[
	"ACE_30Rnd_762x39_S_AK47",
	"ACE_13Rnd_9x19_L9A1"
];
for "_i" from 1 to 8 do
{
	{
		_player addMagazine _x
	} forEach _defaultMags;
};
{_player addWeapon _x} forEach _defaultGat;
[] spawn
{
	hint format ["Welcome BK Randie"];
	sleep 5;
	hint format ["Primary Weapon: AK-103 Pistol: L9A1"];
	sleep 5;
	hint format [""];
};
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×