Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <Dini>
  7. #include <FCNPC>
  8.  
  9. //------------------- FARBEN -----------------------
  10. #define COLOR_GREY 0xAFAFAFAA
  11. #define COLOR_BLUE 0x0000FFFF
  12. #define COLOR_LIGHTBLUE 0x00F5FFFF
  13. #define COLOR_RED 0xFF0000FF
  14. #define COLOR_GREEN 0x05FF00FF
  15. #define black 0x000000FF
  16. //--------------------------------------------------
  17.  
  18. public OnGameModeInit()
  19. {
  20. // Don't use these lines if it's a filterscript
  21. SetGameModeText("Schussbot by Timer");
  22. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  23. FCNPC_Create("Schussbot");
  24. return 1;
  25. }
  26.  
  27. public OnGameModeExit()
  28. {
  29. return 1;
  30. }
  31.  
  32. public OnPlayerRequestClass(playerid, classid)
  33. {
  34. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  35. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  36. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  37. return 1;
  38. }
  39.  
  40. public OnPlayerConnect(playerid)
  41. {
  42. return 1;
  43. }
  44.  
  45. public OnPlayerDisconnect(playerid, reason)
  46. {
  47. return 1;
  48. }
  49.  
  50. public OnPlayerSpawn(playerid)
  51. {
  52. return 1;
  53. }
  54.  
  55. public OnPlayerDeath(playerid, killerid, reason)
  56. {
  57. return 1;
  58. }
  59.  
  60. public OnVehicleSpawn(vehicleid)
  61. {
  62. return 1;
  63. }
  64.  
  65. public OnVehicleDeath(vehicleid, killerid)
  66. {
  67. return 1;
  68. }
  69.  
  70. public OnPlayerText(playerid, text[])
  71. {
  72. return 1;
  73. }
  74.  
  75. public OnPlayerCommandText(playerid, cmdtext[])
  76. {
  77. new idx, tmp[256], string[256], sendername[MAX_PLAYER_NAME];
  78. if(strcmp(cmdtext, "/veh", true) == 0 || strcmp(cmdtext, "/v", true) == 0)
  79. {
  80. if(IsPlayerConnected(playerid))
  81. {
  82. tmp = strtok(cmdtext, idx);
  83. if(!strlen(tmp))
  84. {
  85. SendClientMessage(playerid, COLOR_GREY, "Benutze: [/v]eh [carid] [color1] [color2]");
  86. return 1;
  87. }
  88. new car;
  89. car = strval(tmp);
  90. if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_RED, "AutoID kann nur wischen 400 und 611 sein!"); return 1; }
  91. tmp = strtok(cmdtext, idx);
  92. if(!strlen(tmp))
  93. {
  94. SendClientMessage(playerid, COLOR_GREY, "Benutze: [/v]eh [carid] [color1] [color2]");
  95. return 1;
  96. }
  97. new color1;
  98. color1 = strval(tmp);
  99. if(color1 < 0 || color1 > 255) { SendClientMessage(playerid, COLOR_RED, "FarbID kann nur zwischen 1 und 255 sein!"); return 1; }
  100. tmp = strtok(cmdtext, idx);
  101. if(!strlen(tmp))
  102. {
  103. SendClientMessage(playerid, COLOR_GREY, "Benutze: [/v]eh [carid] [color1] [color2]");
  104. return 1;
  105. }
  106. new color2;
  107. color2 = strval(tmp);
  108. if(color2 < 0 || color2 > 255) { SendClientMessage(playerid, COLOR_RED, "FarbID kann nur zwischen 1 und 255 sein!"); return 1; }
  109. new Float:X,Float:Y,Float:Z;
  110. GetPlayerPos(playerid, X,Y,Z);
  111. new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 600);
  112. SetPlayerPos(playerid, X, Y, Z+5);
  113. format(string, sizeof(string), "Fahrzeug %d spawned.", carid);
  114. SendClientMessage(playerid, COLOR_GREY, string);
  115. GetPlayerName(playerid, sendername, sizeof(sendername));
  116. SetVehicleNumberPlate(carid,"SpawnedCar");
  117. LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
  118. return 1;
  119. }
  120. return 1;
  121. }
  122.  
  123. if(strcmp(cmdtext, "/test", true))
  124. {
  125. new Float:x, Float:y, Flaot:z;
  126. GetPlayerPos(playerid, x,y,z);
  127. FCNPC_Spawn(1, 367, x, y, z);
  128. return 1;
  129. }
  130.  
  131. if(strcmp(cmdtext, "/schuss", true))
  132. {
  133. new i1;
  134. new on;
  135. if(on == 1)
  136. {
  137. on=0;
  138. i1=1;
  139. }
  140. else
  141. {
  142. on=1;
  143. new Float:Angle;
  144. new Float:x, Float:y, Flaot:z;
  145. while(i1==0)
  146. {
  147. GetPlayerFacingAngle(playerid, Angle);
  148. Angle = Angle+180;
  149. GetPlayerPos(playerid, x, y, z);
  150. FCNPC_AimAt(1, x, y, z, 1, 0);
  151. if(135 <= Angle < 225)
  152. {
  153.  
  154. }
  155. else if(225 <= Angle < 315)
  156. {
  157.  
  158. }
  159. else if(315 <= Angle < 405)
  160. {
  161.  
  162. }
  163. else if(405 <= Angle <= 495)
  164. {
  165.  
  166. }
  167. }
  168. }
  169. return 1;
  170. }
  171. return 0;
  172. }
  173.  
  174. /*public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnPlayerExitVehicle(playerid, vehicleid)
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnPlayerStateChange(playerid, newstate, oldstate)
  185. {
  186. return 1;
  187. }
  188.  
  189. public OnPlayerEnterCheckpoint(playerid)
  190. {
  191. return 1;
  192. }
  193.  
  194. public OnPlayerLeaveCheckpoint(playerid)
  195. {
  196. return 1;
  197. }
  198.  
  199. public OnPlayerEnterRaceCheckpoint(playerid)
  200. {
  201. return 1;
  202. }
  203.  
  204. public OnPlayerLeaveRaceCheckpoint(playerid)
  205. {
  206. return 1;
  207. }
  208.  
  209. public OnRconCommand(cmd[])
  210. {
  211. return 1;
  212. }
  213.  
  214. public OnPlayerRequestSpawn(playerid)
  215. {
  216. return 1;
  217. }
  218.  
  219. public OnObjectMoved(objectid)
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnPlayerObjectMoved(playerid, objectid)
  225. {
  226. return 1;
  227. }
  228.  
  229. public OnPlayerPickUpPickup(playerid, pickupid)
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnVehicleMod(playerid, vehicleid, componentid)
  235. {
  236. return 1;
  237. }
  238.  
  239. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  240. {
  241. return 1;
  242. }
  243.  
  244. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  245. {
  246. return 1;
  247. }
  248.  
  249. public OnPlayerSelectedMenuRow(playerid, row)
  250. {
  251. return 1;
  252. }
  253.  
  254. public OnPlayerExitedMenu(playerid)
  255. {
  256. return 1;
  257. }
  258.  
  259. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  260. {
  261. return 1;
  262. }
  263.  
  264. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  265. {
  266. return 1;
  267. }
  268.  
  269. public OnRconLoginAttempt(ip[], password[], success)
  270. {
  271. return 1;
  272. }
  273.  
  274. public OnPlayerUpdate(playerid)
  275. {
  276. return 1;
  277. }
  278.  
  279. public OnPlayerStreamIn(playerid, forplayerid)
  280. {
  281. return 1;
  282. }
  283.  
  284. public OnPlayerStreamOut(playerid, forplayerid)
  285. {
  286. return 1;
  287. }
  288.  
  289. public OnVehicleStreamIn(vehicleid, forplayerid)
  290. {
  291. return 1;
  292. }
  293.  
  294. public OnVehicleStreamOut(vehicleid, forplayerid)
  295. {
  296. return 1;
  297. }
  298.  
  299. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  300. {
  301. return 1;
  302. }
  303.  
  304. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  305. {
  306. return 1;
  307. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement