Advertisement
Guest User

Pirate System v1.0

a guest
Jul 28th, 2013
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. // Unique Pirate System //
  2. // Created by Ady_Ro //
  3.  
  4. #include <a_samp>
  5. #include <zcmd>
  6. #include <sscanf>
  7.  
  8. #define SM SendClientMessage
  9. #define SMA SendClientMessageToAll
  10.  
  11. new PirateB;
  12.  
  13. #if defined FILTERSCRIPT
  14. public OnFilterScriptInit()
  15. {
  16. print("\n--------------------------------------");
  17. print(" Ady's Pirates System v1.0 [BETA]");
  18. print("--------------------------------------\n");
  19. PirateB = CreateObject(8493, -2956.29565, -2501.05029, 18.00000, 0.00000, 0.00000, 0.00000);
  20. CreateObject(971, -2813.59375, -2508.25391, 2.50000, -270.00000, 0.00000, 0.00000);
  21. CreateObject(971, -2822.54077, -2508.22388, 2.50000, -270.00000, 0.00000, 0.00000);
  22. CreateObject(971, -2831.39014, -2508.18774, 2.50000, -270.00000, 0.00000, 0.00000);
  23. CreateObject(971, -2840.29980, -2508.19409, 2.50000, -270.00000, 0.00000, 0.00000);
  24. CreateObject(971, -2849.22900, -2508.22876, 2.50000, -270.00000, 0.00000, 0.00000);
  25. CreateObject(971, -2858.21484, -2508.28076, 2.50000, -270.00000, 0.00000, 0.00000);
  26. CreateObject(971, -2867.11548, -2508.30981, 2.50000, -270.00000, 0.00000, 0.00000);
  27. CreateObject(971, -2875.99683, -2508.33496, 2.50000, -270.00000, 0.00000, 0.00000);
  28. CreateObject(971, -2885.06592, -2508.42676, 2.50000, -270.00000, 0.00000, 0.00000);
  29. CreateObject(971, -2894.26855, -2508.49023, 2.50000, -270.00000, 0.00000, 0.00000);
  30. CreateObject(971, -2903.11230, -2508.50415, 2.50000, -270.00000, 0.00000, 0.00000);
  31. CreateObject(971, -2912.08887, -2508.57495, 2.50000, -270.00000, 0.00000, 0.00000);
  32. CreateObject(971, -2921.08887, -2508.52808, 2.50000, -270.00000, 0.00000, 0.00000);
  33. CreateObject(971, -2930.08911, -2508.33887, 2.50000, -270.00000, 0.00000, 0.00000);
  34. CreateObject(971, -2948.19971, -2508.28564, 3.22000, -50.00000, 0.00000, 95.00000);
  35. CreateObject(971, -2938.94653, -2508.34351, 2.50000, -270.00000, 0.00000, 0.00000);
  36. Create3DTextLabel("Welcome to Pirates Beach!\nThe boat waits you!",-2773.0190,-2507.3447,3.0000,89.7255);
  37. Create3DTextLabel("Walk on the gates\nBe careful!",-2847.8032,-2508.4011,3.6834,90.6841);
  38. Create3DTextLabel("Welcome on boat!\nTo start the adventure /start",-2957.0249,-2511.3245,6.7109,0.7356);
  39. return 1;
  40. }
  41.  
  42. public OnFilterScriptExit()
  43. {
  44. return 1;
  45. }
  46.  
  47. #else
  48.  
  49. main()
  50. {
  51. print("\n----------------------------------");
  52. print(" Blank Gamemode by your name here");
  53. print("----------------------------------\n");
  54. }
  55.  
  56. #endif
  57.  
  58. public OnGameModeInit()
  59. {
  60. return 1;
  61. }
  62.  
  63. public OnGameModeExit()
  64. {
  65. return 1;
  66. }
  67.  
  68. public OnPlayerCommandText(playerid, cmdtext[])
  69. {
  70. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  71. {
  72. // Do something here
  73. return 1;
  74. }
  75. return 0;
  76. }
  77. CMD:pirate(playerid,params[])
  78. {
  79. new str[100];
  80. SM(playerid,0xFF0000FF,"Welcome to Pirate Adventure");
  81. SetPlayerPos(playerid,-2773.0190,-2507.3447,3.0000,89.7255);
  82. format(str,100,"Cmon quickly , %s goes to /pirate and try to start the Pirate Boat",Name(playerid));
  83. SMA(0xFF0000FF,str);
  84. return 1;
  85. }
  86. CMD:start(playerid,params[])
  87. {
  88. new str2[124];
  89. if(!IsPlayerInRangeOfPoint(playerid,8.0,-2957.9026,-2515.0371,6.7109,326.5457)) return SM(playerid,0xFF0000FF,"Nu esti pe o corabie!");
  90. SM(playerid,0xFF0000FF,"Now you started the boat !");
  91. MoveObject(PirateB,-3017.2390,493.4922,-0.3834,9.5227,13.5);
  92. format(str2,124,"%s started the boat! /pirate fast!",Name(playerid));
  93. SMA(0xFF0000FF,str2);
  94. return 1;
  95. }
  96.  
  97.  
  98. stock Name(playerid)
  99. {
  100. new pName[MAX_PLAYER_NAME];
  101. GetPlayerName(playerid,pName,sizeof(pName));
  102. return 1;
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement