Advertisement
Guest User

Kitarou

a guest
Feb 15th, 2009
1,257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.52 KB | None | 0 0
  1. /*
  2. ===================================
  3. | RPG with gTeam, Tankscript ect. |
  4. | Created by Kitarou |
  5. | This is the first GM by Kitarou |
  6. | all right reserved |
  7. | Copyright by Kitarou Have Fun! |
  8. ===================================
  9. */
  10.  
  11.  
  12.  
  13.  
  14. #include <a_samp>
  15. forward RestarterWarn();
  16. forward Restarter();
  17. new torname;
  18. forward tanken(playerid); new benzin[MAX_VEHICLES];
  19. forward payd(); new zahler=0;
  20. new Text:FORUM;
  21. static gTeam[MAX_PLAYERS];
  22. new Text:RPG;
  23. #define TEAM_GROVEA 0
  24. #define TEAM_GROVEB 1
  25. #define TEAM_GROVEC 2
  26. #define TEAM_BALLASA 3
  27. #define TEAM_BALLASB 4
  28. #define TEAM_BALLASC 5
  29. #define TEAM_COPA 6
  30. #define TEAM_COPB 7
  31. #define TEAM_MEDIC 8
  32. #define TEAM_TAXI 9
  33. #define TEAM_MECHANIC 10
  34. #define TEAM_HITMAN 11
  35.  
  36. #define ORANGE 0xFF9933FF
  37. #define ROT 0xFF0000FF
  38. #define BLAU 0x0000FFFF
  39. #define GELBGR�N 0x99FF00FF
  40. #define GR�N 0x00FF00FF
  41. #define T�RKIS 0x00FFFFFF
  42. #define LILA 0xFF00FFFF
  43. #define WEISS 0xFFFFFFFF
  44. #define GELB 0xFFFF00FF
  45.  
  46. #if defined R9G
  47.  
  48. public OnFilterScriptInit()
  49. {
  50. }
  51.  
  52. public OnFilterScriptExit()
  53. {
  54. return 1;
  55. }
  56.  
  57. #else
  58.  
  59. main()
  60. {
  61. print("\n* * * * * * * * * * * *");
  62. print("* :::::::::::::::::::::::::::::::::: *");
  63. print("* ::::::R9G:COPYRIGHT:BY:KITAROU:::: *");
  64. print("* :::::::::::::::::::::::::::::::::: *");
  65. print("* * * * * * * * * * * * *");
  66. }
  67.  
  68. #endif
  69.  
  70. public OnGameModeInit()
  71. {
  72. SetTimer("RestarterWarn",550000,1);
  73. SetTimer("Restarter",600000,1);
  74. //OBJECTE
  75. CreateObject(1216, 2496.800537, -1687.815918, 13.212917, 0.0000, 0.0000, 180.0000);
  76. CreateObject(1283, 2465.284912, -1662.608643, 15.376801, 0.0000, 0.0000, 270.0000);
  77. CreateObject(1319, 2480.522949, -1688.974609, 13.063578, 0.0000, 0.0000, 0.0000);
  78. CreateObject(1319, 2481.634521, -1689.059570, 13.063662, 0.0000, 0.0000, 0.0000);
  79. CreateObject(1319, 2483.039795, -1689.146362, 13.060593, 0.0000, 0.0000, 0.0000);
  80. CreateObject(1319, 2484.335205, -1689.159180, 13.060612, 0.0000, 0.0000, 0.0000);
  81. CreateObject(1478, 2493.975342, -1687.594238, 13.150857, 0.0000, 0.0000, 180.0000);
  82. CreateObject(910, 2483.357422, -1690.230957, 13.784462, 0.0000, 0.0000, 180.0000);
  83. CreateObject(854, 2481.759521, -1690.600342, 12.725033, 0.0000, 0.0000, 0.0000);
  84. CreateObject(970, 1550.071167, -1720.166504, 13.106043, 0.0000, 0.0000, 270.0000);
  85. CreateObject(970, 1545.680542, -1720.283447, 13.106043, 0.0000, 0.0000, 270.0000);
  86. CreateObject(9833, 1541.238037, -1662.406860, 15.754702, 0.0000, 0.0000, 0.0000);
  87. CreateObject(11417, 1537.134033, -1724.385620, 17.420723, 0.0000, 0.0000, 0.0000);
  88. CreateObject(3399, 1571.814453, -1634.193604, 14.700149, 0.0000, 0.0000, 0.0000);
  89. CreateObject(8613, 1579.649170, -1646.101318, 22.975592, 0.0000, 0.0000, 180.0000);
  90. CreateObject(970, 1541.486084, -1720.176514, 13.106043, 0.0000, 0.0000, 270.0000);
  91. CreateObject(970, 1547.751221, -1718.030273, 13.098356, 0.0000, 0.0000, 0.2408);
  92. CreateObject(970, 1543.567627, -1718.084229, 13.106043, 0.0000, 359.1406, 180.8595);
  93. CreateObject(1686, 1545.450928, -1720.270264, 12.567865, 0.0000, 0.0000, 0.0000);
  94. CreateObject(1686, 1549.827759, -1720.041260, 12.567865, 0.0000, 0.0000, 0.0000);
  95. //ENDE
  96.  
  97. for(new v=0; v<MAX_VEHICLES; v++) {
  98. benzin[v]=100; }
  99. SetTimer("payd",50000,1);
  100.  
  101. //DER GR�NE FORUM TEXT UNTEN
  102. FORUM = TextDrawCreate(41.000000,433.000000,"www.r9g.de.vu visit us now");
  103. TextDrawAlignment(FORUM,0);
  104. TextDrawFont(FORUM,3);
  105. TextDrawLetterSize(FORUM,1.000000,1.000000);
  106. TextDrawColor(FORUM,0x00ff0099);
  107. TextDrawSetProportional(FORUM,1);
  108. TextDrawSetShadow(FORUM,3);
  109.  
  110. //DAS "RPG" �BER DER LEBENLEISTE
  111. RPG = TextDrawCreate(575.000000,33.000000,"RPG");
  112. TextDrawAlignment(RPG,2);
  113. TextDrawBackgroundColor(RPG,0x000000ff);
  114. TextDrawFont(RPG,0);
  115. TextDrawLetterSize(RPG,0.899999,2.799999);
  116. TextDrawColor(RPG,0xffffffff);
  117. TextDrawSetProportional(RPG,1);
  118. TextDrawSetShadow(RPG,3);
  119.  
  120. UsePlayerPedAnims();
  121. SetGameModeText("R9G by Kitarou");
  122. AddPlayerClass(105,2495.1980,-1686.2029,13.5135,4.6309,4,1,24,500,0,0); // GROVE SPAWN 01
  123. AddPlayerClass(106,2495.1980,-1686.2029,13.5135,4.6309,4,1,24,500,0,0); // GROVE SPAWN 02
  124. AddPlayerClass(107,2495.1980,-1686.2029,13.5135,4.6309,4,1,24,500,0,0); // GROVE SPAWN 03
  125.  
  126. AddPlayerClass(102,2141.4170,-1207.8395,23.9262,320.9318,4,1,24,500,0,0); // BALLAS SPAWN 01
  127. AddPlayerClass(103,2141.4170,-1207.8395,23.9262,320.9318,4,1,24,500,0,0); // BALLAS SPAWN 02
  128. AddPlayerClass(104,2141.4170,-1207.8395,23.9262,320.9318,4,1,24,500,0,0); // BALLAS SPAWN 03
  129.  
  130. AddPlayerClass(11,1543.3296,-1675.7927,13.5562,89.9875,3,1,24,500,41,1000); // POLICE GIRL SPAWN
  131. AddPlayerClass(280,1545.4293,-1676.0604,13.5603,90.1551,3,1,24,500,41,1000); // POLICE SPAWN
  132.  
  133. AddPlayerClass(274,2034.7188,-1412.8475,16.9922,138.8875,4,1,0,0,0,0); // MEDIC SPAWN
  134.  
  135. AddPlayerClass(48,1481.6393,-1749.4650,15.4453,359.1471,4,1,0,0,0,0); // TAXI SPAWN
  136.  
  137. AddPlayerClass(50,1938.0367,-1790.2450,13.3828,30.6836,4,1,0,0,0,0); // MECHANIC SPAWN
  138.  
  139. AddPlayerClass(294,979.5117,-675.9416,121.9763,27.7096,4,1,34,100,0,0); // HITMAN SPAWN
  140.  
  141. //TAXI CARS
  142. AddStaticVehicle(420,1475.0139,-1737.8157,13.2403,268.8030,6,1); // TAXI CAR 01
  143. AddStaticVehicle(420,1487.3387,-1737.9551,13.2406,269.5039,6,1); // TAXI CAR 02
  144. AddStaticVehicle(420,1499.1409,-1738.0006,13.2403,269.5333,6,1); // TAXI CAR 03
  145. //COP CARS/HELIS
  146. AddStaticVehicle(497,1556.0691,-1653.4341,28.5723,177.7945,0,1); // COP HELI 01
  147. AddStaticVehicle(497,1548.9847,-1642.3854,28.5789,88.7903,0,1); // COP HELI 02
  148. AddStaticVehicle(596,1535.8673,-1666.8728,13.1036,180.0335,0,1); // COP CAR 01
  149. AddStaticVehicle(596,1535.8719,-1673.4003,13.1031,180.0332,0,1); // COP CAR 02
  150. AddStaticVehicle(596,1535.9105,-1679.8615,13.1123,181.6181,0,1); // COP CAR 03
  151. AddStaticVehicle(596,1585.1265,-1667.4609,5.6127,89.7703,0,1); // COP CAR 04
  152. AddStaticVehicle(596,1584.9727,-1671.6616,5.6137,90.1540,0,1); // COP CAR 05
  153. AddStaticVehicle(596,1601.4404,-1683.8806,5.6119,269.7783,0,1); // COP CAR 06
  154. //MEDIC CARS
  155. AddStaticVehicle(416,2000.1616,-1403.1171,17.8102,179.9288,1,3); // MEDIC CAR 01
  156. AddStaticVehicle(416,1999.9353,-1432.5380,14.9936,178.8975,1,3); // MEDIC CAR 02
  157. AddStaticVehicle(416,2016.3073,-1446.6194,15.1280,89.9163,1,3); // MEDIC CAR 03
  158. AddStaticVehicle(416,2033.4210,-1432.7378,17.2968,178.9142,1,3); // MEDIC CAR 04
  159. //GROVE CARS/BIKES
  160. AddStaticVehicle(451,2505.4768,-1694.4153,13.2639,181.2707,16,16); // GROVE CAR 01
  161. AddStaticVehicle(451,2517.1831,-1666.8346,13.7452,82.8883,16,16); // GROVE CAR 02
  162. AddStaticVehicle(461,2509.2041,-1671.8207,12.9441,346.6973,37,1); // GROVE BIKE 01
  163. AddStaticVehicle(461,2498.3499,-1683.0516,12.9498,104.8844,37,1); // GROVE BIKE 02
  164. //BALLAS CARS/BIKES
  165. AddStaticVehicle(402,2148.4192,-1194.4762,23.6649,269.6021,30,30); // BALLAS CAR 01
  166. AddStaticVehicle(402,2162.0518,-1187.6877,23.6508,88.0318,30,30); // BALLAS CAR 02
  167. AddStaticVehicle(402,2148.4531,-1189.4019,23.6516,89.3378,30,30); // BALLAS CAR 03
  168. AddStaticVehicle(402,2160.8772,-1192.2325,23.6518,89.7005,30,30); // BALLAS CAR 04
  169. AddStaticVehicle(461,2154.4482,-1209.8069,23.4542,270.2165,75,1); // BALLAS BIKE 01
  170. AddStaticVehicle(461,2152.3284,-1209.8134,23.4714,270.0692,75,1); // BALLAS BIKE 02
  171. //MECHANIC CARS
  172. AddStaticVehicle(525,1932.8370,-1769.7675,13.2562,0.5496,36,43); // MECHANIC CAR 01
  173. AddStaticVehicle(525,1932.9170,-1778.1058,13.2609,0.5488,36,43); // MECHANIC CAR 02
  174. AddStaticVehicle(525,1932.9861,-1785.3280,13.2745,0.5474,36,43); // MECHANIC CAR 03
  175. AddStaticVehicle(525,1924.9741,-1788.5638,13.2648,268.9179,36,43); // MECHANIC CAR 04
  176. //Z�GE
  177. AddStaticVehicle(449,1691.6464,-1953.6283,13.9973,270.0375,1,74); // ZUG 01
  178. AddStaticVehicle(449,1691.2041,-1957.8750,13.9973,270.0000,1,74); // ZUG 02
  179. AddStaticVehicle(449,1699.7175,-1957.8750,13.9973,270.0008,1,74); // ZUG 03
  180. AddStaticVehicle(449,1700.3882,-1953.6431,13.9973,269.7768,1,74); // ZUG 04
  181. //HITMAN CARS
  182. AddStaticVehicle(402,959.0936,-674.5337,120.9791,117.9752,39,39); // HITMAN CAR 01
  183. AddStaticVehicle(402,965.0483,-671.3702,120.9791,117.9805,39,39); // HITMAN CAR 02
  184. AddStaticVehicle(402,970.5135,-668.4645,120.9800,118.0047,39,39); // HITMAN CAR 03
  185. AddStaticVehicle(402,975.8194,-665.6428,120.9801,118.0047,39,39); // HITMAN CAR 04
  186. AddStaticVehicle(568,989.0847,-670.6770,121.8421,90.5440,9,39); // HITMAN CAR BURITO 01
  187. AddStaticVehicle(568,967.3258,-683.5363,121.8432,302.4795,9,39); // HITMAN CAR BURITO 02
  188. AddStaticVehicle(606,1007.7741,-648.1203,121.2676,189.3195,0,0); // HITMAN CAR TARNUNG 01
  189.  
  190. return 1;
  191. }
  192.  
  193. public OnGameModeExit()
  194. {
  195. return 1;
  196. }
  197.  
  198. public OnPlayerRequestClass(playerid, classid)
  199. {
  200. if(classid == 0)
  201. {
  202. SetPlayerColor(playerid,GR�N);
  203. GameTextForPlayer(playerid,"Grove",600,6);
  204. gTeam[playerid] = TEAM_GROVEA;
  205. }
  206.  
  207. if(classid == 1)
  208. {
  209. SetPlayerColor(playerid,GR�N);
  210. GameTextForPlayer(playerid,"Grove",600,6);
  211. gTeam[playerid] = TEAM_GROVEB;
  212. }
  213.  
  214. if(classid == 2)
  215. {
  216. SetPlayerColor(playerid,GR�N);
  217. GameTextForPlayer(playerid,"Grove",600,6);
  218. gTeam[playerid] = TEAM_GROVEC;
  219. }
  220.  
  221. if(classid == 3)
  222. {
  223. SetPlayerColor(playerid,LILA);
  224. GameTextForPlayer(playerid,"Ballas",600,6);
  225. gTeam[playerid] = TEAM_BALLASA;
  226. }
  227.  
  228. if(classid == 4)
  229. {
  230. SetPlayerColor(playerid,LILA);
  231. GameTextForPlayer(playerid,"Ballas",600,6);
  232. gTeam[playerid] = TEAM_BALLASB;
  233. }
  234.  
  235. if(classid == 5)
  236. {
  237. SetPlayerColor(playerid,LILA);
  238. GameTextForPlayer(playerid,"Ballas",600,6);
  239. gTeam[playerid] = TEAM_BALLASC;
  240. }
  241.  
  242. if(classid == 6)
  243. {
  244. SetPlayerColor(playerid,BLAU);
  245. GameTextForPlayer(playerid,"Police",600,6);
  246. gTeam[playerid] = TEAM_COPA;
  247. }
  248.  
  249. if(classid == 7)
  250. {
  251. SetPlayerColor(playerid,BLAU);
  252. GameTextForPlayer(playerid,"Police",600,6);
  253. gTeam[playerid] = TEAM_COPB;
  254. }
  255.  
  256. if(classid == 8)
  257. {
  258. SetPlayerColor(playerid,ROT);
  259. GameTextForPlayer(playerid,"medic",600,6);
  260. gTeam[playerid] = TEAM_MEDIC;
  261. }
  262. if(classid == 9)
  263. {
  264. SetPlayerColor(playerid,GELB);
  265. GameTextForPlayer(playerid,"taxi",600,6);
  266. gTeam[playerid] = TEAM_TAXI;
  267. }
  268.  
  269. if(classid == 10)
  270. {
  271. SetPlayerColor(playerid,T�RKIS);
  272. GameTextForPlayer(playerid,"mechanic",600,6);
  273. gTeam[playerid] = TEAM_MECHANIC;
  274. }
  275.  
  276. if(classid == 11)
  277. {
  278. SetPlayerColor(playerid,GELBGR�N);
  279. GameTextForPlayer(playerid,"Hitman",600,6);
  280. gTeam[playerid] = TEAM_HITMAN;
  281. }
  282.  
  283. SetPlayerPos(playerid, 2494.2866,-1692.0078,23.6453);
  284. SetPlayerCameraPos(playerid, 2494.2627,-1703.2295,23.6841);
  285. SetPlayerCameraLookAt(playerid, 2494.2866,-1692.0078,23.6453);
  286. return 1;
  287. }
  288.  
  289. public OnPlayerRequestSpawn(playerid)
  290. {
  291. return 1;
  292. }
  293.  
  294. public OnPlayerConnect(playerid)
  295. {
  296. SetPlayerMapIcon( playerid, 22, 2014.3801,-1433.8304,13.5547, 52, 0 ); //HOSPITAL
  297. SetPlayerMapIcon( playerid, 30, 1543.5328,-1675.8600,13.5566, 52, 0 ); //PD
  298. SetPlayerMapIcon( playerid, 23, 979.1563,-675.9426,121.9763, 52, 0 ); //HITMAN
  299. SetPlayerMapIcon( playerid, 55, 1481.2837,-1749.4658,15.4453, 52, 0 ); //TAXI
  300. torname=CreateObject(969, 1591.864380, -1637.682129, 12.621239, 0.0000, 0.0000, 180.0000);//die Positionen vom GESCHLOSSENEN Tor
  301. TextDrawShowForPlayer(playerid,RPG);
  302. TextDrawShowForPlayer(playerid,FORUM);
  303. new pname[MAX_PLAYER_NAME];
  304. new string[100];
  305. GetPlayerName(playerid, pname, sizeof(pname));
  306. format(string, sizeof(string), "%s join the Server!", pname);
  307. SendClientMessageToAll(0xAAAAAAAA, string);
  308.  
  309. SendClientMessage(playerid,WEISS,"welcome to Kitarou's R9G!");
  310. SendClientMessage(playerid,WEISS,"you need help? no problem, type /help!");
  311. return 1;
  312. }
  313.  
  314. public OnPlayerDisconnect(playerid, reason)
  315. {
  316. new pname[MAX_PLAYER_NAME];
  317. new string[100];
  318. GetPlayerName(playerid, pname, sizeof(pname));
  319.  
  320. switch(reason)
  321. {
  322. case 0: format(string, sizeof(string), "%s has leave the server. (timeout)", pname);
  323. case 1: format(string, sizeof(string), "%s has leave the server.", pname);
  324. case 2: format(string, sizeof(string), "%s has leave the server. (Kick/ban)", pname);
  325. }
  326.  
  327. SendClientMessageToAll(0xAAAAAAAA, string);
  328. return 1;
  329. }
  330.  
  331. public OnPlayerSpawn(playerid)
  332. {
  333. return 1;
  334. }
  335.  
  336. public OnPlayerDeath(playerid, killerid, reason)
  337. {
  338. return 1;
  339. }
  340.  
  341. public OnVehicleSpawn(vehicleid)
  342. {
  343. return 1;
  344. }
  345.  
  346. public OnVehicleDeath(vehicleid, killerid)
  347. {
  348. return 1;
  349. }
  350.  
  351. public OnPlayerText(playerid, text[])
  352. {
  353. return 1;
  354. }
  355.  
  356. public OnPlayerPrivmsg(playerid, recieverid, text[])
  357. {
  358. return 1;
  359. }
  360.  
  361. public OnPlayerCommandText(playerid, cmdtext[])
  362. {
  363. if (strcmp("/help", cmdtext, true, 10) == 0)
  364. {
  365. SendClientMessage(playerid,WEISS,"HELP:/policehelp /medichelp /taxihelp /grovehelp /ballashelp /mechanichelp /hitmanhelp");
  366. SendClientMessage(playerid,WEISS,"CMDS: /kill /rules /Changes (/changes = the new scriptupdates)");
  367. return 1;
  368. }
  369.  
  370. if (strcmp("/changes", cmdtext, true, 10) == 0)
  371. {
  372. SendClientMessage(playerid,ORANGE,"=============UPDATES=============");
  373. SendClientMessage(playerid,ORANGE,"UPDATES:a PayDay is now in the Game!");
  374. SendClientMessage(playerid,ORANGE,"UPDATES:a Gas Station and a GasOmeter");
  375. SendClientMessage(playerid,ORANGE,"UPDATES:is now in use!");
  376. SendClientMessage(playerid,ORANGE,"UPDATES:new map, and Gates for the cops,");
  377. SendClientMessage(playerid,ORANGE,"UPDATES:pls read /policehelp!");
  378. SendClientMessage(playerid,ORANGE,"UPDATES:PayDay is giving now 1000$");
  379. SendClientMessage(playerid,ORANGE,"UPDATES:an automatic GMX is starting");
  380. SendClientMessage(playerid,ORANGE,"UPDATES:ever in one hour!");
  381. SendClientMessage(playerid,ORANGE,"IDEAS: for ideas send a email at");
  382. SendClientMessage(playerid,ORANGE,"IDEAS: [email protected] !");
  383. SendClientMessage(playerid,ORANGE,"=============UPDATES=============");
  384. return 1;
  385. }
  386.  
  387. if(strcmp(cmdtext,"/exit",true)==0) {
  388. if(GetPlayerState(playerid)==2) {
  389. TogglePlayerControllable(playerid,1);
  390. RemovePlayerFromVehicle(playerid); }
  391. return 1;
  392. }
  393.  
  394. if (strcmp("/policehelp", cmdtext, true, 10) == 0)
  395. {
  396. SendClientMessage(playerid,BLAU,"as a COP (POLICE) you must defend all civils for GANGS and HITMEN");
  397. SendClientMessage(playerid,BLAU,"as a COP (POLICE) you can open/close the PD Gates.");
  398. SendClientMessage(playerid,BLAU,"as a FEMALE COP: /PDO1 and /PDC1, as a MALE COP: /PDO2 and /PDC2 !");
  399. return 1;
  400. }
  401.  
  402. if (strcmp("/medichelp", cmdtext, true, 10) == 0)
  403. {
  404. SendClientMessage(playerid,ROT,"as a MEDIC you must drive with the medic car,");
  405. SendClientMessage(playerid,ROT,"and you have to heal people, but ONLY if they want it. you can people heal with /heal!");
  406. SendClientMessage(playerid,ROT,"but it does only when the person sitting in the car!");
  407. return 1;
  408. }
  409.  
  410. if (strcmp("/taxihelp", cmdtext, true, 10) == 0)
  411. {
  412. SendClientMessage(playerid,GELB,"as a TAXI driver you must drive peoples");
  413. return 1;
  414. }
  415.  
  416. if (strcmp("/grovehelp", cmdtext, true, 10) == 0)
  417. {
  418. SendClientMessage(playerid,GR�N,"as a GROVE you must kill the BALLAS");
  419. return 1;
  420. }
  421.  
  422. if (strcmp("/kill", cmdtext, true, 10) == 0)
  423. {
  424. SetPlayerHealth(playerid,0.0);
  425. SendClientMessage(playerid,ROT,"You kill yourself!");
  426. return 1;
  427. }
  428.  
  429. if (strcmp("/ballashelp", cmdtext, true, 10) == 0)
  430. {
  431. SendClientMessage(playerid,LILA,"as a BALLAS you must kill the GROVE's");
  432. return 1;
  433. }
  434.  
  435. if(strcmp(cmdtext,"/pdo1",true)==0) {
  436. if(gTeam[playerid] == TEAM_COPA)
  437. MoveObject(torname,1584.218872, -1637.757690, 12.549690,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
  438. else
  439. SendClientMessage(playerid,ROT,"you aren't a cop!");
  440. return 1;
  441. }
  442.  
  443. if(strcmp(cmdtext,"/pdo2",true)==0) {
  444. if(gTeam[playerid] == TEAM_COPB)
  445. MoveObject(torname,1584.218872, -1637.757690, 12.549690,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
  446. else
  447. SendClientMessage(playerid,ROT,"you aren't a cop!");
  448. return 1;
  449. }
  450.  
  451. if(strcmp(cmdtext,"/pdc1",true)==0) {
  452. if(gTeam[playerid] == TEAM_COPA)
  453. MoveObject(torname,1591.864380, -1637.682129, 12.621239,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
  454. else
  455. SendClientMessage(playerid,ROT,"you aren't a cop!");
  456. return 1;
  457. }
  458.  
  459. if(strcmp(cmdtext,"/pdc2",true)==0) {
  460. if(gTeam[playerid] == TEAM_COPB)
  461. MoveObject(torname,1591.864380, -1637.682129, 12.621239,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
  462. else
  463. SendClientMessage(playerid,ROT,"you aren't a cop!");
  464. return 1;
  465. }
  466.  
  467. if (strcmp("/mechanichelp", cmdtext, true, 10) == 0)
  468. {
  469. SendClientMessage(playerid,T�RKIS,"as a MECHANIC you must tow cars with the AKTION KEY (normal TAB)");
  470. return 1;
  471. }
  472.  
  473.  
  474. new cmd[256];
  475. new tmp[256];
  476. new idx;
  477. new sendername[256];
  478. new giveplayer[256];
  479. cmd = strtok(cmdtext, idx);
  480. if(strcmp(cmd, "/heal", true) == 0)
  481. {
  482. tmp = strtok(cmdtext, idx);
  483. if(!strlen(tmp))
  484. {
  485. SendClientMessage(playerid, 0xBFC0C2FF, "INFO: /heal [playerid]");
  486. return 1;
  487. }
  488. new playa = strval(tmp);
  489. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  490. GetPlayerName(playerid, sendername, sizeof(sendername));
  491. new Get1,Get2;
  492. Get1 = GetPlayerVehicleID(playa);
  493. Get2 = GetPlayerVehicleID(playerid);
  494. if(!IsPlayerInAnyVehicle(playerid)) { return 1; }
  495. if(!IsPlayerInAnyVehicle(playa)) { return 1; }
  496. if(gTeam[playerid] == TEAM_MEDIC)
  497. {
  498. new formatX[256];
  499. if(Get1 == Get2)
  500. {
  501. SetPlayerHealth(playa,100);
  502. format(formatX,sizeof(formatX),"you has healed %s, %s",giveplayer,sendername);
  503. SendClientMessage(playerid,0xBFC0C2FF,formatX);
  504.  
  505. SendClientMessage(playa,0xBFC0C2FF,formatX);
  506. format(formatX,sizeof(formatX)," %s healed you, %s",sendername,giveplayer);
  507. }
  508. else
  509. {
  510. }
  511. }
  512. return 1;
  513. }
  514.  
  515. if(strcmp(cmdtext,"/refill",true)==0) {
  516. if(PlayerToPoint(10.0,playerid,1543.3259,-1720.5739,13.5546) || PlayerToPoint(10.0,playerid,1547.8899,-1720.5204,13.5546)) {
  517. if(GetPlayerState(playerid)==2) {
  518. new aid=GetPlayerVehicleID(playerid);
  519. if(GetPlayerMoney(playerid)>=100-benzin[aid]*150) {
  520. GameTextForPlayer(playerid,"your car is now refilled",5000,1);
  521. benzin[aid]=100; }
  522. else {
  523. new s[50], lit=GetPlayerMoney(playerid)/150;
  524. format(s,sizeof(s),"%d litres filled",lit);
  525. GameTextForPlayer(playerid,s,5000,1);
  526. benzin[aid]+=lit; }}}
  527. return 1;
  528. }
  529.  
  530. if (strcmp("/rules", cmdtext, true, 10) == 0)
  531. {
  532. SendClientMessage(playerid,ROT,"-----------------------------------------------");
  533. SendClientMessage(playerid,WEISS,"RULES: DON'T kill anybody on the spawnpoint (!)");
  534. SendClientMessage(playerid,WEISS,"RULES: you CAN do drive-by, but MUSTN'T DM!");
  535. SendClientMessage(playerid,WEISS,"RULES: respect other player");
  536. SendClientMessage(playerid,WEISS,"RULES: DON'T: Spam, flame, speak in caps, verbs for other server's");
  537. SendClientMessage(playerid,ROT,"-----------------------------------------------");
  538. return 1;
  539. }
  540.  
  541. if (strcmp("/hitmanhelp", cmdtext, true, 10) == 0)
  542. {
  543. SendClientMessage(playerid,GELBGR�N,"as a HITMAN you must kill the civils (medic,police,taxi) but pls: NO DM!");
  544. return 1;
  545. }
  546. return 0;
  547. }
  548.  
  549. public OnPlayerInfoChange(playerid)
  550. {
  551. return 1;
  552. }
  553.  
  554. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  555. {
  556. return 1;
  557. }
  558.  
  559. public OnPlayerExitVehicle(playerid, vehicleid)
  560. {
  561. return 1;
  562. }
  563.  
  564. public OnPlayerStateChange(playerid, newstate, oldstate)
  565. {
  566. if(newstate==2) {
  567. if(benzin[GetPlayerVehicleID(playerid)]==0) {
  568. RemovePlayerFromVehicle(playerid);
  569. TogglePlayerControllable(playerid,1); }}
  570. return 1;
  571. }
  572.  
  573. public OnPlayerEnterCheckpoint(playerid)
  574. {
  575. return 1;
  576. }
  577.  
  578. public OnPlayerLeaveCheckpoint(playerid)
  579. {
  580. return 1;
  581. }
  582.  
  583. public OnPlayerEnterRaceCheckpoint(playerid)
  584. {
  585. return 1;
  586. }
  587.  
  588. public OnPlayerLeaveRaceCheckpoint(playerid)
  589. {
  590. return 1;
  591. }
  592.  
  593. public OnRconCommand(cmd[])
  594. {
  595. return 1;
  596. }
  597.  
  598. public OnObjectMoved(objectid)
  599. {
  600. return 1;
  601. }
  602.  
  603. public OnPlayerObjectMoved(playerid, objectid)
  604. {
  605. return 1;
  606. }
  607.  
  608. public OnPlayerPickUpPickup(playerid, pickupid)
  609. {
  610. return 1;
  611. }
  612.  
  613. public OnPlayerSelectedMenuRow(playerid, row)
  614. {
  615. return 1;
  616. }
  617.  
  618. public OnPlayerExitedMenu(playerid)
  619. {
  620. return 1;
  621. }
  622. strtok(const string[], &index)
  623. {
  624. new length = strlen(string);
  625. while ((index < length) && (string[index] <= ' '))
  626. {
  627. index++;
  628. }
  629.  
  630. new offset = index;
  631. new result[20];
  632. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  633. {
  634. result[index - offset] = string[index];
  635. index++;
  636. }
  637. result[index - offset] = EOS;
  638. return result;
  639. }
  640. public payd() {
  641. for(new i=0; i<MAX_PLAYERS; i++) {
  642. if(IsPlayerConnected(i)) {
  643. if(zahler>=5) {
  644. GivePlayerMoney(i,1000);
  645. zahler=0;
  646. SendClientMessage(i,GR�N,"---------PayDay---------");
  647. SendClientMessage(i,WEISS,"PayDay, you become 1000$");
  648. SendClientMessage(i,GR�N,"---------PayDay---------"); }
  649. tanken(i); }}
  650. zahler++; }
  651. public tanken(playerid) {
  652. if(GetPlayerState(playerid)==2) {
  653. new aid=GetPlayerVehicleID(playerid);
  654. if(benzin[aid]>=1) {
  655. new s[30];
  656. benzin[aid]--;
  657. format(s,sizeof(s),"Tank: %d/100 Liter",benzin[aid]);
  658. GameTextForPlayer(playerid,s,10000,1); }
  659. else {
  660. SendClientMessage(playerid,ROT,"Your tank is empty, use /exit to get off!");
  661. SendClientMessage(playerid,ROT,"you would have previously to the gas station, which is near the PD, type / refill there!");
  662. //jetzt m�sste man ihn entweder freezen, damit er nicht weiterf�hrt...
  663. //TogglePlayerControllable(playerid,0);
  664. }}}
  665. //--------------------------------------------[PlayerToPoint]------------------------------------------
  666. stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  667. {
  668. if(IsPlayerConnected(playerid))
  669. {
  670. new Float:oldposx, Float:oldposy, Float:oldposz;
  671. new Float:tempposx, Float:tempposy, Float:tempposz;
  672. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  673. tempposx = (oldposx -x);
  674. tempposy = (oldposy -y);
  675. tempposz = (oldposz -z);
  676. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  677. {
  678. return 1;
  679. }
  680. }
  681. return 0;
  682. }
  683.  
  684. public Restarter()
  685. {
  686. SendClientMessageToAll(ROT,"GMX has started now!");
  687. GameModeExit();
  688. }
  689.  
  690.  
  691. public RestarterWarn()
  692. {
  693. SendClientMessageToAll(ROT,"in 5 minutes is an GMX!");
  694. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement