Advertisement
ikatzuki

Untitled

Jan 7th, 2017
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. #include "\life_server\script_macros.hpp"
  2. /*
  3. File: fn_gangCash.sqf
  4. Author: Fuel RebornRoleplay.com
  5.  
  6. Description:
  7. checks the gang areas, then rewards the gang if they own them
  8. */
  9.  
  10. /*
  11. #########################
  12. # north outpost #
  13. #########################
  14. */
  15.  
  16. //gets the flag locations
  17. _area = [4877.5698,351.06879,21927.076] nearestObject "Flag_Red_F";
  18.  
  19. //gets the gang names of the flag owners
  20. _owner = _area getVariable ["gangOwner",grpNull];
  21.  
  22. //get the gang funds
  23. _gFund = _owner getVariable ["gang_bank",0];
  24.  
  25. //set the new gang funds
  26. _owner setVariable ["gang_bank",round(_gFund+((count playableUnits)*2000)),true];
  27.  
  28. //push gang funds to DB
  29. [1,_owner] call TON_fnc_updateGang;
  30.  
  31. /*
  32. #########################
  33. # south pen outpost #
  34. #########################
  35. */
  36.  
  37. //gets the flag locations
  38. _area2 = [11197.487,186.38686,8717.8066] nearestObject "Flag_Red_F";
  39.  
  40. //gets the gang names of the flag owners
  41. _owner = _area2 getVariable ["gangOwner",grpNull];
  42.  
  43. //get the gang funds
  44. _gFund = _owner getVariable ["gang_bank",0];
  45.  
  46. //set the new gang funds
  47. _owner setVariable ["gang_bank",round(_gFund+((count playableUnits)*2000)),true];
  48.  
  49. //push gang funds to DB
  50. [1,_owner] call TON_fnc_updateGang;
  51.  
  52. /*
  53. #########################
  54. # east outpost #
  55. #########################
  56. */
  57.  
  58. //gets the flag locations
  59. _area3 = [21492.381,15.649413,10828.369] nearestObject "Flag_Red_F";
  60.  
  61. //gets the gang names of the flag owners
  62. _owner = _area3 getVariable ["gangOwner",grpNull];
  63.  
  64. //get the gang funds
  65. _gFund = _owner getVariable ["gang_bank",0];
  66.  
  67. //set the new gang funds
  68. _owner setVariable ["gang_bank",round(_gFund+((count playableUnits)*2000)),true];
  69.  
  70. //push gang funds to DB
  71. [1,_owner] call TON_fnc_updateGang;
  72.  
  73. //time between scripts
  74. Sleep 900;
  75.  
  76. [] spawn TON_fnc_gangCash;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement