Advertisement
Vlad64

San Andreas Hard DM - part 1

Dec 28th, 2012
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.46 KB | None | 0 0
  1. /******************************************************************************************************
  2. * ------San Andreas Hard DeathMatch GameMode------ *
  3. * ------Created By Vlad------ *
  4. * Credits: *
  5. * 90% of the credits goes to me, the rest goes to Y_LESS, V_LOPE and Devilxz97... *
  6. * Permissions: *
  7. * You can modify/host this GM just if the credits goes to me. DON'T REMOVE ANY OF THESE CREDITS! *
  8. * You'll see the credits when u start the server. *
  9. * Info: *
  10. * This GM took me 1 week and it's my first GM, so feel free to corect any mistakes i made in this GM. *
  11. * I know that in this GM i didn't used much text but this is a basic DM script. *
  12. * Before editing this GM keep in mind that you have to keep the credits! *
  13. * Have Fun! *
  14. *******************************************************************************************************/
  15. #include <a_samp>
  16. #include <Dini>
  17. #include <sscanf>
  18. #define Register 0
  19. #define Logged 1
  20. #define COLOR_GRAD1 0xB4B5B7FF
  21. #define COLOR_GRAD2 0xBFC0C2FF
  22. #define COLOR_GRAD3 0xCBCCCEFF
  23. #define COLOR_GRAD4 0xD8D8D8FF
  24. #define COLOR_GRAD5 0xE3E3E3FF
  25. #define COLOR_GRAD6 0xF0F0F0FF
  26. #define COLOR_GREY 0xAFAFAFAA
  27. #define COLOR_GREEN 0x33AA33AA
  28. #define COLOR_RED 0xAA3333AA
  29. #define COLOR_YELLOW 0xFFFF00AA
  30. #define COLOR_WHITE 0xFFFFFFAA
  31. #define COLOR_FADE1 0xE6E6E6E6
  32. #define COLOR_FADE2 0xC8C8C8C8
  33. #define COLOR_FADE3 0xAAAAAAAA
  34. #define COLOR_FADE4 0x8C8C8C8C
  35. #define COLOR_FADE5 0x6E6E6E6E
  36. #define COLOR_PURPLE 0xC2A2DAAA
  37. #define COLOR_DBLUE 0x2641FEAA
  38. #define COLOR_ALLDEPT 0xFF8282AA
  39. forward timer_out_of_jail (playerid);
  40. forward timer_teleport_spawn (playerid);
  41. forward timer_teleport_pdls (playerid);
  42. forward timer_teleport_lsair (playerid);
  43. forward timer_teleport_lv (playerid);
  44. forward timer_teleport_airlv (playerid);
  45.  
  46. new Login[MAX_PLAYERS];
  47.  
  48. strtok(const string[], &index)
  49. {
  50. new length = strlen(string);
  51. while ((index < length) && (string[index] <= ' '))
  52. {
  53. index++;
  54. }
  55.  
  56. new offset = index;
  57. new result[20];
  58. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  59. {
  60. result[index - offset] = string[index];
  61. index++;
  62. }
  63. result[index - offset] = EOS;
  64. return result;
  65. }
  66.  
  67. #if defined FILTERSCRIPT
  68.  
  69. public OnFilterScriptInit()
  70. {
  71. print("\n--------------------------------------");
  72. print(" Blank Filterscript by your name here");
  73. print("--------------------------------------\n");
  74. return 1;
  75. }
  76.  
  77. public OnFilterScriptExit()
  78. {
  79. return 1;
  80. }
  81.  
  82. #else
  83.  
  84. main()
  85. {
  86. print("-----------------------------------------------");
  87. print("| San Andreas Hard DeathMatch GM |");
  88. print("| Created By Vlad |");
  89. print("| |");
  90. print("| Enjoy the server! |");
  91. print("-----------------------------------------------");
  92. print(" ");
  93. print("----------------------------------");
  94. print("| Keep The Credits! |");
  95. print("----------------------------------");
  96. }
  97.  
  98. #endif
  99.  
  100. public OnGameModeInit()
  101. {
  102. SetGameModeText("San Andreas DM");
  103. AddPlayerClass(46, 1310.1509, -1367.6149 ,13.5383 ,179.3588, 0, 0, 0, 0, 0, 0);
  104. SetTeamCount( 10 );
  105. EnableStuntBonusForAll(0);
  106. return 1;
  107. }
  108.  
  109. public OnGameModeExit()
  110. {
  111. return 1;
  112. }
  113.  
  114. public OnPlayerRequestClass(playerid, classid)
  115. {
  116. return 1;
  117. }
  118.  
  119. public OnPlayerConnect(playerid)
  120. {
  121. SendClientMessage (playerid, 0xEAFF00, " ");
  122. SendClientMessage (playerid, 0xEAFF00, " ");
  123. SendClientMessage (playerid, 0xEAFF00, " ");
  124. SendClientMessage (playerid, 0xEAFF00, " ");
  125. SendClientMessage (playerid, 0xEAFF00, " ");
  126. SendClientMessage (playerid, 0xEAFF00, " ");
  127. SendClientMessage (playerid, 0xEAFF00, " ");
  128. SendClientMessage (playerid, 0xEAFF00, " ");
  129. SendClientMessage (playerid, 0xEAFF00, " ");
  130. SendClientMessage (playerid, 0xEAFF00, " ");
  131. SendClientMessage (playerid, 0xEAFF00, " ");
  132. SendClientMessage (playerid, 0xEAFF00, " ");
  133. SendClientMessage (playerid, 0xEAFF00, " ");
  134. SendClientMessage (playerid, 0xEAFF00, " ");
  135. SendClientMessage (playerid, 0xEAFF00, " ");
  136. SendClientMessage (playerid, 0xEAFF00, " ");
  137. SendClientMessage (playerid, 0xEAFF00, " ");
  138. SendClientMessage (playerid, 0xEAFF00, " ");
  139. SendClientMessage (playerid, 0xEAFF00, " ");
  140. SendClientMessage (playerid, 0xEAFF00, " ");
  141. SendClientMessage (playerid, 0xEAFF00, " ");
  142. SendClientMessage (playerid, 0xEAFF00, " ");
  143. SendClientMessage (playerid, 0xEAFF00, " ");
  144. SendClientMessage (playerid, 0xEAFF00, " ");
  145. SendClientMessage (playerid, 0xEAFF00, " ");
  146. SendClientMessage (playerid, 0xEAFF00, " ");
  147. SendClientMessage (playerid, 0xEAFF00, " ");
  148. SendClientMessage (playerid, 0xEAFF00, " ");
  149. SendClientMessage (playerid, 0xEAFF00, " ");
  150. SendClientMessage (playerid, 0xEAFF00, " ");
  151. SendClientMessage (playerid, 0xEAFF00, " ");
  152. SendClientMessage (playerid, 0xEAFF00, " ");
  153. SendClientMessage (playerid, 0xEAFF00, " ");
  154. SendClientMessage (playerid, 0xEAFF00, " ");
  155. SendClientMessage (playerid, 0xEAFF00, " ");
  156. SendClientMessage (playerid, 0xEAFF00, " ");
  157. SendClientMessage (playerid, 0xEAFF00, " ");
  158. SendClientMessage (playerid, 0xEAFF00, " ");
  159. SendClientMessage (playerid, 0xEAFF00, " ");
  160. SendClientMessage (playerid, 0xEAFF00, " ");
  161. SendClientMessage (playerid, 0xEAFF00, " ");
  162. SendClientMessage (playerid, 0xEAFF00, " ");
  163. SendClientMessage (playerid, 0xEAFF00, " ");
  164. SendClientMessage (playerid, 0xEAFF00, " ");
  165. SendClientMessage (playerid, 0xEAFF00, " ");
  166. SendClientMessage (playerid, 0xEAFF00, " ");
  167. SendClientMessage (playerid, 0xEAFF00, " ");
  168. SendClientMessage (playerid, 0xEAFF00, " ");
  169. SendClientMessage (playerid, 0xEAFF00, " ");
  170. SendClientMessage (playerid, 0xEAFF00, " ");
  171. SendClientMessage (playerid, 0xEAFF00, " ");
  172. SendClientMessage (playerid, 0xEAFF00, " ");
  173. SendClientMessage (playerid, 0xEAFF00, " ");
  174. SendClientMessage (playerid, 0xEAFF00, " ");
  175. SendClientMessage (playerid, 0xEAFF00, " ");
  176. SendClientMessage (playerid, 0xEAFF00, " ");
  177. SendClientMessage (playerid, 0xEAFF00, " ");
  178. SendClientMessage (playerid, 0xEAFF00, " ");
  179. SendClientMessage (playerid, 0xEAFF00, " ");
  180. SendClientMessage (playerid, 0xEAFF00, " ");
  181. SendClientMessage (playerid, 0xEAFF00, " ");
  182. SendClientMessage (playerid, 0xEAFF00, " ");
  183. SendClientMessage (playerid, 0xEAFF00, " ");
  184. SendClientMessage (playerid, 0xEAFF00, " ");
  185. SendClientMessage (playerid, 0xEAFF00, " ");
  186. SendClientMessage (playerid, 0xEAFF00, " ");
  187. SendClientMessage (playerid, 0xEAFF00, " ");
  188. SendClientMessage (playerid, 0xEAFF00, " ");
  189. SendClientMessage (playerid, 0xEAFF00, " ");
  190. SendClientMessage (playerid, 0xEAFF00, " ");
  191. SendClientMessage (playerid, 0xEAFF00, " ");
  192. SendClientMessage (playerid, 0xEAFF00, " ");
  193. SendClientMessage (playerid, 0xEAFF00, " ");
  194. SendClientMessage (playerid, 0xEAFF00, " ");
  195. SendClientMessage (playerid, 0xEAFF00, " ");
  196. SendClientMessage (playerid, 0xEAFF00, " ");
  197. SendClientMessage (playerid, 0xEAFF00, " ");
  198. SendClientMessage (playerid, 0xEAFF00, " ");
  199. SendClientMessage (playerid, 0xEAFF00, " ");
  200. SendClientMessage (playerid, 0xEAFF00, " ");
  201. SendClientMessage (playerid, 0xEAFF00, " ");
  202. SendClientMessage (playerid, 0xEAFF00, " ");
  203. SendClientMessage (playerid, 0xEAFF00, " ");
  204. SendClientMessage (playerid, 0xEAFF00, " ");
  205. SendClientMessage (playerid, 0xEAFF00, " ");
  206. SendClientMessage (playerid, 0xEAFF00, " ");
  207. SendClientMessage (playerid, 0xEAFF00, " ");
  208. SendClientMessage (playerid, 0xEAFF00, " ");
  209. SendClientMessage (playerid, 0xEAFF00, " ");
  210. SendClientMessage (playerid, 0xEAFF00, " ");
  211. SendClientMessage (playerid, 0xEAFF00, " ");
  212. SendClientMessage (playerid, 0xEAFF00, " ");
  213. SendClientMessage (playerid, 0xEAFF00, " ");
  214. SendClientMessage (playerid, 0xEAFF00, " ");
  215. SendClientMessage (playerid, 0xEAFF00, " ");
  216. SendClientMessage (playerid, 0xEAFF00, " ");
  217. SendClientMessage (playerid, 0xEAFF00, " ");
  218. SendClientMessage (playerid, 0xEAFF00, " ");
  219. SendClientMessage (playerid, 0xEAFF00, " ");
  220. SendClientMessage (playerid, 0xEAFF00, " ");
  221. SendClientMessage (playerid, 0xEAFF00, " ");
  222. SendClientMessage (playerid, 0xEAFF00, " ");
  223. SendClientMessage (playerid, 0xEAFF00, " ");
  224. SendClientMessage (playerid, 0xEAFF00, " ");
  225. SendClientMessage (playerid, 0xEAFF00, " ");
  226. SendClientMessage (playerid, 0xEAFF00, " ");
  227. SendClientMessage (playerid, 0xEAFF00, " ");
  228. SendClientMessage (playerid, 0xEAFF00, " ");
  229. SendClientMessage (playerid, 0xEAFF00, " ");
  230. SendClientMessage (playerid, COLOR_YELLOW, "Welcome to San Andreas Hard DeathMatch!");
  231. SendClientMessage (playerid, COLOR_YELLOW, "Please wait, connecting...");
  232. SendClientMessage (playerid, COLOR_YELLOW, "Please insert your password!");
  233. if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "An admin connected to the server!");
  234. else SendClientMessageToAll(0xDEEE20FF, "A player connected to the server!");
  235. TogglePlayerClock(playerid, 1); // Show the clock - 1=show 0=hide
  236. SetPlayerTime(playerid,12,0);
  237. SetPlayerTeam(playerid, 1);
  238. SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
  239. Login[playerid] = 0;
  240. new nombre[MAX_PLAYER_NAME], archivo[256];
  241. GetPlayerName(playerid, nombre, sizeof(nombre));
  242. format(archivo, sizeof(archivo), "/Users/%s.ini", nombre);
  243. if (!dini_Exists(archivo))
  244. {
  245. //Register Dialog
  246. ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Insert Your password here", "Acept", "Cancel");
  247. SetPlayerScore (playerid, 1000);
  248. GivePlayerMoney (playerid, 1000000);
  249. }
  250. else
  251. {
  252. //Login Dialog
  253. ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert your password here", "Acept", "Cancel");
  254. }
  255. return 1;
  256. }
  257.  
  258. public OnPlayerDisconnect(playerid, reason)
  259. {
  260. return 1;
  261. }
  262.  
  263. public OnPlayerSpawn(playerid)
  264. {
  265. SetPlayerPos (playerid, 1310.1509,-1367.6149,13.5383);
  266. SetPlayerHealth (playerid, 100);
  267. SetPlayerArmour (playerid, 100);
  268. new PlayerName[MAX_PLAYER_NAME],
  269. string[128];
  270. GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  271. format(string, sizeof(string), "%s has spawned.", PlayerName);
  272. SendClientMessageToAll(0xFFFFFFFF, string);
  273. return 1;
  274. }
  275.  
  276. public OnPlayerDeath(playerid, killerid, reason)
  277. {
  278. SendClientMessage (playerid, COLOR_RED, "You died");
  279. GivePlayerMoney (playerid, -100);
  280. SetPlayerScore (playerid, -10);
  281. SendClientMessage (playerid, COLOR_RED, "Medic: Your medical bill contained $200. Have a nice day!");
  282. GivePlayerMoney (killerid, 1000);
  283. SetPlayerScore (killerid, 10);
  284. SetPlayerWantedLevel (killerid, 6);
  285. SendClientMessage (killerid, COLOR_RED, "You killed a player!");
  286. SendClientMessage (killerid, COLOR_RED, "The police is coming for you, be careful!");
  287. return 1;
  288. }
  289.  
  290. public OnVehicleSpawn(vehicleid)
  291. {
  292. return 1;
  293. }
  294.  
  295. public OnVehicleDeath(vehicleid, killerid)
  296. {
  297. return 1;
  298. }
  299.  
  300. stock IsPlayerAtPoliceStation(playerid)
  301. {
  302. if (IsPlayerInRangeOfPoint(playerid,10,248.3816,68.2929,1003.6406)) return 1;
  303. return 0;
  304. }
  305.  
  306. public OnPlayerText(playerid, text[])
  307. {
  308. return 1;
  309. }
  310.  
  311. public OnPlayerCommandText(playerid,cmdtext[])
  312. {
  313.  
  314. if (!strcmp("/help",cmdtext,true,7))
  315. {
  316. SendClientMessage (playerid, 0x61FF36, "|_________________________________Commands_________________________________|");
  317. SendClientMessage (playerid, 0x61FF36, "General Commands: /help /refuel /rules /tips /surrender");
  318. SendClientMessage (playerid, 0x61FF36, "Weapon Commands: /1weapon /2weapon /3weapon /4weapon /health /armour");
  319. SendClientMessage (playerid, 0x61FF36, "Animation Commands: /smoke /beer /sprunk /selftie /handsup /stopanim");
  320. SendClientMessage (playerid, 0x61FF36, "Animation Commands: /dance1 /dance2 /dance3 /dance4");
  321. SendClientMessage (playerid, 0x61FF36, "Other Commands: /jetpack /weather /teleports");
  322. return 1;
  323. }
  324.  
  325. if (!strcmp("/rules",cmdtext,true,7))
  326. {
  327. SendClientMessage (playerid, 0x006EFF, "|____________________________________Rules__________________________________________|");
  328. SendClientMessage (playerid, 0x006EFF, "Don't use any kind of cheats! Nice Cheat = Nice Ban!");
  329. SendClientMessage (playerid, 0x006EFF, "Don't ask for admin rank! You'll get kicked!");
  330. SendClientMessage (playerid, 0x006EFF, "There are the server's rules, please respect them!");
  331. return 1;
  332. }
  333.  
  334. if (!strcmp("/1weapon",cmdtext,true,7))
  335. {
  336. if (GetPlayerMoney(playerid) - 2000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $2.000!");
  337. GivePlayerMoney (playerid, -2000);
  338. SendClientMessage (playerid, 0xFA73F8, "You bought a Deagle, AK47, Knife and MP5 for $2.000!");
  339. GivePlayerWeapon (playerid, 24, 100);
  340. GivePlayerWeapon (playerid, 30, 240);
  341. GivePlayerWeapon (playerid, 4, 1);
  342. GivePlayerWeapon (playerid, 29, 420);
  343. return 1;
  344. }
  345.  
  346. if (!strcmp("/3weapon",cmdtext,true,7))
  347. {
  348. if (GetPlayerMoney(playerid) - 100000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $100.000!");
  349. GivePlayerMoney (playerid, -100000);
  350. SendClientMessage (playerid, 0xFA73F8, "You bought Minigun for $100.000!");
  351. GivePlayerWeapon (playerid, 38, 500);
  352. return 1;
  353. }
  354.  
  355. if (!strcmp("/2weapon",cmdtext,true,7))
  356. {
  357. if (GetPlayerMoney(playerid) - 30000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $30.000!");
  358. GivePlayerMoney (playerid, -30000);
  359. SendClientMessage (playerid, 0xFA73F8, "You bought Combat Shotgun, Uzi, M4, Sniper Rifle si Satchel Charge pentru $30.000!");
  360. GivePlayerWeapon (playerid, 27, 124);
  361. GivePlayerWeapon (playerid, 28, 500);
  362. GivePlayerWeapon (playerid, 31, 1000);
  363. GivePlayerWeapon (playerid, 34, 80);
  364. GivePlayerWeapon (playerid, 39, 50);
  365. return 1;
  366. }
  367.  
  368. if (!strcmp("/health",cmdtext,true,7))
  369. {
  370. if (GetPlayerMoney(playerid) - 1000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $1.000!");
  371. GivePlayerMoney (playerid, -1000);
  372. SendClientMessage (playerid, 0xFA73F8, "You bought full health for $1.000!");
  373. SetPlayerHealth (playerid, 100);
  374. return 1;
  375. }
  376.  
  377. if (!strcmp("/armour",cmdtext,true,7))
  378. {
  379. if (GetPlayerMoney(playerid) - 1000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $1.000!");
  380. GivePlayerMoney (playerid, -1000);
  381. SendClientMessage (playerid, 0xFA73F8, "You bought full armour for $1.000!");
  382. SetPlayerArmour (playerid, 100);
  383. return 1;
  384. }
  385.  
  386. if (!strcmp("/tips",cmdtext,true,7))
  387. {
  388. SendClientMessage (playerid, 0x45FF54, "|____________________________________Tips____________________________________|");
  389. SendClientMessage (playerid, 0x45FF54, "Tip: Do you want a lot of money? Then just kill all the players you see!");
  390. SendClientMessage (playerid, 0x45FF54, "Tip: Every time you kill someone you'll get wanted level 6!");
  391. SendClientMessage (playerid, 0x45FF54, "Tip: If you weren't know, the admins are the cops!");
  392. SendClientMessage (playerid, 0x45FF54, "Tip: Do you want to have a bigger chat? Use /pagesize!");
  393. return 1;
  394. }
  395.  
  396. if (!strcmp("/4weapon",cmdtext,true,7))
  397. {
  398. if (GetPlayerMoney(playerid) - 90000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $90.000!");
  399. GivePlayerMoney (playerid, -90000);
  400. SendClientMessage (playerid, 0xFA73F8, "You bought Rocket Launcher and Sniper Rifle for $90.000!");
  401. GivePlayerWeapon (playerid, 35, 30);
  402. GivePlayerWeapon (playerid, 34, 50);
  403. return 1;
  404. }
  405.  
  406. if (!strcmp("/jetpack",cmdtext,true,7))
  407. {
  408. if (GetPlayerMoney(playerid) - 50000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $50.000!");
  409. SendClientMessage (playerid, 0xFA73F8, "You bought a jetpack for $50.000!");
  410. GivePlayerMoney (playerid, -50000);
  411. SetPlayerSpecialAction (playerid,SPECIAL_ACTION_USEJETPACK);
  412. return 1;
  413. }
  414. if (!strcmp("/weather",cmdtext,true,7))
  415. {
  416. SendClientMessage (playerid, 0x45FCFF, "INFO: [/bluesky/stormy/sandstorm]");
  417. SendClientMessage (playerid, 0x45FCFF, "Example: /bluesky");
  418. return 1;
  419. }
  420.  
  421. if (!strcmp("/bluesky",cmdtext,true,7))
  422. {
  423. SendClientMessage (playerid, COLOR_WHITE, "The weather has been changed - blue sky!");
  424. SetPlayerWeather (playerid, 0); //Please note that this will change only the player's weather!
  425. return 1;
  426. }
  427.  
  428. if (!strcmp("/stormy",cmdtext,true,7))
  429. {
  430. SendClientMessage (playerid, COLOR_WHITE, "The weather has been changed - stormy!");
  431. SetPlayerWeather (playerid, 8); //Please note that this will change only the player's weather!
  432. return 1;
  433. }
  434.  
  435. if (!strcmp("/sandstorm",cmdtext,true,7))
  436. {
  437. SendClientMessage (playerid, COLOR_WHITE, "The weather has been changed - sand storm!");
  438. SetPlayerWeather (playerid, 19); //Please note that this will change only the player's weather!
  439. return 1;
  440. }
  441.  
  442. if (!strcmp("/surrender",cmdtext,true,7))
  443. {
  444. if (!IsPlayerAtPoliceStation(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not at the police station!");
  445. SendClientMessage (playerid, COLOR_RED, "JAIL: You went to the police station!");
  446. SendClientMessage (playerid, COLOR_RED, "JAIL: You got 2 minutes in jail!");
  447. SendClientMessage (playerid, COLOR_RED, "JAIL: The police took $10.000 from you as a bribe");
  448. GivePlayerMoney (playerid, -10000);
  449. SetPlayerWantedLevel (playerid, 0);
  450. SetPlayerInterior (playerid, 6);
  451. SetPlayerPos (playerid, 264.2000122,77.6999969,1000.5999756);
  452. TogglePlayerControllable (playerid, 0);
  453. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
  454. SetTimer("timer_out_of_jail",120000,false); //You can modify 120000 to any value you want, but keep in mind that 60000ms=60seconds=1minute
  455. return 1;
  456. }
  457.  
  458. if (!strcmp("/teleports",cmdtext,true,7))
  459. {
  460. ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Teleports", "/gotospawn /gotopdls /gotolsair /gotolv /gotoairlv", "OK", "OK");
  461. return 1;
  462. }
  463.  
  464. if (!strcmp("/gotospawn",cmdtext,true,7)) //gotospawn means the spawn place (where you spawn after a death)
  465. {
  466. SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
  467. SetTimer("timer_teleport_spawn",6000,false);
  468. return 1;
  469. }
  470.  
  471. if (!strcmp("/gotopdls",cmdtext,true,7))
  472. {
  473. SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
  474. SetTimer("timer_teleport_pdls",6000,false);
  475. return 1;
  476. }
  477.  
  478. if (!strcmp("/gotolsair",cmdtext,true,7))
  479. {
  480. SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
  481. SetTimer("timer_teleport_lsair",6000,false);
  482. return 1;
  483. }
  484.  
  485. if (!strcmp("/gotolv",cmdtext,true,7))
  486. {
  487. SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
  488. SetTimer("timer_teleport_lv",6000,false);
  489. return 1;
  490. }
  491.  
  492. if (!strcmp("/gotoairlv",cmdtext,true,7))
  493. {
  494. SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
  495. SetTimer("timer_teleport_airlv",6000,false);
  496. return 1;
  497. }
  498.  
  499. return 0;
  500. }
  501.  
  502. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  503. {
  504. return 1;
  505. }
  506.  
  507. public OnPlayerExitVehicle(playerid, vehicleid)
  508. {
  509. return 1;
  510. }
  511.  
  512. public OnPlayerStateChange(playerid, newstate, oldstate)
  513. {
  514. return 1;
  515. }
  516.  
  517. public OnPlayerEnterCheckpoint(playerid)
  518. {
  519. return 1;
  520. }
  521.  
  522. public OnPlayerLeaveCheckpoint(playerid)
  523. {
  524. return 1;
  525. }
  526.  
  527. public OnPlayerEnterRaceCheckpoint(playerid)
  528. {
  529. return 1;
  530. }
  531.  
  532. public OnPlayerLeaveRaceCheckpoint(playerid)
  533. {
  534. return 1;
  535. }
  536.  
  537. public OnRconCommand(cmd[])
  538. {
  539. return 1;
  540. }
  541.  
  542. public OnPlayerRequestSpawn(playerid)
  543. {
  544. return 1;
  545. }
  546.  
  547. public OnObjectMoved(objectid)
  548. {
  549. return 1;
  550. }
  551.  
  552. public OnPlayerObjectMoved(playerid, objectid)
  553. {
  554. return 1;
  555. }
  556.  
  557. public OnPlayerPickUpPickup(playerid, pickupid)
  558. {
  559. return 1;
  560. }
  561.  
  562. public OnVehicleMod(playerid, vehicleid, componentid)
  563. {
  564. return 1;
  565. }
  566.  
  567. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  568. {
  569. return 1;
  570. }
  571.  
  572. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  573. {
  574. return 1;
  575. }
  576.  
  577. public OnPlayerSelectedMenuRow(playerid, row)
  578. {
  579. return 1;
  580. }
  581.  
  582. public OnPlayerExitedMenu(playerid)
  583. {
  584. TogglePlayerControllable (playerid, 1);
  585. return 1;
  586. }
  587.  
  588. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  589. {
  590. return 1;
  591. }
  592.  
  593. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  594. {
  595. return 1;
  596. }
  597.  
  598. public OnRconLoginAttempt(ip[], password[], success)
  599. {
  600. if(!success) //If the password was incorrect
  601. {
  602. printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
  603. new pip[16];
  604. for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
  605. {
  606. GetPlayerIp(i, pip, sizeof(pip));
  607. if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
  608. {
  609. SendClientMessage(i, COLOR_WHITE, "The RCON password is incorrect! You got banned!"); //Send a message
  610. Ban(i); //They are now banned.
  611. }
  612. }
  613. }
  614. return 1;
  615. }
  616.  
  617. public OnPlayerUpdate(playerid)
  618. {
  619. return 1;
  620. }
  621.  
  622. public OnPlayerStreamIn(playerid, forplayerid)
  623. {
  624. return 1;
  625. }
  626.  
  627. public OnPlayerStreamOut(playerid, forplayerid)
  628. {
  629. return 1;
  630. }
  631.  
  632. public OnVehicleStreamIn(vehicleid, forplayerid)
  633. {
  634. return 1;
  635. }
  636.  
  637. public OnVehicleStreamOut(vehicleid, forplayerid)
  638. {
  639. return 1;
  640. }
  641.  
  642. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  643. {
  644. if (dialogid == Register)
  645. {
  646. new nombrejugador[MAX_PLAYER_NAME], archivo[256];
  647. if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Insert Your password here", "Acept", "Cancel");
  648. if (!response) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Insert Your password here", "Acept", "Cancel");
  649. GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
  650. format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
  651. dini_Create(archivo);
  652. dini_Set(archivo, "User", nombrejugador);
  653. dini_Set(archivo, "Password", inputtext);
  654. ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
  655. }
  656. if (dialogid == Logged)
  657. {
  658. new nombrejugador[MAX_PLAYER_NAME], archivo[256], comprobante[256];
  659. if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
  660. if (!response) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
  661. GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
  662. format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
  663. format(comprobante, sizeof(comprobante), "%s", dini_Get(archivo, "Password"));
  664. if (!strcmp (inputtext, comprobante))
  665. {
  666. Login[playerid] = 1;
  667. }
  668. else
  669. {
  670. ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
  671. }
  672. }
  673. return 1;
  674. }
  675.  
  676. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  677. {
  678. return 1;
  679. }
  680.  
  681. //Timers
  682.  
  683. public timer_out_of_jail(playerid)
  684. {
  685. TogglePlayerControllable (playerid, 1);
  686. SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
  687. SetPlayerVirtualWorld (playerid, 0);
  688. SetPlayerInterior (playerid, 0);
  689. SetPlayerPos (playerid, 1545.2037,-1675.7291,13.5599);
  690. SendClientMessage (playerid, COLOR_RED, "JAIL: Try to be a better citizen! You are free!");
  691. }
  692.  
  693. public timer_teleport_spawn(playerid)
  694. {
  695. SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
  696. SetPlayerInterior (playerid, 0);
  697. SetPlayerPos (playerid, 1310.1509,-1367.6149,13.5383);
  698. printf("ID %s has been teleported to Spawn Place",playerid);
  699. }
  700.  
  701. public timer_teleport_pdls(playerid)
  702. {
  703. SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
  704. SetPlayerInterior (playerid, 0);
  705. SetPlayerPos (playerid, 1545.2037,-1675.7291,13.5599);
  706. printf("ID %s has been teleported to Los Santos Police Department",playerid);
  707. }
  708.  
  709. public timer_teleport_lsair(playerid)
  710. {
  711. SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
  712. SetPlayerInterior (playerid, 0);
  713. SetPlayerPos (playerid, 1937.3033,-2339.5210,13.5469);
  714. printf("ID %s has been teleported to Los Santos Airport",playerid);
  715. }
  716.  
  717. public timer_teleport_lv(playerid)
  718. {
  719. SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
  720. SetPlayerInterior (playerid, 0);
  721. SetPlayerPos (playerid, 2029.8820,1007.4957,10.8203);
  722. printf("ID %s has been teleported to Las Venturas",playerid);
  723. }
  724.  
  725. public timer_teleport_airlv(playerid)
  726. {
  727. SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
  728. SetPlayerInterior (playerid, 0);
  729. SetPlayerPos (playerid, 1681.0872,1447.7493,10.7731);
  730. printf("ID %s has been teleported to Las Venturas Airport",playerid);
  731. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement