Guest User

Help

a guest
Jan 23rd, 2011
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.43 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define COLOR_BLUEAQUA 0x7E60FFFF
  4.  
  5. enum BriefcaseInfo
  6. {
  7.     Float:locX,
  8.     Float:locY,
  9.     Float:locZ,
  10.     loc[20]
  11. }
  12.  
  13.  
  14. new Float:BriefcasePoints[2][BriefcaseInfo] =
  15. {
  16.     {-1130.1259,-1095.8928,129.2188, "The Farm"},//The Farm MB3
  17.     {-1731.3486,1372.5109,7.0469, "Esplanade North"}//Esplanade North MB5
  18. };
  19. new mypickup;
  20.  
  21. main()
  22. {
  23. }
  24. public OnGameModeInit()
  25. {
  26.     new rand = random(sizeof(BriefcasePoints));
  27.     mypickup = CreatePickup(1550, 23, BriefcasePoints[rand][locX], BriefcasePoints[rand][locY], BriefcasePoints[rand][locZ]);
  28.     new msg[128];
  29.     format(msg, sizeof(msg), "A new money bag has spawned near %s!", Float:locX);
  30.     SendClientMessageToAll(0x7E60FFFF, msg);
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerSpawn(playerid)
  35. {
  36.     SetPlayerPos(playerid, -1731.3486,1372.5109,7.0469);
  37.     return 1;
  38. }
  39.  
  40. public OnPlayerPickUpPickup(playerid, pickupid)
  41. {
  42.     if(pickupid == mypickup)
  43.     {
  44.         DestroyPickup(mypickup);
  45.         new rand = random(sizeof(BriefcasePoints));
  46.         mypickup = CreatePickup(1550, 2, BriefcasePoints[rand][locX], BriefcasePoints[rand][locY], BriefcasePoints[rand][locZ]);
  47.         GivePlayerMoney(playerid, 50000);
  48.         new name[MAX_PLAYER_NAME], string[44];
  49.         GetPlayerName(playerid, name, sizeof(name));
  50.         format(string, sizeof(string), "%s (%d) has found the money bag!",name, playerid);
  51.         SendClientMessageToAll(0x7E60FFFF, string);
  52.     }
  53.     return 1;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment