Advertisement
Guest User

Untitled

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