Advertisement
Veticus

Arma 3* FARP Current FARP_fnc_Player.sqf

Apr 22nd, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. // Sides/Faction;
  2. FARP_fnc_Side = {
  3. FARP_Civ == Civilian;
  4. FARP_Cop == WEST;
  5. FARP_EMT == EAST;
  6. };
  7.  
  8. // Sides/Factions Arrays;
  9. FARP_fnc_SideArray = {
  10. FARP_CivArray = [FARP_Civ1];
  11. FARP_CopArray = [FARP_Cop1];
  12. FARP_EMTArray = [FARP_EMT1];
  13. };
  14.  
  15. // Main Player Variables;
  16. FARP_fnc_Player_Vars = {
  17. FARP_InCash = 1000;
  18. FARP_OutCash = 10000;
  19.  
  20. FARP_CivPaycheck = 1000;
  21. FARP_CopPaycheck = 2000;
  22. FARP_EMTPaycheck = 2000;
  23. };
  24.  
  25. // Player/Sides Basic setup;
  26. FARP_fnc_PlayerSetup = {
  27. if (FARP_Civ in FARP_CivArray) then {
  28. player removeAllWeapons;
  29. };
  30. if (FARP_Cop in FARP_CopArray) then {
  31. player removeAllWeapons;
  32. };
  33. if (FARP_EMT in FARP_EMTArray) then {
  34. player removeAllWeapons;
  35. };
  36. };
  37.  
  38. // Check Balance of "FARP_Cash";
  39. FARP_fnc_Player_CheckBalance = {
  40. private ["_NamePlayer"];
  41. _NamePlayer = name player;
  42. if (isNil "FARP_Cash") exitWith {};
  43. if (FARP_Cash <= 0) then {
  44. hintSilent parseText format ["%1: You currently have $%2", _NamePlayer, FARP_Cash];
  45. };
  46. };
  47.  
  48. // Paychecks for all Players/Sides;
  49. FARP_fnc_SidePaycheck = {
  50. while {true} do {
  51. if (isNil "FARP_OutCash") exitWith {};
  52. if (isNil "FARP_CivPaycheck") exitWith {};
  53. if (isNil "FARP_CopPaycheck") exitWith {};
  54. if (isNil "FARP_EMTPaycheck") exitWith {};
  55. sleep 600;
  56. if (FARP_Civ) then {
  57. hintSilent parseText format ["<t color = '#0000FF'>Paycheck:</t> <t color = '#FFFFFF'>Your paycheck has come through. You now have $%1 in the bank</t>", FARP_OutCash];
  58. FARP_OutCash = FARP_OutCash + FARP_CivPaycheck;
  59. };
  60. if (FARP_Cop) then {
  61. FARP_OutCash = FARP_OutCash + FARP_CopPaycheck;
  62. hintSilent parseText format ["<t color = '#0000FF'>Paycheck:</t> <t color = '#FFFFFF'>Your paycheck has come through. You now have $%1 in the bank</t>", FARP_OutCash];
  63. };
  64. if (FARP_EMT) then {
  65. FARP_OutCash = FARP_OutCash + FARP_EMTPaycheck;
  66. hintSilent parseText format ["<t color = '#0000FF'>Paycheck:</t> <t color = '#FFFFFF'>Your paycheck has come through. You now have $%1 in the bank</t>", FARP_OutCash];
  67. };
  68. };
  69. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement