Advertisement
Hitman1

Gps by hitman

Jun 1st, 2012
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.89 KB | None | 0 0
  1. //Textdraw Gps by Hitman
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5.  
  6. new Text:GPSLOGO;
  7. new Text:OD;
  8. new Text:GPSBANKA;
  9. new Text:GPSBURG;
  10. new Text:GPSPD;
  11. new Text:GPSMD;
  12.  
  13. #define SCM SendClientMessage
  14. #pragma tabsize 0
  15.  
  16. public OnFilterScriptInit()
  17. {
  18. GPSLOGO = TextDrawCreate(500.000000, 102.000000, " GPS");
  19. TextDrawBackgroundColor(GPSLOGO, 255);
  20. TextDrawFont(GPSLOGO, 2);
  21. TextDrawLetterSize(GPSLOGO, 0.280000, 1.300000);
  22. TextDrawColor(GPSLOGO, -1);
  23. TextDrawSetOutline(GPSLOGO, 0);
  24. TextDrawSetProportional(GPSLOGO, 1);
  25. TextDrawSetShadow(GPSLOGO, 1);
  26. TextDrawUseBox(GPSLOGO, 1);
  27. TextDrawBoxColor(GPSLOGO, 255);
  28. TextDrawTextSize(GPSLOGO, 586.000000, 12.000000);
  29.  
  30. OD = TextDrawCreate(500.000000, 118.000000, " ODABERITE DESTINACIJU");
  31. TextDrawBackgroundColor(OD, 255);
  32. TextDrawFont(OD, 1);
  33. TextDrawLetterSize(OD, 0.190000, 0.799999);
  34. TextDrawColor(OD, -1);
  35. TextDrawSetOutline(OD, 0);
  36. TextDrawSetProportional(OD, 1);
  37. TextDrawSetShadow(OD, 1);
  38. TextDrawUseBox(OD, 1);
  39. TextDrawBoxColor(OD, 255);
  40. TextDrawTextSize(OD, 586.000000, 12.000000);
  41.  
  42. GPSBANKA = TextDrawCreate(500.000000, 132.000000, " GPS-BANKA");
  43. TextDrawBackgroundColor(GPSBANKA, 255);
  44. TextDrawFont(GPSBANKA, 2);
  45. TextDrawLetterSize(GPSBANKA, 0.280000, 1.300000);
  46. TextDrawColor(GPSBANKA, -1);
  47. TextDrawSetOutline(GPSBANKA, 0);
  48. TextDrawSetProportional(GPSBANKA, 1);
  49. TextDrawSetShadow(GPSBANKA, 1);
  50. TextDrawUseBox(GPSBANKA, 1);
  51. TextDrawBoxColor(GPSBANKA, 255);
  52. TextDrawTextSize(GPSBANKA, 586.000000, 12.000000);
  53.  
  54. GPSBURG = TextDrawCreate(500.000000, 149.000000, " GPS-BURG");
  55. TextDrawBackgroundColor(GPSBURG, 255);
  56. TextDrawFont(GPSBURG, 2);
  57. TextDrawLetterSize(GPSBURG, 0.280000, 1.300000);
  58. TextDrawColor(GPSBURG, -1);
  59. TextDrawSetOutline(GPSBURG, 0);
  60. TextDrawSetProportional(GPSBURG, 1);
  61. TextDrawSetShadow(GPSBURG, 1);
  62. TextDrawUseBox(GPSBURG, 1);
  63. TextDrawBoxColor(GPSBURG, 255);
  64. TextDrawTextSize(GPSBURG, 586.000000, 12.000000);
  65.  
  66. GPSPD = TextDrawCreate(500.000000, 166.000000, " GPS-PD");
  67. TextDrawBackgroundColor(GPSPD, 255);
  68. TextDrawFont(GPSPD, 2);
  69. TextDrawLetterSize(GPSPD, 0.280000, 1.300000);
  70. TextDrawColor(GPSPD, -1);
  71. TextDrawSetOutline(GPSPD, 0);
  72. TextDrawSetProportional(GPSPD, 1);
  73. TextDrawSetShadow(GPSPD, 1);
  74. TextDrawUseBox(GPSPD, 1);
  75. TextDrawBoxColor(GPSPD, 255);
  76. TextDrawTextSize(GPSPD, 586.000000, 12.000000);
  77.  
  78. GPSMD = TextDrawCreate(500.000000, 183.000000, " GPS-MD");
  79. TextDrawBackgroundColor(GPSMD, 255);
  80. TextDrawFont(GPSMD, 2);
  81. TextDrawLetterSize(GPSMD, 0.280000, 1.300000);
  82. TextDrawColor(GPSMD, -1);
  83. TextDrawSetOutline(GPSMD, 0);
  84. TextDrawSetProportional(GPSMD, 1);
  85. TextDrawSetShadow(GPSMD, 1);
  86. TextDrawUseBox(GPSMD, 1);
  87. TextDrawBoxColor(GPSMD, 255);
  88. TextDrawTextSize(GPSMD, 586.000000, 12.000000);
  89.  
  90. TextDrawSetSelectable(GPSBANKA, true);
  91. TextDrawSetSelectable(GPSBURG, true);
  92. TextDrawSetSelectable(GPSPD, true);
  93. TextDrawSetSelectable(GPSMD, true);
  94. TextDrawSetSelectable(GPSLOGO, false);
  95. TextDrawSetSelectable(OD, false);
  96. return 1;
  97. }
  98.  
  99. public OnFilterScriptExit()
  100. {
  101. TextDrawDestroy(GPSLOGO);
  102. TextDrawDestroy(OD);
  103. TextDrawDestroy(GPSBURG);
  104. TextDrawDestroy(GPSBANKA);
  105. TextDrawDestroy(GPSPD);
  106. TextDrawDestroy(GPSMD);
  107. return 1;
  108. }
  109.  
  110. public OnPlayerEnterCheckpoint(playerid)
  111. {
  112. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,0xA3B4C5FF,"Niste u vozilu!");
  113. PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  114. DisablePlayerCheckpoint(playerid);
  115. return 1;
  116. }
  117.  
  118. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  119. {
  120. if(_:clickedid != 65535)
  121. {
  122. if(clickedid == GPSBURG)
  123. {
  124. GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
  125. SetPlayerCheckpoint(playerid,1191.1787,-919.2334,43.2090,3.0);
  126. PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  127. }
  128. else if(clickedid == GPSBANKA)
  129. {
  130. GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
  131. SetPlayerCheckpoint(playerid,1456.9436,-1025.7076,23.8281,3.0);
  132. PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  133. }
  134. else if(clickedid == GPSPD)
  135. {
  136. GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
  137. SetPlayerCheckpoint(playerid,1537.3986,-1658.6750,13.5469,3.0);
  138. PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  139. }
  140. else if(clickedid == GPSMD)
  141. {
  142. GameTextForPlayer(playerid, "Destinacija postavljena", 2000, 3);
  143. SetPlayerCheckpoint(playerid,1187.3979,-1313.3105,13.5643,3.0);
  144. PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  145. }
  146. TextDrawHideForPlayer(playerid, GPSLOGO);
  147. TextDrawHideForPlayer(playerid, OD);
  148. TextDrawHideForPlayer(playerid, GPSBURG);
  149. TextDrawHideForPlayer(playerid, GPSBANKA);
  150. TextDrawHideForPlayer(playerid, GPSPD);
  151. TextDrawHideForPlayer(playerid, GPSMD);
  152. CancelSelectTextDraw(playerid);
  153. }
  154. return 1;
  155. }
  156.  
  157. /*KOMANDE*/
  158. CMD:gps(playerid, params[])
  159. {
  160. if(IsPlayerConnected(playerid)) {
  161. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,0xA3B4C5FF,"Niste u vozilu!");
  162. TextDrawShowForPlayer(playerid, GPSLOGO);
  163. TextDrawShowForPlayer(playerid, OD);
  164. TextDrawShowForPlayer(playerid, GPSBURG);
  165. TextDrawShowForPlayer(playerid, GPSBANKA);
  166. TextDrawShowForPlayer(playerid, GPSPD);
  167. TextDrawShowForPlayer(playerid, GPSMD);
  168. SelectTextDraw(playerid, 0xA3B4C5FF); }
  169. return 1;
  170. }
  171.  
  172. CMD:gpsoff(playerid, params[])
  173. {
  174. if(IsPlayerConnected(playerid)) {
  175. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,0xA3B4C5FF,"Niste u vozilu!");
  176. PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  177. DisablePlayerCheckpoint(playerid); }
  178. SendClientMessage(playerid,0xA3B4C5FF,"Isključili ste GPS u vozilu!");
  179. return 1;
  180. }
  181. ///////////////////////////////////////////////////////////////////////////// KRAJ //////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement