Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.75 KB | None | 0 0
  1.  /*
  2.    _____ _    _ _   _    _____       _______ _    _ ______ _____     _______     _______ _______ ______ __  __
  3.   / ____| |  | | \ | |  / ____|   /\|__   __| |  | |  ____|  __ \   / ____\ \   / / ____|__   __|  ____|  \/  |
  4.  | |  __| |  | |  \| | | |  __   /  \  | |  | |__| | |__  | |__) | | (___  \ \_/ / (___    | |  | |__  | \  / |
  5.  | | |_ | |  | | . ` | | | |_ | / /\ \ | |  |  __  |  __| |  _  /   \___ \  \   / \___ \   | |  |  __| | |\/| |
  6.  | |__| | |__| | |\  | | |__| |/ ____ \| |  | |  | | |____| | \ \   ____) |  | |  ____) |  | |  | |____| |  | |
  7.   \_____|\____/|_| \_|  \_____/_/    \_\_|  |_|  |_|______|_|  \_\ |_____/   |_| |_____/   |_|  |______|_|  |_|
  8.                                                                                                                
  9.  
  10. Guns should be obtained in some way... a rare way..
  11. Therefore I'm introducing you the gun gather system, which uses gun parts to create weapons. They can be collected from a ship every 3 hours
  12. (that has a 1/2 chance to have those) by families' R5s+.
  13.  
  14. To do list:
  15. Currently just starting, as soon as I progress enough to update this I will.                                                                                                        
  16. */
  17.  
  18. // remove when implemented
  19. #include <a_samp>
  20. #include <zcmd>
  21. #include <sscanf2>
  22. //
  23.  
  24. #define MAX_DROPPED_GPARTS 10
  25.  
  26. enum GunPart {
  27.     gID,
  28.     gType,
  29.     gDropped,
  30.     gPos[3]
  31. };
  32. static GunParts[MAX_DROPPED_GPARTS][GunPart];
  33.  
  34. forward ShipArrivalTimer();
  35. forward ShipDockingTimer();
  36.  
  37. hook GunSystem_OnGameModeInit()
  38. {
  39.     SetTimer("ShipArrivalTimer", 10800000, false);
  40.     return 1;
  41. }
  42.  
  43. public ShipArrivalTimer()
  44. {
  45.     SetTimer("ShipDockingTimer", 1200000, false);
  46.     for(new i = 0; i < MAX_DROPPED_GPARTS; i++)
  47.     {
  48.         new shiphasillegal = random(2);
  49.         GunParts[i][gDropped] = shiphasillegal;
  50.     }
  51.     return 1;
  52. }
  53.  
  54. public ShipDockingTimer()
  55. {
  56.     SetTimer("ShipArrivalTimer", 10800000, false);
  57.     return 1;
  58. }
  59.  
  60. CMD:takegunpart(playerid, params[])
  61. {
  62.     // if(pInfo[playerid][pFamily] > 0)
  63.     //{
  64.     //if(pInfo[playerid][pRank] >= 5)
  65.     //{
  66.     if(IsPlayerInRangeOfPoint(playerid, 5.0, 2834.8857, -2386.6113, 17.5051) || IsPlayerInRangeOfPoint(playerid, 5.0, 2842.3608, -2500.4163, 17.5051)
  67.         || IsPlayerInRangeOfPoint(playerid, 5.0, 2823.5750, -2474.1826, 12.0983) || IsPlayerInRangeOfPoint(playerid, 5.0, 2837.9119, -2449.5093, 19.9220)
  68.         || IsPlayerInRangeOfPoint(playerid, 5.0, 2845.8704, -2447.4880, 19.92203) || IsPlayerInRangeOfPoint(playerid, 5.0, 2830.7627, -2447.7185, 19.9220))
  69.     {
  70.         for(new i = 0; i < MAX_DROPPED_GPARTS; i++)
  71.         {
  72.             if(GunParts[i][gDropped] == 0) return SendClientMessage(playerid, -1, "The ship doesn't have any gun parts right now.");
  73.             GunParts[i][gDropped] = 0;
  74.  
  75.         }  
  76.     }
  77.  
  78.     //}
  79.     //}
  80.     return 1;
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement