Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.78 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define AQUAGREEN       0x03D687FF
  4. #define COLOUR_YELLOW   0xFFFF00AA
  5. #define ADMINFS_MESSAGE_COLOR 0xFF444499
  6. #define PM_INCOMING_COLOR     0xFFFF22AA
  7. #define PM_OUTGOING_COLOR     0xFFCC2299
  8. #define TEAM_GROVE_COLOR 0x00FF00AA
  9. #define TEAM_BALLA_COLOR 0xFF00FFAA
  10. #define TEAM_VAGOS_COLOR 0xFFFF00AA
  11. #define TEAM_AZTECAS_COLOR 0x00CCFFAA
  12. #define TEAM_MAFIA_COLOR 0x333333AA
  13. #define COLOR_GOLD 0xB8860BAA
  14. #define COLOR_RED 0xFF0000AA
  15. #define COLOR_VERDE 0x00FF00AA
  16. #define COLOR_WHITE 0xFFFFFFAA
  17. #define COLOR_LARANJA 0xFF9933AA
  18. #define BLACK               0x000000FF
  19. #define GREEN               0x21DD00FF
  20. #define RED                 0xE60000FF
  21. #define ADMIN_RED           0xFB0000FF
  22. #define YELLOW              0xFFFF00FF
  23. #define ORANGE              0xF97804FF
  24. #define LIGHTRED            0xFF8080FF
  25. #define LIGHTBLUE           0x00C2ECFF
  26. #define PURPLE              0xB360FDFF
  27. #define BLUE                0x1229FAFF
  28. #define LIGHTGREEN          0x38FF06FF
  29. #define DARKPINK            0xE100E1FF
  30. #define NICESKY             0x99FFFFAA
  31. #define GRAY                0xCECECEFF
  32. #define HOMER               0x33AA33AA
  33. #define COLOR_GREY          0xAFAFAFAA
  34. #define COLOR_GREEN         0x33AA33AA
  35. #define COLOR_YELLOW        0xFFFF00AA
  36. #define COLOR_LIGHTBLUE     0x00D0F6AA
  37. #define COLOR_PURPLE        0xA600F6AA
  38. #define COLOR_TUT           0xF6C861AA
  39. #define COLOR_ROYAL         0x00C1F6AA
  40. #define COLOR_CWHITE        0xE0FFFFAA
  41. #define MB_COLOR            0xDEB916
  42. #define MB_COLOR2           0xF6C41E
  43.  
  44.  
  45. forward timermb();
  46.  
  47. new moneypickup;
  48. new Float:RandomMoney[16][3] = // 16 is the number of spawns, so if u add a MB spawn, replace 16 for 17, coz there will be 17 mb spawns
  49. {
  50. {-2811.9553,-1530.7021,140.8438},//Mount Chilliad (1)
  51. {-2229.8809,-1743.8728,480.8748},//Mount Chilliad (2)
  52. {-1061.0233,1561.1365,39.6321},//Tierra Robada (1)
  53. {-1221.4385,1845.6881,41.5014},//Tierra Robada (2)
  54. {-688.3251,932.3082,13.6328},//Tierra Robada (3)
  55. {-1731.3486,1372.5109,7.0469}, //Esplanade North (1)
  56. {-1670.9714,1339.6707,7.1875},//Esplanade North (2)
  57. {-1611.6484,1339.3597,3.4253},//Esplanade North (3)
  58. {-1589.3300,898.0165,9.2266},// Downtown SF (1)
  59. {-1481.7439,685.3160,1.3203}, // Downtown SF (2)
  60. {-1572.7738,657.6183,7.1875}, // Downtown SF (3)
  61. {-1740.4884,964.4546,29.0628},// Financial (1)
  62. {-1733.7584,991.4056,21.0273},// Financial (2)
  63. {-1992.8717,1126.5261,53.2247}, // Calton (1)
  64. {-2105.4976,891.7657,76.7031}, // Calton (2)
  65. {-2297.6179,1096.6211,80.0278} // Calton (3)
  66. };
  67.  
  68. public OnFilterScriptInit()
  69. {
  70.     SetTimer("timermb", 30000, 0);
  71.     print("\n--------------------------------------");
  72.     print("UY MB was succesfully loaded");
  73.     print("--------------------------------------\n");
  74.     return 1;
  75. }
  76.  
  77. public OnFilterScriptExit()
  78. {
  79.     return 1;
  80. }
  81.  
  82. public OnPlayerPickUpPickup(playerid, pickupid)
  83. {
  84.     if(pickupid == moneypickup)
  85.     {
  86.     new str[128];
  87.     new pName[MAX_PLAYER_NAME];
  88.     new earnings = 10000+random(40001);
  89.     GetPlayerName(playerid, pName, sizeof(pName));
  90.     format(str, sizeof(str),"%s has found the Moneybag! And collected $%d!", pName, earnings);
  91.     GameTextForPlayer(playerid,"~w~You have found the ~b~ MoneyBag", 5000, 3);
  92.     SendClientMessageToAll(YELLOW, str);
  93.    
  94.     GivePlayerMoney(playerid, earnings);
  95.     DestroyPickup(moneypickup);
  96.     SetTimer("timermb", 25000, 0);
  97.     }
  98.     return 1;
  99. }
  100.  
  101. public timermb()
  102. {
  103.     new rand = random(sizeof(RandomMoney));
  104.     moneypickup = CreatePickup(1550, 3, RandomMoney[rand][0], RandomMoney[rand][1], RandomMoney[rand][2]);
  105.     new string[128];
  106.     SendClientMessageToAll(MB_COLOR2, string);
  107.     format(string,sizeof string,"The MB is somewhere in %s.", GetRandomHint(rand));
  108.     SendClientMessageToAll(YELLOW, string);
  109.     SendClientMessageToAll(YELLOW,"Find the MB! And receive $10000 to $50000!");
  110.     return 1;
  111. }
  112.  
  113.  
  114. stock GetRandomHint(Pickup)
  115. {
  116. new string[50];
  117. switch(Pickup)
  118. {
  119. case 0: format(string, sizeof(string), "Mount Chilliad");
  120. case 1: format(string, sizeof(string), "Mount Chilliad");
  121. case 2: format(string, sizeof(string), "Tierra Robada");
  122. case 3: format(string, sizeof(string), "Tierra Robada");
  123. case 4: format(string, sizeof(string), "Tierra Robada");
  124. case 5: format(string, sizeof(string), "Esplanade North");
  125. case 6: format(string, sizeof(string), "Esplanade North");
  126. case 7: format(string, sizeof(string), "Esplanade North");
  127. case 8: format(string, sizeof(string), "Downtown San Fierro");
  128. case 9: format(string, sizeof(string), "Downtown San Fierro");
  129. case 10: format(string, sizeof(string), "Downtown San Fierro");
  130. case 11: format(string, sizeof(string), "Financial");
  131. case 12: format(string, sizeof(string), "Financial");
  132. case 13: format(string, sizeof(string), "Calton Heights");
  133. case 14: format(string, sizeof(string), "Calton Heights");
  134. case 15: format(string, sizeof(string), "Calton Heights");
  135. //So many cases as you have pickups. The 1st spawn(see the top of the script) is in Mount Chilliad, so the 1st case(case 0) is "Mount Chilliad"
  136. }
  137. return string;
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement