Advertisement
Guest User

script

a guest
Jul 26th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.84 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define PRESSED(%0) \
  4. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  5.  
  6. #define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" Filterscript by w00tEpicz");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. #else
  19.  
  20. main()
  21. {
  22. print("\n----------------------------------");
  23. print(" Gamemode by w00tEpicz");
  24. print("----------------------------------\n");
  25. return 1;
  26. }
  27.  
  28. //colors
  29. #define COLOR_GREY 0xAFAFAFAA
  30. #define COLOR_GREEN 0x33AA33AA
  31. #define COLOR_BRIGHTRED 0xFF0000AA
  32. #define COLOR_YELLOW 0xFFFF00AA
  33. #define COLOR_PINK 0xFF66FFAA
  34. #define COLOR_BLUE 0x3A47DEFF
  35. #define COLOR_TAN 0xBDB76BAA
  36. #define COLOR_PURPLE 0x800080AA
  37. #define COLOR_WHITE 0xFFFFFFAA
  38. #define COLOR_LIGHTBLUE 0x33CCFFAA
  39. #define COLOR_ORANGE 0xFF9900AA
  40. #define COLOR_INDIGO 0x4B00B0AA
  41. #define COLOR_BLACK 0x00000000
  42. #define COLOR_DARKGREY 0x696969FF
  43.  
  44. #endif
  45.  
  46. public OnGameModeInit()
  47. { SetGameModeText("Freeroam");
  48. AddPlayerClass(0,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); // spawn
  49. AddPlayerClass(0,1134.4661,-2036.5559,69.0078,270.1606,0,0,0,0,0,0); // GuySpawn2
  50. AddStaticVehicle(429,1758.2988,-1864.4330,13.2544,359.4778,161,0); // Banshee
  51. AddStaticVehicle(562,1763.5916,-1864.5226,13.2326,0.4114,0,0); // elegy
  52. AddStaticVehicle(482,1775.2999,-1863.8140,13.7004,2.1579,25,0); // Burrito
  53. AddStaticVehicle(487,1755.4773,-1842.2465,13.7483,177.7173,150,0); // Maverick
  54. AddStaticVehicle(562,1245.0746,-2011.4027,59.5093,269.5267,1,0); // elegy
  55. AddStaticVehicle(562,1244.9152,-2018.1968,59.5177,268.3148,0,0); // elegy
  56. AddStaticVehicle(562,1244.7279,-2025.7094,59.5230,268.6572,1,0); // elegy
  57. AddStaticVehicle(562,1244.7581,-2024.7617,59.5230,267.7292,0,0); // elegy
  58. AddStaticVehicle(562,1244.9010,-2032.0051,59.5187,267.6591,1,0); // elegy
  59. AddStaticVehicle(562,1244.6860,-2039.6648,59.5243,266.5664,0,0); // elegy
  60. AddStaticVehicle(429,1277.4963,-2010.1981,58.5997,90.8366,161,0); // banshee
  61. AddStaticVehicle(429,1277.7992,-2018.0035,58.6142,90.0940,414,0); // banshee
  62. AddStaticVehicle(429,1277.6654,-2026.1292,58.6381,90.8353,150,0); // banshee
  63. AddStaticVehicle(482,1277.7650,-2035.0635,59.0450,91.4175,25,0); // burrito
  64. AddStaticVehicle(482,1277.3502,-2044.1201,59.1549,88.3595,0,0); // burrito
  65. AddStaticVehicle(562,1770.3240,-1863.9011,13.2334,0.3221,0,0); // car
  66. return 1;
  67. }
  68.  
  69. public OnPlayerRequestClass(playerid, classid)
  70. { SetPlayerPos(playerid, -1752.9205,885.4060,295.8750);
  71. SetPlayerFacingAngle(playerid, 327.8306);
  72. SetPlayerCameraPos(playerid, -1748.4633,893.6845,297.6000);
  73. SetPlayerCameraLookAt(playerid, -1752.9205,885.4060,295.8750);
  74. return 1;
  75. }
  76.  
  77. public OnPlayerConnect(playerid)
  78. { SendClientMessage(playerid, COLOR_BRIGHTRED, "Welcome to w00tEpicz server!");
  79. SendClientMessage(playerid, COLOR_YELLOW, "Please read /cmds, /teles and /rules");
  80. SendClientMessage(playerid, COLOR_YELLOW, "Press 2 to fix a vehicle!");
  81. SendClientMessage(playerid, COLOR_GREEN, "Enjoy your time here!");
  82. return 1;
  83. }
  84.  
  85. public OnPlayerSpawn(playerid)
  86. { SendClientMessage(playerid, COLOR_GREEN, "Have fun!");
  87. return 1;
  88. }
  89.  
  90. public OnPlayerDeath(playerid, killerid, reason)
  91. { SendClientMessage(playerid, COLOR_BRIGHTRED, "Please report who killed you!");
  92. return 1;
  93. }
  94.  
  95. public OnPlayerCommandText(playerid, cmdtext[])
  96. {
  97. if (strcmp("/ls", cmdtext, true, 10) == 0)
  98. { SetPlayerPos(playerid,1479.9854,-1737.7329,13.5469);
  99. SendClientMessage(playerid, COLOR_YELLOW , "You have teleported to Los Santos!");
  100. return 1;
  101. }
  102. if (strcmp("/healme", cmdtext, true, 10) == 0)
  103. { SetPlayerHealth(playerid, 100);
  104. SendClientMessage(playerid, COLOR_GREEN, "You have healed yourself!");
  105. return 1;
  106. }
  107. if (strcmp("/kill", cmdtext, true, 5) == 0)
  108. { SetPlayerHealth(playerid, 0);
  109. SendClientMessage(playerid, COLOR_GREEN, "You have killed yourself!");
  110. return 1;
  111. }
  112. if (strcmp("/help", cmdtext, true, 5) == 0)
  113. { SendClientMessage(playerid, COLOR_YELLOW, "Welcome to W00tEpicz Private Server!");
  114. SendClientMessage(playerid, COLOR_YELLOW, "Please read /cmds,/teles and /rules if your new to the server");
  115. return 1;
  116. }
  117. if (strcmp("/rules", cmdtext, true, 5) == 0)
  118. { SendClientMessage(playerid, COLOR_BLUE, "Rules:");
  119. SendClientMessage(playerid, COLOR_BLUE, "1-Do not ask for admin");
  120. SendClientMessage(playerid, COLOR_BLUE, "2-Do not spam or command spam");
  121. SendClientMessage(playerid, COLOR_BLUE, "3-Hacks are strictly not allowed!");
  122. SendClientMessage(playerid, COLOR_BLUE, "4-Admins decision is final and is to be respected and not to be discussed!");
  123. SendClientMessage(playerid, COLOR_BLUE, "5-Weapons are not allowed as well as DeathMatch!");
  124. SendClientMessage(playerid, COLOR_BLUE, "If the rules mentioned above are broken, you will get a jail/warn/kick/ban");
  125. SendClientMessage(playerid, COLOR_BLUE, "Thank you for reading the rules!");
  126. return 1;
  127. }
  128. if (strcmp("/sf", cmdtext, true, 10) == 0)
  129. { SetPlayerPos(playerid,-1979.7168,884.1320,45.2031);
  130. SendClientMessage(playerid, COLOR_YELLOW , "You have teleported to San Fierro!");
  131. return 1;
  132. }
  133. if (strcmp("/lv", cmdtext, true, 10) == 0)
  134. { SetPlayerPos(playerid,2039.2662,1546.4739,10.6719);
  135. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Las Venturas!");
  136. return 1;
  137. }
  138. if (strcmp("/drift1", cmdtext, true, 10) == 0)
  139. { SetPlayerPos(playerid,-305.3433,1566.0804,75.3594);
  140. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to drift1!");
  141. return 1;
  142. }
  143. if (strcmp("/drift2", cmdtext, true, 10) == 0)
  144. { SetPlayerPos(playerid,2309.1719,1393.7571,42.8203);
  145. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to drift2!");
  146. return 1;
  147. }
  148. if (strcmp("/drift3", cmdtext, true, 10) == 0)
  149. { SetPlayerPos(playerid,-2521.7515,-611.3864,132.5625);
  150. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to drift3!");
  151. return 1;
  152. }
  153. if (strcmp("/chilliad", cmdtext, true, 10) == 0)
  154. { SetPlayerPos(playerid,-2325.4771,-1611.6086,483.7348);
  155. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Mount. Chilliad!");
  156. return 1;
  157. }
  158. if (strcmp("/sfap", cmdtext, true, 10) == 0)
  159. { SetPlayerPos(playerid,-1471.8755,-190.7191,14.1484);
  160. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to San fierro Airport!");
  161. return 1;
  162. }
  163. if (strcmp("/bayside", cmdtext, true, 10) == 0)
  164. { SetPlayerPos(playerid,-2262.0596,2292.8398,4.8202);
  165. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to BaySide!");
  166. return 1;
  167. }
  168. if (strcmp("/home", cmdtext, true, 10) == 0)
  169. { SetPlayerPos(playerid,1714.1754,-1854.8762,13.5763);
  170. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Spawn!");
  171. return 1;
  172. }
  173.  
  174. if (strcmp("/lsap", cmdtext, true, 10) == 0)
  175. { SetPlayerPos(playerid,1988.3987,-2188.9333,13.5469);
  176. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Los Santos Airport!");
  177. return 1;
  178. }
  179. if (strcmp("/lvap", cmdtext, true, 10) == 0)
  180. { SetPlayerPos(playerid,1320.9373,1286.1116,10.8203);
  181. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Las Venturas Airport!");
  182. return 1;
  183. }
  184. if (strcmp("/steerlock1", cmdtext, true, 10) == 0)
  185. { SetPlayerPos(playerid,2255.0161,2792.4199,10.8203);
  186. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to steerlock spot 1!");
  187. return 1;
  188. }
  189. if (strcmp("/steerlock2", cmdtext, true, 10) == 0)
  190. { SetPlayerPos(playerid,1448.7007,1424.1096,10.8203);
  191. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to steerlock spot 2!");
  192. return 1;
  193. }
  194. if (strcmp("/steerlock3", cmdtext, true, 10) == 0)
  195. { SetPlayerPos(playerid,1428.8042,1605.1031,10.8130);
  196. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to steerlock spot 3!");
  197. return 1;
  198. }
  199. if (strcmp("/steerlock4", cmdtext, true, 10) == 0)
  200. { SetPlayerPos(playerid,-1977.4703,840.5991,45.2969);
  201. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to steerlock spot 4!");
  202. return 1;
  203. }
  204. if (strcmp("/battlefield", cmdtext, true, 10) == 0)
  205. { SetPlayerPos(playerid,-975.1406,1061.0897,1345.6719);
  206. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Battlefield!");
  207. return 1;
  208. }
  209. if (strcmp("/libertycity", cmdtext, true, 10) == 0)
  210. { SetPlayerPos(playerid,-743.6912,489.9080,1371.9270);
  211. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to Liberty City!");
  212. return 1;
  213. }
  214. if (strcmp("/tune1", cmdtext, true, 10) == 0)
  215. { SetPlayerPos(playerid,-2705.3804,217.1225,4.1797);
  216. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to tune 1!");
  217. return 1;
  218. }
  219. if (strcmp("/tune2", cmdtext, true, 10) == 0)
  220. { SetPlayerPos(playerid,2644.5332,-2014.7360,13.5589);
  221. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to tune 2!");
  222. return 1;
  223. }
  224. if (strcmp("/tune3", cmdtext, true, 10) == 0)
  225. { SetPlayerPos(playerid,1041.5752,-1036.5500,31.7432);
  226. SendClientMessage(playerid, COLOR_YELLOW, "You have teleported to tune 3!");
  227. return 1;
  228. }
  229. if (strcmp("/teles", cmdtext, true, 10) == 0)
  230. { SendClientMessage(playerid, COLOR_GREEN, "===========================================");
  231. SendClientMessage(playerid, COLOR_BLUE, "/drift1, /drift2 , /drift3");
  232. SendClientMessage(playerid, COLOR_BLUE, "/steerlock1, /steerlock2, /steerlock3, /steerlock4");
  233. SendClientMessage(playerid, COLOR_BLUE, "/lsap, /lvap, /sfap");
  234. SendClientMessage(playerid, COLOR_BLUE, "/chilliad, /bayside, /libertycity, /battlefield, /home");
  235. SendClientMessage(playerid, COLOR_BLUE, "/tune1, /trune2, /tune3");
  236. SendClientMessage(playerid, COLOR_GREEN, "===========================================");
  237. return 1;
  238. }
  239. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  240. {
  241. SendClientMessage(playerid, COLOR_DARKGREY, "You have enter a vehicle! Type /tune1-3 if you want to tune a car");
  242. return 1;
  243. }
  244.  
  245. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  246. {
  247. if(PRESSED,("KEY_SUBMISSION);
  248. {
  249. new vehicleid = GetPlayerVehicleID(playerid);
  250. if(IsPlayerInVehicle(playerid, vehicleid))
  251. {
  252. SetVehicleHealth(vehicleid,1000.0);
  253. RepairVehicle(GetPlayerVehicleID(playerid));
  254. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  255. SendClientMessage(playerid,COLOR_YELLOW,"Vehicle fixed!");
  256. }
  257. }
  258. if(PRESSED(KEY_ACTION))
  259. {
  260. if(IsPlayerNotInVehicle(playerid))
  261. {
  262. SendClientMessage(playerid,COLOR_YELLOW,"You have to be in a vehicle!");
  263. }
  264. }
  265.  
  266. {if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && (newkeys & KEY_ACTION || newkeys & KEY_FIRE)) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  267. return 1;
  268. }
  269. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement