Advertisement
Vlad64

San Andreas Hard DM - part 7

Dec 28th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.62 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. #include <a_samp>
  3. #include <zcmd>
  4. #define red 0xFF0000AA
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n--------------------------------------");
  11. print(" Admin Commands Created By V_LOPE");
  12. print(" And Edited By Vlad");
  13. print(" 17 Admin Commands Loaded!");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. return 1;
  21. }
  22.  
  23. #endif
  24.  
  25. CMD:ban(playerid,params[])
  26. {
  27. if(IsPlayerAdmin(playerid))
  28. {
  29. new tmp[256], tmp2[256], Index;
  30. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  31. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /ban [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  32. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  33. player1 = strval(tmp); // << player1 = ID of The Player
  34. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  35. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  36. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  37. if(isnull(tmp2))
  38. format(string,sizeof(string),"AdmCmd: %s was banned by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  39. SendClientMessageToAll(red,string); // Send Message To all Players.
  40. printf("AdmCmd: %s was banned by admin %s, Reason: (%s)",playername,adminname,params[2]);
  41. SetPlayerInterior (player1, 6);
  42. SetPlayerPos (player1, 264.2000122,77.6999969,1000.5999756);
  43. TogglePlayerControllable (player1, 0);
  44. SetPlayerSpecialAction (player1, SPECIAL_ACTION_CUFFED);
  45. Ban(player1);
  46. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  47. return 1;
  48. }
  49.  
  50. CMD:kick(playerid,params[])
  51. {
  52. if(IsPlayerAdmin(playerid))
  53. {
  54. new tmp[256], tmp2[256], Index;
  55. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  56. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /kick [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  57. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  58. player1 = strval(tmp); // << player1 = ID of The Player
  59. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  60. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  61. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  62. format(string,sizeof(string),"AdmCmd: %s was been kicked by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  63. SendClientMessageToAll(red,string); // Send Message To all Players.
  64. printf("AdmCmd: %s was kicked by admin %s, Reason: (%s)",playername,adminname,params[2]);
  65. SetPlayerInterior (player1, 6);
  66. SetPlayerPos (player1, 264.2000122,77.6999969,1000.5999756);
  67. TogglePlayerControllable (player1, 0);
  68. SetPlayerSpecialAction (player1, SPECIAL_ACTION_CUFFED);
  69. Kick(player1);
  70. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  71. return 1;
  72. }
  73.  
  74. CMD:freeze(playerid,params[])
  75. {
  76. if(IsPlayerAdmin(playerid))
  77. {
  78. new tmp[256], tmp2[256], Index;
  79. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  80. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /freeze [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  81. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  82. player1 = strval(tmp); // << player1 = ID of The Player
  83. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  84. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  85. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  86. format(string,sizeof(string),"AdmCmd: %s was frozen by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  87. SendClientMessageToAll(red,string); // Send Message To all Players.
  88. printf("AdmCmd: %s was frozen by admin %s, Reason: (%s)",playername,adminname,params[2]);
  89. TogglePlayerControllable(player1, 0);
  90. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  91. return 1;
  92. }
  93.  
  94. CMD:unfreeze(playerid,params[])
  95. {
  96. if(IsPlayerAdmin(playerid))
  97. {
  98. new tmp[256], tmp2[256], Index;
  99. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  100. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unfreeze [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  101. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  102. player1 = strval(tmp); // << player1 = ID of The Player
  103. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  104. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  105. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  106. format(string,sizeof(string),"AdmCmd: %s was unfrozen by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  107. SendClientMessageToAll(red,string); // Send Message To all Players.
  108. printf("AdmCmd: %s was unfrozen by admin %s, Reason: (%s)",playername,adminname,params[2]);
  109. TogglePlayerControllable(player1, 1);
  110. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  111. return 1;
  112. }
  113.  
  114. CMD:ahelp(playerid)
  115. {
  116. if(IsPlayerAdmin(playerid))
  117. {
  118. SendClientMessage(playerid,red, "|_________________________Admin Commands_________________________|");
  119. SendClientMessage(playerid,red, "Commands: /ahelp /ban /kick /freeze /unfreeze /getcash /jail");
  120. SendClientMessage(playerid,red, "Commands: /unjail /fly /clearchat /countdown /aweapon /explode");
  121. SendClientMessage(playerid,red, "Commands: /sendtospawn /sendtolspd /sendtolv /sendtolsair");
  122. SendClientMessage(playerid,red, "Commands: /sendtoairlv");
  123. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!");
  124. return 1;
  125. }
  126.  
  127. CMD:getcash(playerid,params[])
  128. {
  129. if(IsPlayerAdmin(playerid))
  130. {
  131. new tmp[256], tmp2[256], Index;
  132. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  133. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /getcash [reason]"); //Check If Player Does Not Added "Reason and the ID"
  134. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  135. player1 = strval(tmp); // << player1 = ID of The Player
  136. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  137. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  138. format(string,sizeof(string),"AdmCmd: %s gave $1.000.000 to himself, Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  139. SendClientMessageToAll(red,string); // Send Message To all Players.
  140. printf("AdmCmd: %s gave $1.000.000 to himself, Reason: (%s)",adminname,params[2]);
  141. GivePlayerMoney(playerid, 1000000);
  142. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  143. return 1;
  144. }
  145.  
  146. CMD:jail(playerid,params[])
  147. {
  148. if(IsPlayerAdmin(playerid))
  149. {
  150. new tmp[256], tmp2[256], Index;
  151. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  152. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /jail [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  153. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  154. player1 = strval(tmp); // << player1 = ID of The Player
  155. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  156. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  157. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  158. format(string,sizeof(string),"AdmCmd: %s was jailed by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  159. SendClientMessageToAll(red,string); // Send Message To all Players.
  160. printf("AdmCmd: %s was jailed by admin %s, Reason: (%s)",playername,adminname,params[2]);
  161. TogglePlayerControllable(player1, 0);
  162. SetPlayerInterior(player1, 6);
  163. SetPlayerPos (player1, 264.2000122,77.6999969,1000.5999756);
  164. SetPlayerSpecialAction(player1, SPECIAL_ACTION_CUFFED);
  165. SendClientMessage(player1,red,"JAIL: You were jailed by an admin!");
  166. SendClientMessage(player1,red,"JAIL: If you want to get out of jail talk with an admin!");
  167. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  168. return 1;
  169. }
  170.  
  171. CMD:unjail(playerid,params[])
  172. {
  173. if(IsPlayerAdmin(playerid))
  174. {
  175. new tmp[256], tmp2[256], Index;
  176. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  177. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unjail [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  178. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  179. player1 = strval(tmp); // << player1 = ID of The Player
  180. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  181. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  182. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  183. format(string,sizeof(string),"AdmCmd: %s was unjailed by admin %s, Reason: (%s)",playername,adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  184. SendClientMessageToAll(red,string); // Send Message To all Players.
  185. printf("AdmCmd: %s was unjailed by admin %s, Reason: (%s)",playername,adminname,params[2]);
  186. TogglePlayerControllable(player1, 1);
  187. SetPlayerInterior(player1, 0);
  188. SetPlayerSpecialAction(player1, SPECIAL_ACTION_NONE);
  189. SetPlayerPos (player1, 1545.2037,-1675.7291,13.5599);
  190. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  191. return 1;
  192. }
  193.  
  194. CMD:fly(playerid,params[])
  195. {
  196. if(IsPlayerAdmin(playerid))
  197. {
  198. new tmp[256], tmp2[256], Index;
  199. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  200. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /fly [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  201. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  202. player1 = strval(tmp); // << player1 = ID of The Player
  203. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  204. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  205. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  206. format(string,sizeof(string),"AdmCmd: Admin %s has teleported you, Reason: (%s). Have a nice fall!",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  207. SendClientMessage(player1,red,string); // Send Message
  208. printf("AdmCmd: Admin %s threw %s in the air, Reason: (%s)",adminname,playername,params[2]);
  209. GivePlayerWeapon(player1, 46, 1);
  210. SetPlayerPos (player1, 1481.8000488,-1662.5999756,1183.3000488);
  211. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  212. return 1;
  213. }
  214.  
  215. CMD:clearchat(playerid,params[])
  216. {
  217. if(IsPlayerAdmin(playerid))
  218. {
  219. new tmp[256], tmp2[256], Index;
  220. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  221. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /clearchat [reason]"); //Check If Player Does Not Added "Reason and the ID"
  222. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  223. player1 = strval(tmp); // << player1 = ID of The Player
  224. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  225. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  226. SendClientMessageToAll(red," ");
  227. SendClientMessageToAll(red," ");
  228. SendClientMessageToAll(red," ");
  229. SendClientMessageToAll(red," ");
  230. SendClientMessageToAll(red," ");
  231. SendClientMessageToAll(red," ");
  232. SendClientMessageToAll(red," ");
  233. SendClientMessageToAll(red," ");
  234. SendClientMessageToAll(red," ");
  235. SendClientMessageToAll(red," ");
  236. SendClientMessageToAll(red," ");
  237. SendClientMessageToAll(red," ");
  238. SendClientMessageToAll(red," ");
  239. SendClientMessageToAll(red," ");
  240. SendClientMessageToAll(red," ");
  241. SendClientMessageToAll(red," ");
  242. SendClientMessageToAll(red," ");
  243. SendClientMessageToAll(red," ");
  244. SendClientMessageToAll(red," ");
  245. SendClientMessageToAll(red," ");
  246. SendClientMessageToAll(red," ");
  247. SendClientMessageToAll(red," ");
  248. SendClientMessageToAll(red," ");
  249. SendClientMessageToAll(red," ");
  250. SendClientMessageToAll(red," ");
  251. SendClientMessageToAll(red," ");
  252. SendClientMessageToAll(red," ");
  253. SendClientMessageToAll(red," ");
  254. SendClientMessageToAll(red," ");
  255. SendClientMessageToAll(red," ");
  256. SendClientMessageToAll(red," ");
  257. SendClientMessageToAll(red," ");
  258. SendClientMessageToAll(red," ");
  259. SendClientMessageToAll(red," ");
  260. SendClientMessageToAll(red," ");
  261. SendClientMessageToAll(red," ");
  262. SendClientMessageToAll(red," ");
  263. SendClientMessageToAll(red," ");
  264. SendClientMessageToAll(red," ");
  265. SendClientMessageToAll(red," ");
  266. SendClientMessageToAll(red," ");
  267. SendClientMessageToAll(red," ");
  268. SendClientMessageToAll(red," ");
  269. SendClientMessageToAll(red," ");
  270. SendClientMessageToAll(red," ");
  271. SendClientMessageToAll(red," ");
  272. SendClientMessageToAll(red," ");
  273. SendClientMessageToAll(red," ");
  274. SendClientMessageToAll(red," ");
  275. SendClientMessageToAll(red," ");
  276. SendClientMessageToAll(red," ");
  277. SendClientMessageToAll(red," ");
  278. SendClientMessageToAll(red," ");
  279. SendClientMessageToAll(red," ");
  280. SendClientMessageToAll(red," ");
  281. SendClientMessageToAll(red," ");
  282. SendClientMessageToAll(red," ");
  283. SendClientMessageToAll(red," ");
  284. SendClientMessageToAll(red," ");
  285. SendClientMessageToAll(red," ");
  286. SendClientMessageToAll(red," ");
  287. SendClientMessageToAll(red," ");
  288. SendClientMessageToAll(red," ");
  289. SendClientMessageToAll(red," ");
  290. SendClientMessageToAll(red," ");
  291. SendClientMessageToAll(red," ");
  292. SendClientMessageToAll(red," ");
  293. SendClientMessageToAll(red," ");
  294. SendClientMessageToAll(red," ");
  295. SendClientMessageToAll(red," ");
  296. SendClientMessageToAll(red," ");
  297. SendClientMessageToAll(red," ");
  298. SendClientMessageToAll(red," ");
  299. SendClientMessageToAll(red," ");
  300. SendClientMessageToAll(red," ");
  301. SendClientMessageToAll(red," ");
  302. SendClientMessageToAll(red," ");
  303. SendClientMessageToAll(red," ");
  304. SendClientMessageToAll(red," ");
  305. SendClientMessageToAll(red," ");
  306. SendClientMessageToAll(red," ");
  307. SendClientMessageToAll(red," ");
  308. SendClientMessageToAll(red," ");
  309. SendClientMessageToAll(red," ");
  310. SendClientMessageToAll(red," ");
  311. SendClientMessageToAll(red," ");
  312. SendClientMessageToAll(red," ");
  313. SendClientMessageToAll(red," ");
  314. SendClientMessageToAll(red," ");
  315. SendClientMessageToAll(red," ");
  316. SendClientMessageToAll(red," ");
  317. SendClientMessageToAll(red," ");
  318. SendClientMessageToAll(red," ");
  319. SendClientMessageToAll(red," ");
  320. SendClientMessageToAll(red," ");
  321. SendClientMessageToAll(red," ");
  322. SendClientMessageToAll(red," ");
  323. SendClientMessageToAll(red," ");
  324. SendClientMessageToAll(red," ");
  325. SendClientMessageToAll(red," ");
  326. SendClientMessageToAll(red," ");
  327. SendClientMessageToAll(red," ");
  328. SendClientMessageToAll(red," ");
  329. SendClientMessageToAll(red," ");
  330. SendClientMessageToAll(red," ");
  331. SendClientMessageToAll(red," ");
  332. SendClientMessageToAll(red," ");
  333. SendClientMessageToAll(red," ");
  334. SendClientMessageToAll(red," ");
  335. SendClientMessageToAll(red," ");
  336. format(string,sizeof(string),"AdmCmd: The chat was cleared by %s",adminname); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  337. SendClientMessageToAll(red,string); // Send Message To all Players.
  338. printf("AdmCmd: %s cleared the chat, Reason: (%s)",adminname,params[2]);
  339. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  340. return 1;
  341. }
  342.  
  343. CMD:aweapon(playerid,params[])
  344. {
  345. if(IsPlayerAdmin(playerid))
  346. {
  347. new tmp[256], tmp2[256], Index;
  348. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  349. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /aweapon [reason]"); //Check If Player Does Not Added "Reason and the ID"
  350. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  351. player1 = strval(tmp); // << player1 = ID of The Player
  352. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  353. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  354. GivePlayerWeapon (playerid, 38, 99999);
  355. GivePlayerWeapon (playerid, 39, 99999);
  356. GivePlayerWeapon (playerid, 41, 99999);
  357. GivePlayerWeapon (playerid, 45, 1);
  358. GivePlayerWeapon (playerid, 34, 99999);
  359. GivePlayerWeapon (playerid, 31, 99999);
  360. GivePlayerWeapon (playerid, 29, 99999);
  361. GivePlayerWeapon (playerid, 27, 99999);
  362. GivePlayerWeapon (playerid, 24, 99999);
  363. GivePlayerWeapon (playerid, 1, 1);
  364. GivePlayerWeapon (playerid, 9, 1);
  365. format(string,sizeof(string),"AdmCmd: Admin %s gave himself a lot of weapons, Reason: (%s)",adminname,params[2]);
  366. SendClientMessageToAll (red,string);
  367. printf("AdmCmd: %s gave himself a lot of weapons, Reason: (%s)",adminname,params[2]);
  368. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!");
  369. return 1;
  370. }
  371.  
  372. CMD:explode(playerid,params[])
  373. {
  374. if(IsPlayerAdmin(playerid))
  375. {
  376. new tmp[256], tmp2[256], Index;
  377. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  378. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /explode [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  379. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  380. player1 = strval(tmp); // << player1 = ID of The Player
  381. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  382. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  383. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  384. format(string,sizeof(string),"AdmCmd: Admin %s has killed you! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  385. SendClientMessage(player1,red,string);
  386. printf("AdmCmd: Admin %s used /explode on %s, Reason: (%s)",adminname,playername,params[2]);
  387. SetPlayerArmour(player1, 0);
  388. SetPlayerHealth(player1, 0);
  389. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  390. return 1;
  391. }
  392.  
  393. CMD:sendtospawn(playerid,params[])
  394. {
  395. if(IsPlayerAdmin(playerid))
  396. {
  397. new tmp[256], tmp2[256], Index;
  398. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  399. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtols [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  400. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  401. player1 = strval(tmp); // << player1 = ID of The Player
  402. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  403. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  404. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  405. format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LS! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  406. SendClientMessage(player1,red,string);
  407. printf("AdmCmd: Admin %s sent %s to LS(spawn), Reason: (%s)",adminname,playername,params[2]);
  408. SetPlayerPos (player1, 1310.1509,-1367.6149,13.5383);
  409. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  410. return 1;
  411. }
  412.  
  413. CMD:sendtopdls(playerid,params[])
  414. {
  415. if(IsPlayerAdmin(playerid))
  416. {
  417. new tmp[256], tmp2[256], Index;
  418. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  419. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtolspd [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  420. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  421. player1 = strval(tmp); // << player1 = ID of The Player
  422. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  423. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  424. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  425. format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LSPD! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  426. SendClientMessage(player1,red,string);
  427. printf("AdmCmd: Admin %s sent %s to Los Santos Police Department, Reason: (%s)",adminname,playername,params[2]);
  428. SetPlayerPos (player1, 1545.2037,-1675.7291,13.5599);
  429. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  430. return 1;
  431. }
  432.  
  433. CMD:sendtolsair(playerid,params[])
  434. {
  435. if(IsPlayerAdmin(playerid))
  436. {
  437. new tmp[256], tmp2[256], Index;
  438. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  439. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtolsair [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  440. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  441. player1 = strval(tmp); // << player1 = ID of The Player
  442. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  443. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  444. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  445. format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LSAIRPORT! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  446. SendClientMessage(player1,red,string);
  447. printf("AdmCmd: Admin %s sent %s to Los Santos Airport, Reason: (%s)",adminname,playername,params[2]);
  448. SetPlayerPos (player1, 1937.3033,-2339.5210,13.5469);
  449. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  450. return 1;
  451. }
  452.  
  453. CMD:sendtoairlv(playerid,params[])
  454. {
  455. if(IsPlayerAdmin(playerid))
  456. {
  457. new tmp[256], tmp2[256], Index;
  458. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  459. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtoairlv [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  460. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  461. player1 = strval(tmp); // << player1 = ID of The Player
  462. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  463. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  464. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  465. format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LVAIRPORT! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  466. SendClientMessage(player1,red,string);
  467. printf("AdmCmd: Admin %s sent %s to Las Venturas Airport, Reason: (%s)",adminname,playername,params[2]);
  468. SetPlayerPos (player1, 1681.0872,1447.7493,10.7731);
  469. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  470. return 1;
  471. }
  472.  
  473. CMD:sendtolv(playerid,params[])
  474. {
  475. if(IsPlayerAdmin(playerid))
  476. {
  477. new tmp[256], tmp2[256], Index;
  478. tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  479. if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sendtolv [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
  480. new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  481. player1 = strval(tmp); // << player1 = ID of The Player
  482. if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"That player isn't connected!"); //<< Check If Player Connected Or Not
  483. GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
  484. GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
  485. format(string,sizeof(string),"AdmCmd: Admin %s has sent you to LV! Reason: (%s)",adminname,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
  486. SendClientMessage(player1,red,string);
  487. printf("AdmCmd: Admin %s sent %s to Las Venturas, Reason: (%s)",adminname,playername,params[2]);
  488. SetPlayerPos (player1, 2029.8820,1007.4957,10.8203);
  489. } else return SendClientMessage(playerid,red,"You are not authorized to use this command!"); // This Code return the Player IF he's not Login in as RCON admin
  490. return 1;
  491. }
  492.  
  493. strtok(const string[], &index)
  494. {
  495. new length = strlen(string);
  496. while ((index < length) && (string[index] <= ' '))
  497. {
  498. index++;
  499. }
  500.  
  501. new offset = index;
  502. new result[20];
  503. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  504. {
  505. result[index - offset] = string[index];
  506. index++;
  507. }
  508. result[index - offset] = EOS;
  509. return result;
  510. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement