Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. private ["_nbr","_zone1","_zone2","_zone3","_gangPaycheck"];
  3. _nbr = 0;
  4. _gangPaycheck = 0;
  5. _zone1 = nearestBuilding (getMarkerPos "gang_flag_1");
  6. _zone2 = nearestBuilding (getMarkerPos "gang_flag_2");
  7. _zone3 = nearestBuilding (getMarkerPos "gang_flag_3");
  8.  
  9.  
  10. // Zone de gang 1
  11. if (!isNil (_zone1 getVariable ["gangOwner",grpNull])) then
  12. {
  13. if ((_zone1 getVariable ["gangOwner",grpNull]) == (group player)) then
  14. {
  15. _gangPaycheck = _gangPaycheck + 10000;
  16. _nbr = _nbr + 1;
  17. };
  18. };
  19.  
  20.  
  21. // Zone de gang 2
  22. if (!isNil (_zone2 getVariable ["gangOwner",grpNull])) then
  23. {
  24. if ((_zone2 getVariable ["gangOwner",grpNull]) == (group player)) then
  25. {
  26. _gangPaycheck = _gangPaycheck + 10000;
  27. _nbr = _nbr + 1;
  28. };
  29. };
  30.  
  31.  
  32. // Zone de gang 3
  33. if (!isNil (_zone3 getVariable ["gangOwner",grpNull])) then
  34. {
  35. if ((_zone3 getVariable["gangOwner",grpNull]) == (group player)) then
  36. {
  37. _gangPaycheck = _gangPaycheck + 10000;
  38. _nbr = _nbr + 1;
  39. };
  40. };
  41.  
  42.  
  43. switch (_nbr) do
  44. {
  45. case 0: {_gangPaycheck = 0};
  46. case 1: {_gangPaycheck = _gangPaycheck + 5000;};
  47. case 2: {_gangPaycheck = _gangPaycheck + 10000;};
  48. case 3: {_gangPaycheck = _gangPaycheck + 15000;};
  49. };
  50.  
  51. hint format ["Ton gang possède %1 zones de gang tu as donc gagné %2 €", _nbr, _gangPaycheck];
  52.  
  53. BANK = BANK + _gangPaycheck;
  54.  
  55. sleep 60;
  56.  
  57. [] spawn life_fnc_gangsalaire;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement