Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Mission Budget Script V 2.0 by Fr33d0m. www.mediusgaming.com
- // Assisted by Corello
- //###################
- // Rank ###### Rating
- //###################
- //PRIVATE 0
- //CORPORAL 50
- //SERGEANT 150
- //LIEUTENANT 250
- //CAPTAIN 350
- //MAJOR 500
- //COLONEL 750
- //
- //License:
- //You may use and alter this script, but you may not redistribute. You may distribute this script as a part of your mission, with proper credits given.
- //Arma 3 Defense Budget Script AKA TMN Economy Script by:
- //
- // Developer: TMN Fr33d0m
- // Assisted by: Corello
- //
- //www.mediusgaming.com (The Medius Network)
- //All Right Reserved
- //
- //For Information and Inquiries, EMAIL: admin@tmnclan.com
- //################################## LET US BEGIN ####################################
- //Addon Options
- DAR_HMMWV_Support_Enabled = 1;
- /////////////////////////////////////////////////////////////////////////////////////
- //Initial Budget for Side
- B_initialbudget= 1000000000;
- //Rating to Purchase Values
- B_vaslimit= 1500;
- B_Mlimit= 3500;
- B_Llimit= 5500;
- // Big Ticket Item (Locked to a rank)
- B_maxrank = "MAJOR";
- //////////////////////////////////////////////////////////////////////////////////////
- //Monetary Costs of things:
- //Items
- Bvascost= 10000;
- Bsupplycrate= 500;
- Bammocrate= 750;
- //Cars and Trucks
- HunterUnarmed= 470000;
- HunterHMG= 500000;
- HunterGMG= 520000;
- HEMTTcov= 125000;
- HEMTTopn= 90000;
- BATV= 7500;
- COffRoad= 32000;
- //Armor
- M2A1= 6000000;
- Sandstorm= 2410000;
- AMV7 = 3150000;
- IFV6c= 3000000;
- IFV6a= 3800000;
- //Helicopters and Planes
- AH99= 12100000;
- UH80= 21300000;
- AH9= 2300000;
- MH9= 2000000;
- A164 = 11800000;
- //DAR HMMWV
- DAR_M1151 = 70000;
- DAR_M1151_Deploy = 72000;
- DAR_M1151Woodland = 72000;
- DAR_M115_MK19 = 81000;
- DAR_M115_MK19Woodland = 81000;
- DAR_M1151WoodlandUA = 79000;
- DAR_M1152 = 64000;
- DAR_M1152Woodland = 66000;
- DAR_M1165_GMV = 77000;
- DAR_M1167 = 83000;
- DAR_M1167Woodland = 83000;
- //////////////////////////////////////////////////////////////////////////////////////////////////
- //Initial Budget Creator
- ////////////////////////////////////////////////////////////////////////////////////////////////
- if (isnil "B_defensebudget") then {
- B_defensebudget= B_initialbudget;
- publicVariable "B_defensebudget";
- };
- if (isnil "B_totalcost") then {
- B_totalcost= 0;
- publicVariable "B_totalcost";
- };
- ///////////////////////////////////////////////////////////////////////////////////////////
- //Number Conversion by Corello
- TMN_handle_number=
- {
- private ["_number","_mod","_digots","_digitsCount","_modBase","_numberText"];
- _number = [_this,0,0,[0]] call bis_fnc_param;
- _mod = [_this,1,3,[0]] call bis_fnc_param;
- _digits = _number call bis_fnc_numberDigits;
- _digitsCount = count _digits - 1;
- _modBase = _digitsCount % _mod;
- _numberText = "";
- {
- _numberText = _numberText + str _x;
- if ((_foreachindex - _modBase) % (_mod) == 0 && _foreachindex != _digitsCount) then {_numberText = _numberText + ",";};
- } foreach _digits;
- _numberText
- };
- /////////////////////////////////////////////////////////////////////////////////////////////
- // Define what numbers are converted
- ///////////////////////////////////////////////////////////////////////////////////////////
- // Open Dialog
- _handle= CreateDialog "TMN_store";
- playMusic "gearup";
- ///////////////////////////////////////////////////////////////////////////////////////////
- // Menu Music Killer
- tmn_fnc_silence = {
- playMusic "";
- };
- //////////////////////////////////////////////////////////////////////////////////////////////
- // Temporary VAS Access
- tempaccess =
- {
- vasholder = B_vaslimit;
- publicVariable "vasholder";
- sleep 1.0;
- B_vaslimit = 0;
- publicVariable "B_vaslimit";
- hint "You have temporarily allowed VAS access to all players with a 0 or above rating. This authorization will remain effective for 5 minutes";
- sleep 300.0;
- hint "Open VAS Access authorization has expired";
- B_vaslimit = vasholder;
- publicVariable "B_vaslimit";
- };
- ///////////////////////////////////////////////////////////////////////////////////////////
- //Update Budget Balance in GUI
- DoBudget = {
- //Get the dialog display (a viewport)
- _Bdisplay = findDisplay 420;
- if (str (_Bdisplay) != "no display") then
- {
- _ChildControl = _Bdisplay displayCtrl 1100;
- //Change It
- form_B_defensebudget= [B_defensebudget] call TMN_handle_number;
- _ChildControl ctrlSetStructuredText parseText format ["$%1", form_B_defensebudget];
- };
- };
- [] call DoBudget;
- ///////////////////////////////////////////////////////////////////////////////////////////
- //Update Total Balance in GUI
- DoTotal = {
- //Get the dialog display (a viewport)
- _BTdisplay = findDisplay 420;
- if (str (_BTdisplay) != "no display") then
- {
- _ChildControl2 = _BTdisplay displayCtrl 1101;
- //Change It
- form_B_totalcost= [B_totalcost] call TMN_handle_number;
- _ChildControl2 ctrlSetStructuredText parseText format ["$%1", form_B_totalcost];
- };
- };
- [] call DoTotal;
- //////////////////////////////////////////////////////////////////////////////////////////
- //Show Current Rank in GUI
- DoRankChk = {
- //Get the dialog display (a viewport)
- _BRdisplay = findDisplay 420;
- if (str (_BRdisplay) != "no display") then
- {
- _ChildControl3 = _BRdisplay displayCtrl 1102;
- //Change It
- _prank = rank player;
- _Pnum = rating player;
- _ChildControl3 ctrlSetStructuredText parseText format ["Rank is %1<br />Rating is %2", _prank, _Pnum];
- };
- };
- [] call DoRankChk;
- //////////////////////////////////////////////////////////////////////////////////////////////
- //Rank Allow VAS for all
- VASchk = {
- _prat = rank Player;
- if (_prat != B_Maxrank) then {hint format ["You do not have the proper rank (Min Rank %1) to allow VAS access to team", B_Maxrank]} else {[] spawn tempaccess}
- };
- //////////////////////////////////////////////////////////////////////////////////////////////////
- //Rank Show Creds for Rating
- Showcreds= {
- _prank = rank player;
- if (_prank != B_maxrank) then {hint format ["Umm, your credentials aren't very impressive. You must be the %1 to get automatic rating points.", B_maxrank]} else {hint format ["Welcome, %1! You have been appropriated Max rating points", B_maxrank]; player addRating 9999; [] call DoRankChk;};
- };
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- //VAS Ammobox access
- VasOpen={
- _prat = rating player; if ((B_defensebudget< Bvascost) OR (_prat< B_vaslimit)) then {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_vaslimit, Bvascost]} else {execVM "VAS\open.sqf"; B_defensebudget= (B_defensebudget-Bvascost); publicVariable "B_defensebudget"; B_totalcost= (B_totalcost+Bvascost); publicVariable "B_totalcost";}
- };
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- //Add Wheeled Vehicles to Main List
- DoAddWheel = {
- wheelson = 1;
- wingson = 0;
- helion = 0;
- armoredon = 0;
- lbClear 1500;
- _index1= lbAdd [1500, "MAT-V Unarmed Vehicle - $470,000.00"];
- _index2= lbAdd [1500, "MAT-V Armed (.50 HMG) - $500,000.00"];
- _index3 = lbAdd [1500, "MAT-V Armed (40mm GMG) - $520,000.00"];
- _index4 = lbAdd [1500, "HEMTT Troop Transport - Covered - $125,000.00"];
- _index5 = lbAdd [1500, "HEMTT Troop Transport - Open - $90,000.00"];
- _index6 = lbAdd [1500, "ATV - $7,500.00"];
- _index7 = lbAdd [1500, "Civilian Offroad - $32,000.00"];
- if (DAR_HMMWV_Support_Enabled == 1) then {
- _index8 = lbAdd [1500, "HMMWV M1151 - $70,000.00"];
- _index9 = lbAdd [1500, "HMMWV M1151 Deploy - $72,000.00"];
- _index10 = lbAdd [1500, "HMMWV M1151 Woodland - $72,000.00"];
- _index11= lbAdd [1500, "HMMWV M1115 MK19 - $81,000.00"];
- _index12= lbAdd [1500, "HMMWV M1115 MK19 Woodland - $81,000.00"];
- _index13 = lbAdd [1500, "HMMWV M1151 Woodland UA - $79,000.00"];
- _index14 = lbAdd [1500, "HMMWV M1152 - $64,000.00"];
- _index15 = lbAdd [1500, "HMMWV M1152 Woodland - $66,000.00"];
- _index16 = lbAdd [1500, "HMMWV M1165 GMV - $77,000.00"];
- _index17 = lbAdd [1500, "HMMWV M1167 - $83,000.00"];
- _index18 = lbAdd [1500, "HMMWV M1167 Woodland - $83,000.00"];
- };
- };
- ////////////////////////////////////////////////////////////////////////////////////////////////////////
- //Add Fixed Wing to Main List
- DoAddFixedWing = {
- wheelson = 0;
- wingson = 1;
- helion = 0;
- armoredon = 0;
- lbClear 1500;
- _index19= lbAdd [1500, "A-164 Wipeout Anti-Tank Aircraft - $11,800,000.00"];
- };
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- //Add Rotary Aircraft to Main List
- DoAddRotary = {
- wheelson = 0;
- wingson = 0;
- helion = 1;
- armoredon = 0;
- lbClear 1500;
- _index20= lbAdd [1500, "AH-99 Blackfoot Attack Helicopter - $12,100,000.00"];
- _index21= lbAdd [1500, "UH-80 Ghosthawk Combat Transport Helicopter - $21,300,000.00"];
- _index22 = lbAdd [1500, "AH-9 Pawnee Combat Support Helicopter - $2,300,000.00"];
- _index23 = lbAdd [1500, "MH-9 Hummingbird Light Transport Helicopter - $2,000,000.00"];
- };
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- //Add Armored Vehicles to Main List
- DoAddArmored = {
- wheelson = 0;
- wingson = 0;
- helion = 0;
- armoredon = 1;
- lbClear 1500;
- _index24= lbAdd [1500, "M2A1 Slammer Battle Tank = $6,000,000.00"];
- _index25= lbAdd [1500, "M5 Sandstorm MLRS - $2,410,000.00"];
- _index26 = lbAdd [1500, "AMV-7 Amphibious APC - $3,150,000.00"];
- _index27 = lbAdd [1500, "IFV-6c Panther APC - $3,000,000.00"];
- _index28 = lbAdd [1500, "IFV-6a Cheetah AA Tank - $3,800,000.00"];
- };
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Handle the menu clicks (Parent class)
- TMN_fnc_handleClick = {
- TheSelection = _this select 1;
- hint format ["Handle Click Activated. Variable passed was %1", TheSelection];
- if (wheelson == 1) then {_this call TMN_fnc_wheeled;};
- if (wingson == 1) then {_this call TMN_fnc_winged;};
- if (helion == 1) then {_this call TMN_fnc_heli;};
- if (armoredon == 1) then {_this call TMN_fnc_Armor};
- };
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Handle Wheeled Vehicles
- TMN_fnc_wheeled ={
- //DEBUG (Uncomment to use)
- switch (TheSelection) do {
- case 0: {
- _prat = rating player;
- if ((B_defensebudget< HunterUnarmed) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, HunterUnarmed]}
- else {_MATV= "B_MRAP_01_F" createVehicle (getMarkerPos "vehspawn");
- B_defensebudget= (B_defensebudget-HunterUnarmed);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+HunterUnarmed);
- publicVariable "B_totalcost";
- hint format ["You have purchased an unarmed Hunter for $%1", HunterUnarmed];};
- [] call doBudget; [] call DoTotal;
- };
- case 1: {
- _prat = rating player;
- if ((B_defensebudget< HunterHMG) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, HunterHMG]}
- else
- {_MATV= "B_MRAP_01_hmg_F" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-HunterHMG);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+HunterHMG);
- publicVariable "B_totalcost";
- hint format ["You have purchased an Armed Hunter (.50 HMG) for $%1", HunterHMG];};
- [] call doBudget; [] call DoTotal;
- };
- case 2: {
- _prat = rating player;
- if ((B_defensebudget< HunterGMG) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, HunterGMG]}
- else
- {_MATV= "B_MRAP_01_gmg_F" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-HunterGMG);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+HunterGMG);
- publicVariable "B_totalcost";
- hint format ["You have purchased an Armed Hunter (40mm GMG) for $%1", HunterGMG];};
- [] call doBudget; [] call DoTotal;
- };
- case 3: {
- _prat = rating player;
- if ((B_defensebudget< HEMTTcov) OR (_prat < B_Mlimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Mlimit, HEMTTcov]}
- else
- {_MATV= "B_Truck_01_covered_F" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-HEMTTcov);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+HEMTTcov);
- publicVariable "B_totalcost";
- hint format ["You have purchased a covered HEMTT Transport for $%1", HEMTTcov];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 4: {
- _prat = rating player;
- if ((B_defensebudget< HEMTTopn) OR (_prat < B_Mlimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Mlimit, HEMTTopn]}
- else
- {_MATV= "B_Truck_01_transport_F" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-HEMTTopn);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+HEMTTopn);
- publicVariable "B_totalcost";
- hint format ["You have purchased a open HEMTT Transport for $90,000.00", HEMTTopn];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 5: {
- _prat = rating player;
- if ((B_defensebudget< BATV) OR (_prat < B_Mlimit)) then {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Mlimit, BATV]}
- else
- {_MATV= "B_Quadbike_01_F" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-BATV);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+BATV);
- publicVariable "B_totalcost";
- hint format ["You have purchased an ATV for $%1", BATV];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 6: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1151) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1151]}
- else
- {_MATV= "DAR_M1151" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1151);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1151);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1151 for $%1", DAR_M1151];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 7: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1151_Deploy) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1151_Deploy]}
- else
- {_MATV= "DAR_M1151_Deploy" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1151_Deploy);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1151_Deploy);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1151 Deploy for $%1", DAR_M1151_Deploy];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 8: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1151Woodland) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1151Woodland]}
- else
- {_MATV= "DAR_M1151Woodland" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1151Woodland);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1151Woodland);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1151 Woodland for $%1", DAR_M1151Woodland];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 9: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M115_MK19) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M115_MK19]}
- else
- {_MATV= "DAR_M115_MK19" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M115_MK19);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M115_MK19);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1151 MK19 for $%1", DAR_M115_MK19];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 10: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M115_MK19Woodland) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M115_MK19Woodland]}
- else
- {_MATV= "DAR_M115_MK19Woodland" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M115_MK19Woodland);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M115_MK19Woodland);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1151 Woodland MK19 for $%1", DAR_M115_MK19Woodland];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 11; {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1151WoodlandUA) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1151WoodlandUA]}
- else {_MATV= "DAR_M1151WoodlandUA" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1151WoodlandUA);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1151WoodlandUA);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1151 Woodland UA for $%1", DAR_M1151WoodlandUA];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 12: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1152) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1152]}
- else
- {_MATV= "DAR_M1152" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1152);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1152);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1152 for $%1", DAR_M1152];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 13: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1152Woodland) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1152Woodland]}
- else
- {_MATV= "DAR_M1152Woodland" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1152Woodland);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1152Woodland);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1152 Woodland for $%1", DAR_M1152Woodland];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 14: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1165_GMV) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1165_GMV]}
- else
- {_MATV= "DAR_M1165_GMV" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1165_GMV);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1165_GMV);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1165 GMV Deploy for $%1", DAR_M1165_GMV];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 15: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1167) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1167]}
- else
- {_MATV= "DAR_M1167" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1167);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1167);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1167 for $%1", DAR_M1167];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 16: {
- _prat = rating player;
- if ((B_defensebudget< DAR_M1167Woodland) OR (_prat < B_Llimit))
- then
- {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Llimit, DAR_M1167Woodland]}
- else
- {_MATV= "DAR_M1167Woodland" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-DAR_M1167Woodland);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+DAR_M1167Woodland);
- publicVariable "B_totalcost";
- hint format ["You have purchased a HMMWV M1167 Woodland for $%1", DAR_M1167Woodland];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 17: {
- _prat = rating player;
- if ((B_defensebudget< COffRoad) OR (_prat < B_Mlimit)) then {hint format ["You do not have sufficient rating (Min Rating %1) or money (Costs $%2) to do this.", B_Mlimit, COffRoad]}
- else
- {_MATV= "C_Offroad_01_F" createVehicle (getMarkerPos "vehspawn");
- _MATV setVehicleLock "UNLOCKED";
- B_defensebudget= (B_defensebudget-COffRoad);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+COffRoad);
- publicVariable "B_totalcost";
- hint format ["You have purchased an Civilian Offroad for $%1", COffRoad];
- [] call doBudget; [] call DoTotal;
- };
- };
- default { hint "Something went wrong...Couldn't find case for selection!" };
- // Last Bracket For Wheeled Case
- };
- };
- //////////////////////////////////////////////////////////////////////
- //Handle Winged
- TMN_fnc_winged= {
- switch (TheSelection) do {
- case 0: {
- form_A164= [A164] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget < A164) OR (_prat != B_Maxrank))
- then
- {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_A164]}
- else
- {_MATV= "B_Plane_CAS_01_F" createVehicle (getMarkerPos "airspawn");
- B_defensebudget= (B_defensebudget-A164);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+A164);
- publicVariable "B_totalcost";
- hint format ["You have purchased a A164 Wipeout for $%1", form_A164];
- [] call doBudget; [] call DoTotal;
- };
- };
- default { hint "Something went wrong...Couldn't find case for selection!" };
- //Last Bracket for Winged Case
- };
- };
- //////////////////////////////////////////////////////////////////////
- //Handle Heli
- TMN_fnc_heli= {
- switch (TheSelection) do {
- case 0: {
- form_AH99= [AH99] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget < AH99) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_AH99]}
- else
- {_MATV= "B_Heli_Attack_01_F" createVehicle (getMarkerPos "chspawn");
- B_defensebudget= (B_defensebudget-AH99);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+AH99);
- publicVariable "B_totalcost";
- hint format ["You have purchased a AH-99 Blackfoot for $%1", form_AH99];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 1: {
- form_UH80= [UH80] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< UH80) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_UH80]}
- else
- {_MATV= "B_Heli_Transport_01_F" createVehicle (getMarkerPos "chspawn");
- B_defensebudget= (B_defensebudget-UH80);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+UH80);
- publicVariable "B_totalcost";
- hint format ["You have purchased a UH-80 Ghosthawk for $%1", form_UH80];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 2: {
- form_AH9= [AH9] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< AH9) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, AH9]}
- else
- {_MATV= "B_Heli_Light_01_armed_F" createVehicle (getMarkerPos "chspawn");
- B_defensebudget= (B_defensebudget-AH9);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+AH9);
- publicVariable "B_totalcost";
- hint format ["You have purchased an AH-9 Pawnee for $%1", form_AH9];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 3: {
- form_MH9= [MH9] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< MH9) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_MH9]}
- else
- {_MATV= "B_Heli_Light_01_F" createVehicle (getMarkerPos "chspawn");
- B_defensebudget= (B_defensebudget-MH9);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+MH9);
- publicVariable "B_totalcost";
- hint format ["You have purchased an MH-9 Hummingbird for $%1", form_MH9];
- [] call doBudget; [] call DoTotal;
- };
- };
- default { hint "Something went wrong...Couldn't find case for selection!" };
- };
- };
- //////////////////////////////////////////////////////////////////////
- //Handle Armor
- TMN_fnc_armor= {
- switch (TheSelection) do {
- case 0: {
- form_M2A1= [M2A1] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< M2A1) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_M2A1]}
- else
- {_MATV= "B_MBT_01_cannon_F" createVehicle (getMarkerPos "vehspawn");
- B_defensebudget= (B_defensebudget-M2A1);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+M2A1);
- publicVariable "B_totalcost";
- hint format ["You have purchased an M2A1 Slammer for $%1", form_M2A1];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 1: {
- form_Sandstorm= [Sandstorm] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< Sandstorm) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_Sandstorm]}
- else
- {_MATV= "B_MBT_01_mlrs_F" createVehicle (getMarkerPos "vehspawn");
- B_defensebudget= (B_defensebudget-Sandstorm);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+Sandstorm);
- publicVariable "B_totalcost";
- hint format ["You have purchased an M5 Sandstorm MLRS for $%1", form_Sandstorm];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 2: {
- form_AMV7= [AMV7] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< AMV7) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_AMV7]}
- else
- {_MATV= "B_APC_Wheeled_01_cannon_F" createVehicle (getMarkerPos "vehspawn");
- B_defensebudget= (B_defensebudget-AMV7);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+AMV7);
- publicVariable "B_totalcost";
- hint format ["You have purchased an AMV 7 for $%1", form_AMV7];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 3: {
- form_IFV6c= [IFV6c] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< IFV6c) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_IFV6c]}
- else
- {_MATV= "B_APC_Tracked_01_rcws_F" createVehicle (getMarkerPos "vehspawn");
- B_defensebudget= (B_defensebudget-IFV6c);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+IFV6c);
- publicVariable "B_totalcost";
- hint format ["You have purchased an IFV-6C Panther APC for $%1", form_IFV6c];
- [] call doBudget; [] call DoTotal;
- };
- };
- case 4: {
- form_IFV6a= [IFV6a] call TMN_handle_number;
- _prat = rank player;
- if ((B_defensebudget< IFV6a) OR (_prat != B_Maxrank)) then {hint format ["You do not have sufficient rank (Min Rank %1) or money (Costs $%2) to do this.", B_maxrank, form_IFV6a]}
- else
- {_MATV= "B_APC_Tracked_01_AA_F" createVehicle (getMarkerPos "vehspawn");
- B_defensebudget= (B_defensebudget-IFV6a);
- publicVariable "B_defensebudget";
- B_totalcost= (B_totalcost+IFV6a);
- publicVariable "B_totalcost";
- hint format ["You have purchased an IFV-6C Cheetah Anti Air Tank for $%1", form_IFV6a];
- [] call doBudget; [] call DoTotal;
- };
- };
- default { hint "Something went wrong...Couldn't find case for selection!" };
- // End of Armor Block
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement