Advertisement
Guest User

Admin Menu [V1.0] by HY [Textdraws + Dialogs]

a guest
Dec 5th, 2014
611
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.16 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define COLOR_LIGHTBLUE 0x33CCFFAA
  5.  
  6. #define DIALOG_SLAP 0
  7. #define DIALOG_KICK 1
  8. #define DIALOG_KILL 2
  9. #define DIALOG_BAN 3
  10. #define DIALOG_EXPLODE 4
  11. #define DIALOG_MUTE 5
  12. #define DIALOG_UNMUTE 6
  13. #define DIALOG_DISARM 7
  14. #define DIALOG_SPAWN 8
  15. #define DIALOG_SKIN 9
  16. #define DIALOG_GOTO 10
  17. #define DIALOG_GET 11
  18. #define INFINITY (Float:0x7F800000)
  19.  
  20. new Text:Textdraw0;
  21. new Text:Textdraw1;
  22. new Text:Textdraw2;
  23. new Text:Textdraw3;
  24. new Text:Textdraw4;
  25. new Text:Textdraw5;
  26. new Text:Textdraw6;
  27. new Text:Textdraw7;
  28. new Text:Textdraw8;
  29. new Text:Textdraw9;
  30. new Text:Textdraw10;
  31. new Text:Textdraw11;
  32. new Text:Textdraw12;
  33. new Text:Textdraw13;
  34. new Text:Textdraw14;
  35. new Text:Textdraw15;
  36. new Text:Textdraw16;
  37. new Text:Textdraw17;
  38. new Text:Textdraw18;
  39. new Muted[MAX_PLAYERS];
  40. new GodMode[MAX_PLAYERS];
  41.  
  42. public OnPlayerConnect(playerid)
  43. {
  44. GodMode[playerid] = 0;
  45. return 1;
  46. }
  47.  
  48. public OnFilterScriptInit()
  49. {
  50. Textdraw0 = TextDrawCreate(566.000000, 144.113327, "usebox");
  51. TextDrawLetterSize(Textdraw0, 0.000000, 27.807779);
  52. TextDrawTextSize(Textdraw0, 65.199996, 0.000000);
  53. TextDrawAlignment(Textdraw0, 1);
  54. TextDrawColor(Textdraw0, 0);
  55. TextDrawUseBox(Textdraw0, true);
  56. TextDrawBoxColor(Textdraw0, 102);
  57. TextDrawSetShadow(Textdraw0, 0);
  58. TextDrawSetOutline(Textdraw0, 0);
  59. TextDrawFont(Textdraw0, 0);
  60.  
  61. Textdraw1 = TextDrawCreate(224.799972, 139.626617, "Admin Menu:");
  62. TextDrawLetterSize(Textdraw1, 0.569199, 2.742399);
  63. TextDrawAlignment(Textdraw1, 1);
  64. TextDrawColor(Textdraw1, 16777215);
  65. TextDrawSetShadow(Textdraw1, 0);
  66. TextDrawSetOutline(Textdraw1, 1);
  67. TextDrawBackgroundColor(Textdraw1, 51);
  68. TextDrawFont(Textdraw1, 2);
  69. TextDrawSetProportional(Textdraw1, 1);
  70.  
  71. Textdraw2 = TextDrawCreate(83.199981, 186.666671, "Slap");
  72. TextDrawLetterSize(Textdraw2, 0.555599, 2.406400);
  73. TextDrawAlignment(Textdraw2, 1);
  74. TextDrawColor(Textdraw2, -1);
  75. TextDrawSetShadow(Textdraw2, 0);
  76. TextDrawSetOutline(Textdraw2, 1);
  77. TextDrawBackgroundColor(Textdraw2, 51);
  78. TextDrawFont(Textdraw2, 2);
  79. TextDrawSetProportional(Textdraw2, 1);
  80. TextDrawSetSelectable(Textdraw2, true);
  81.  
  82. Textdraw3 = TextDrawCreate(218.400024, 186.666625, "Kick");
  83. TextDrawLetterSize(Textdraw3, 0.567599, 2.279466);
  84. TextDrawAlignment(Textdraw3, 1);
  85. TextDrawColor(Textdraw3, -1);
  86. TextDrawSetShadow(Textdraw3, 0);
  87. TextDrawSetOutline(Textdraw3, 1);
  88. TextDrawBackgroundColor(Textdraw3, 51);
  89. TextDrawFont(Textdraw3, 2);
  90. TextDrawSetProportional(Textdraw3, 1);
  91. TextDrawSetSelectable(Textdraw3, true);
  92.  
  93. Textdraw4 = TextDrawCreate(350.399780, 186.666625, "Kill");
  94. TextDrawLetterSize(Textdraw4, 0.606000, 2.361599);
  95. TextDrawAlignment(Textdraw4, 1);
  96. TextDrawColor(Textdraw4, -1);
  97. TextDrawSetShadow(Textdraw4, 0);
  98. TextDrawSetOutline(Textdraw4, 1);
  99. TextDrawBackgroundColor(Textdraw4, 51);
  100. TextDrawFont(Textdraw4, 2);
  101. TextDrawSetProportional(Textdraw4, 1);
  102. TextDrawSetSelectable(Textdraw4, true);
  103.  
  104. Textdraw5 = TextDrawCreate(488.799896, 188.906692, "Ban");
  105. TextDrawLetterSize(Textdraw5, 0.606800, 2.264532);
  106. TextDrawAlignment(Textdraw5, 1);
  107. TextDrawColor(Textdraw5, -1);
  108. TextDrawSetShadow(Textdraw5, 0);
  109. TextDrawSetOutline(Textdraw5, 1);
  110. TextDrawBackgroundColor(Textdraw5, 51);
  111. TextDrawFont(Textdraw5, 2);
  112. TextDrawSetProportional(Textdraw5, 1);
  113. TextDrawSetSelectable(Textdraw5, true);
  114.  
  115. Textdraw6 = TextDrawCreate(68.800018, 241.920013, "Explode");
  116. TextDrawLetterSize(Textdraw6, 0.590000, 2.354133);
  117. TextDrawAlignment(Textdraw6, 1);
  118. TextDrawColor(Textdraw6, -1);
  119. TextDrawSetShadow(Textdraw6, 0);
  120. TextDrawSetOutline(Textdraw6, 1);
  121. TextDrawBackgroundColor(Textdraw6, 51);
  122. TextDrawFont(Textdraw6, 2);
  123. TextDrawSetProportional(Textdraw6, 1);
  124. TextDrawSetSelectable(Textdraw6, true);
  125.  
  126. Textdraw7 = TextDrawCreate(214.399993, 243.413299, "Mute");
  127. TextDrawLetterSize(Textdraw7, 0.561199, 2.189866);
  128. TextDrawAlignment(Textdraw7, 1);
  129. TextDrawColor(Textdraw7, -1);
  130. TextDrawSetShadow(Textdraw7, 0);
  131. TextDrawSetOutline(Textdraw7, 1);
  132. TextDrawBackgroundColor(Textdraw7, 51);
  133. TextDrawFont(Textdraw7, 2);
  134. TextDrawSetProportional(Textdraw7, 1);
  135. TextDrawSetSelectable(Textdraw7, true);
  136.  
  137. Textdraw8 = TextDrawCreate(335.199981, 243.413330, "Unmute");
  138. TextDrawLetterSize(Textdraw8, 0.569999, 2.279466);
  139. TextDrawAlignment(Textdraw8, 1);
  140. TextDrawColor(Textdraw8, -1);
  141. TextDrawSetShadow(Textdraw8, 0);
  142. TextDrawSetOutline(Textdraw8, 1);
  143. TextDrawBackgroundColor(Textdraw8, 51);
  144. TextDrawFont(Textdraw8, 2);
  145. TextDrawSetProportional(Textdraw8, 1);
  146. TextDrawSetSelectable(Textdraw8, true);
  147.  
  148. Textdraw9 = TextDrawCreate(465.599975, 243.413330, "Disarm");
  149. TextDrawLetterSize(Textdraw9, 0.562000, 2.361598);
  150. TextDrawAlignment(Textdraw9, 1);
  151. TextDrawColor(Textdraw9, -1);
  152. TextDrawSetShadow(Textdraw9, 0);
  153. TextDrawSetOutline(Textdraw9, 1);
  154. TextDrawBackgroundColor(Textdraw9, 51);
  155. TextDrawFont(Textdraw9, 2);
  156. TextDrawSetProportional(Textdraw9, 1);
  157. TextDrawSetSelectable(Textdraw9, true);
  158.  
  159. Textdraw10 = TextDrawCreate(71.999984, 304.639984, "Spawn");
  160. TextDrawLetterSize(Textdraw10, 0.542800, 2.383999);
  161. TextDrawAlignment(Textdraw10, 1);
  162. TextDrawColor(Textdraw10, -1);
  163. TextDrawSetShadow(Textdraw10, 0);
  164. TextDrawSetOutline(Textdraw10, 1);
  165. TextDrawBackgroundColor(Textdraw10, 51);
  166. TextDrawFont(Textdraw10, 2);
  167. TextDrawSetProportional(Textdraw10, 1);
  168. TextDrawSetSelectable(Textdraw10, true);
  169.  
  170. Textdraw11 = TextDrawCreate(213.600051, 304.639984, "Skin");
  171. TextDrawLetterSize(Textdraw11, 0.595600, 2.257067);
  172. TextDrawAlignment(Textdraw11, 1);
  173. TextDrawColor(Textdraw11, -1);
  174. TextDrawSetShadow(Textdraw11, 0);
  175. TextDrawSetOutline(Textdraw11, 1);
  176. TextDrawBackgroundColor(Textdraw11, 51);
  177. TextDrawFont(Textdraw11, 2);
  178. TextDrawSetProportional(Textdraw11, 1);
  179. TextDrawSetSelectable(Textdraw11, true);
  180.  
  181. Textdraw12 = TextDrawCreate(343.200042, 304.640045, "Goto");
  182. TextDrawLetterSize(Textdraw12, 0.551600, 2.249599);
  183. TextDrawAlignment(Textdraw12, 1);
  184. TextDrawColor(Textdraw12, -1);
  185. TextDrawSetShadow(Textdraw12, 0);
  186. TextDrawSetOutline(Textdraw12, 1);
  187. TextDrawBackgroundColor(Textdraw12, 51);
  188. TextDrawFont(Textdraw12, 2);
  189. TextDrawSetProportional(Textdraw12, 1);
  190. TextDrawSetSelectable(Textdraw12, true);
  191.  
  192. Textdraw13 = TextDrawCreate(468.799804, 303.893280, "Get");
  193. TextDrawLetterSize(Textdraw13, 0.627600, 2.428800);
  194. TextDrawAlignment(Textdraw13, 1);
  195. TextDrawColor(Textdraw13, -1);
  196. TextDrawSetShadow(Textdraw13, 0);
  197. TextDrawSetOutline(Textdraw13, 1);
  198. TextDrawBackgroundColor(Textdraw13, 51);
  199. TextDrawFont(Textdraw13, 2);
  200. TextDrawSetProportional(Textdraw13, 1);
  201. TextDrawSetSelectable(Textdraw13, true);
  202.  
  203. Textdraw14 = TextDrawCreate(72.800010, 359.893249, "Heal");
  204. TextDrawLetterSize(Textdraw14, 0.627599, 2.354133);
  205. TextDrawAlignment(Textdraw14, 1);
  206. TextDrawColor(Textdraw14, -1);
  207. TextDrawSetShadow(Textdraw14, 0);
  208. TextDrawSetOutline(Textdraw14, 1);
  209. TextDrawBackgroundColor(Textdraw14, 51);
  210. TextDrawFont(Textdraw14, 2);
  211. TextDrawSetProportional(Textdraw14, 1);
  212. TextDrawSetSelectable(Textdraw14, true);
  213.  
  214. Textdraw15 = TextDrawCreate(199.199996, 360.639984, "Armour");
  215. TextDrawLetterSize(Textdraw15, 0.537199, 2.279466);
  216. TextDrawAlignment(Textdraw15, 1);
  217. TextDrawColor(Textdraw15, -1);
  218. TextDrawSetShadow(Textdraw15, 0);
  219. TextDrawSetOutline(Textdraw15, 1);
  220. TextDrawBackgroundColor(Textdraw15, 51);
  221. TextDrawFont(Textdraw15, 2);
  222. TextDrawSetProportional(Textdraw15, 1);
  223. TextDrawSetSelectable(Textdraw15, true);
  224.  
  225. Textdraw16 = TextDrawCreate(336.000061, 360.639984, "GodMode");
  226. TextDrawLetterSize(Textdraw16, 0.511600, 2.107733);
  227. TextDrawAlignment(Textdraw16, 1);
  228. TextDrawColor(Textdraw16, -1);
  229. TextDrawSetShadow(Textdraw16, 0);
  230. TextDrawSetOutline(Textdraw16, 1);
  231. TextDrawBackgroundColor(Textdraw16, 51);
  232. TextDrawFont(Textdraw16, 2);
  233. TextDrawSetProportional(Textdraw16, 1);
  234. TextDrawSetSelectable(Textdraw16, true);
  235.  
  236. Textdraw17 = TextDrawCreate(565.200012, 372.593322, "usebox");
  237. TextDrawLetterSize(Textdraw17, 0.000000, 2.421112);
  238. TextDrawTextSize(Textdraw17, 490.000000, 0.000000);
  239. TextDrawAlignment(Textdraw17, 1);
  240. TextDrawColor(Textdraw17, 0);
  241. TextDrawUseBox(Textdraw17, true);
  242. TextDrawBoxColor(Textdraw17, 255);
  243. TextDrawSetShadow(Textdraw17, 0);
  244. TextDrawSetOutline(Textdraw17, 0);
  245. TextDrawFont(Textdraw17, 0);
  246.  
  247. Textdraw18 = TextDrawCreate(498.399963, 376.319976, "Close");
  248. TextDrawLetterSize(Textdraw18, 0.449999, 1.600000);
  249. TextDrawAlignment(Textdraw18, 1);
  250. TextDrawColor(Textdraw18, -5963521);
  251. TextDrawSetShadow(Textdraw18, 0);
  252. TextDrawSetOutline(Textdraw18, 1);
  253. TextDrawBackgroundColor(Textdraw18, 51);
  254. TextDrawFont(Textdraw18, 2);
  255. TextDrawSetProportional(Textdraw18, 1);
  256. TextDrawSetSelectable(Textdraw18, true);
  257. return 1;
  258. }
  259.  
  260. CMD:am(playerid, params[])
  261. {
  262. if(IsPlayerAdmin(playerid))
  263. {
  264. Show(playerid);
  265. SelectTextDraw(playerid, 0xFFFFFFFF);
  266. }
  267. else
  268. {
  269. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You aren't {FF0000}RCON");
  270. }
  271. return 1;
  272. }
  273.  
  274. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  275. {
  276. if(clickedid == Textdraw2)
  277. {
  278. ShowPlayerDialog(playerid, DIALOG_SLAP, DIALOG_STYLE_INPUT, "Slap","Please, input below the player's ID wich you want to get slaped:","Continue","Exit");
  279. }
  280. else if(clickedid == Textdraw3)
  281. {
  282. ShowPlayerDialog(playerid, DIALOG_KICK, DIALOG_STYLE_INPUT, "Kick","Please, input below the player's ID wich you want to kick:","Continue","Exit");
  283. }
  284. else if(clickedid == Textdraw4)
  285. {
  286. ShowPlayerDialog(playerid, DIALOG_KILL, DIALOG_STYLE_INPUT, "Kill","Please, input below the player's ID wich you want to kill:","Continue","Exit");
  287. }
  288. else if(clickedid == Textdraw5)
  289. {
  290. ShowPlayerDialog(playerid, DIALOG_BAN, DIALOG_STYLE_INPUT, "Ban","Please, input below the player's ID wich you want to ban:","Continue","Exit");
  291. }
  292. else if(clickedid == Textdraw6)
  293. {
  294. ShowPlayerDialog(playerid, DIALOG_EXPLODE, DIALOG_STYLE_INPUT, "Explode","Please, input below the player's ID wich you want to explode:","Continue","Exit");
  295. }
  296. else if(clickedid == Textdraw7)
  297. {
  298. ShowPlayerDialog(playerid, DIALOG_MUTE, DIALOG_STYLE_INPUT, "Mute","Please, input below the player's ID wich you want to mute:","Continue","Exit");
  299. }
  300. else if(clickedid == Textdraw8)
  301. {
  302. ShowPlayerDialog(playerid, DIALOG_UNMUTE, DIALOG_STYLE_INPUT, "UnMute","Please, input below the player's ID wich you want to unmute:","Continue","Exit");
  303. }
  304. else if(clickedid == Textdraw9)
  305. {
  306. ShowPlayerDialog(playerid, DIALOG_DISARM, DIALOG_STYLE_INPUT, "Disarm","Please, input below the player's ID wich you want to disarm:","Continue","Exit");
  307. }
  308. else if(clickedid == Textdraw10)
  309. {
  310. ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_INPUT, "Spawn","Please, input below the player's ID wich you want to spawn:","Continue","Exit");
  311. }
  312. else if(clickedid == Textdraw11)
  313. {
  314. ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "Skin","Please, input below the Skin ID wich you want to use:","Continue","Exit");
  315. }
  316. else if(clickedid == Textdraw12)
  317. {
  318. ShowPlayerDialog(playerid, DIALOG_GOTO, DIALOG_STYLE_INPUT, "Goto","Please, input below the player's ID wich you want to teleport:","Continue","Exit");
  319. }
  320. else if(clickedid == Textdraw13)
  321. {
  322. ShowPlayerDialog(playerid, DIALOG_GET, DIALOG_STYLE_INPUT, "Get","Please, input below the player's ID wich you want to get:","Continue","Exit");
  323. }
  324. else if(clickedid == Textdraw14)
  325. {
  326. SetPlayerHealth(playerid, 100);
  327. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You got healed!");
  328. }
  329. else if(clickedid == Textdraw15)
  330. {
  331. SetPlayerArmour(playerid, 100);
  332. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You got armoured!");
  333. }
  334. else if(clickedid == Textdraw16)
  335. {
  336. if(GodMode[playerid] == 0)
  337. {
  338. SetPlayerHealth(playerid, INFINITY);
  339. SetPlayerArmour(playerid, INFINITY);
  340. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You activated GodMode!");
  341. GodMode[playerid] = 1;
  342. }
  343. else if(GodMode[playerid] == 1)
  344. {
  345. SetPlayerHealth(playerid, 100);
  346. SetPlayerArmour(playerid, 100);
  347. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You dezactivated GodMode!");
  348. GodMode[playerid] = 0;
  349. }
  350. }
  351. else if(clickedid == Textdraw18)
  352. {
  353. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You closed Admin Menu!");
  354. Close(playerid);
  355. }
  356. return 1;
  357. }
  358.  
  359. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  360. {
  361. if(dialogid == DIALOG_SLAP)
  362. {
  363. if(response)
  364. {
  365. new ID, Float:X, Float:Y, Float:Z, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  366. ID = strval(inputtext);
  367. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  368. GetPlayerPos(ID, X, Y, Z);
  369. SetPlayerPos(ID, X, Y, Z+15);
  370. GetPlayerName(ID, pname, sizeof(pname));
  371. GetPlayerName(playerid, name, sizeof(name));
  372. format(string, sizeof(string), "You have slaped {FF0000}%s!", pname);
  373. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  374. format(string, sizeof(string), "You got slaped by {FF0000}%s!", name);
  375. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  376. }
  377. }
  378. if(dialogid == DIALOG_KICK)
  379. {
  380. if(response)
  381. {
  382. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  383. ID = strval(inputtext);
  384. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  385. GetPlayerName(ID, pname, sizeof(pname));
  386. GetPlayerName(playerid, name, sizeof(name));
  387. format(string, sizeof(string), "You have kicked {FF0000}%s!", pname);
  388. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  389. format(string, sizeof(string), "You got kicked by {FF0000}%s!", name);
  390. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  391. Kick(ID);
  392. }
  393. }
  394. if(dialogid == DIALOG_KILL)
  395. {
  396. if(response)
  397. {
  398. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  399. ID = strval(inputtext);
  400. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  401. GetPlayerName(ID, pname, sizeof(pname));
  402. GetPlayerName(playerid, name, sizeof(name));
  403. format(string, sizeof(string), "You have killed {FF0000}%s!", pname);
  404. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  405. format(string, sizeof(string), "You got killed by {FF0000}%s!", name);
  406. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  407. SetPlayerHealth(ID, 0.0);
  408. }
  409. }
  410. if(dialogid == DIALOG_BAN)
  411. {
  412. if(response)
  413. {
  414. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  415. ID = strval(inputtext);
  416. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  417. GetPlayerName(ID, pname, sizeof(pname));
  418. GetPlayerName(playerid, name, sizeof(name));
  419. format(string, sizeof(string), "You have banned {FF0000}%s!", pname);
  420. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  421. format(string, sizeof(string), "You got banned by {FF0000}%s!", name);
  422. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  423. Ban(ID);
  424. }
  425. }
  426. if(dialogid == DIALOG_EXPLODE)
  427. {
  428. if(response)
  429. {
  430. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128], Float:X, Float:Y, Float:Z;
  431. ID = strval(inputtext);
  432. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  433. GetPlayerName(ID, pname, sizeof(pname));
  434. GetPlayerName(playerid, name, sizeof(name));
  435. GetPlayerPos(ID, X, Y, Z);
  436. format(string, sizeof(string), "You have exploded {FF0000}%s!", pname);
  437. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  438. format(string, sizeof(string), "You got exploded by {FF0000}%s!", name);
  439. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  440. CreateExplosion(X, Y, Z, 12, 100.0);
  441. }
  442. }
  443. if(dialogid == DIALOG_MUTE)
  444. {
  445. if(response)
  446. {
  447. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  448. ID = strval(inputtext);
  449. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  450. GetPlayerName(ID, pname, sizeof(pname));
  451. GetPlayerName(playerid, name, sizeof(name));
  452. format(string, sizeof(string), "You have muted {FF0000}%s!", pname);
  453. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  454. format(string, sizeof(string), "You got muted by {FF0000}%s!", name);
  455. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  456. Muted[playerid] = 1;
  457. }
  458. }
  459. if(dialogid == DIALOG_UNMUTE)
  460. {
  461. if(response)
  462. {
  463. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  464. ID = strval(inputtext);
  465. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  466. if(Muted[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't muted!");
  467. GetPlayerName(ID, pname, sizeof(pname));
  468. GetPlayerName(playerid, name, sizeof(name));
  469. format(string, sizeof(string), "You have unmuted {FF0000}%s!", pname);
  470. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  471. format(string, sizeof(string), "You got unmuted by {FF0000}%s!", name);
  472. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  473. Muted[playerid] = 0;
  474. }
  475. }
  476. if(dialogid == DIALOG_DISARM)
  477. {
  478. if(response)
  479. {
  480. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  481. ID = strval(inputtext);
  482. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  483. GetPlayerName(ID, pname, sizeof(pname));
  484. GetPlayerName(playerid, name, sizeof(name));
  485. format(string, sizeof(string), "You have disarmed {FF0000}%s!", pname);
  486. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  487. format(string, sizeof(string), "You got disarmed by {FF0000}%s!", name);
  488. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  489. ResetPlayerWeapons(ID);
  490. }
  491. }
  492. if(dialogid == DIALOG_SPAWN)
  493. {
  494. if(response)
  495. {
  496. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  497. ID = strval(inputtext);
  498. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  499. GetPlayerName(ID, pname, sizeof(pname));
  500. GetPlayerName(playerid, name, sizeof(name));
  501. format(string, sizeof(string), "You have spawned {FF0000}%s!", pname);
  502. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  503. format(string, sizeof(string), "You got spawned by {FF0000}%s!", name);
  504. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  505. SpawnPlayer(ID);
  506. }
  507. }
  508. if(dialogid == DIALOG_SKIN)
  509. {
  510. if(response)
  511. {
  512. new ID;
  513. ID = strval(inputtext);
  514. if(ID > 299) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Skin isn't good!");
  515. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You changed your skin");
  516. SetPlayerSkin(playerid, ID);
  517. }
  518. }
  519. if(dialogid == DIALOG_GOTO)
  520. {
  521. if(response)
  522. {
  523. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128], Float:X, Float:Y, Float:Z;
  524. ID = strval(inputtext);
  525. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  526. GetPlayerName(ID, pname, sizeof(pname));
  527. GetPlayerName(playerid, name, sizeof(name));
  528. GetPlayerPos(ID, X, Y, Z);
  529. SetPlayerPos(playerid, X, Y, Z);
  530. format(string, sizeof(string), "You teleported to {FF0000}%s!", pname);
  531. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  532. format(string, sizeof(string), "{FF0000}%s teleported to you!", name);
  533. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  534. }
  535. }
  536. if(dialogid == DIALOG_GET)
  537. {
  538. if(response)
  539. {
  540. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128], Float:X, Float:Y, Float:Z;
  541. ID = strval(inputtext);
  542. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Player isn't connected!");
  543. GetPlayerName(ID, pname, sizeof(pname));
  544. GetPlayerName(playerid, name, sizeof(name));
  545. GetPlayerPos(playerid, X, Y, Z);
  546. SetPlayerPos(ID, X, Y, Z);
  547. format(string, sizeof(string), "You get to you position {FF0000}%s!", pname);
  548. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  549. format(string, sizeof(string), "{FF0000}%s getted you to his position!", name);
  550. SendClientMessage(ID, COLOR_LIGHTBLUE, string);
  551. }
  552. }
  553. return 1;
  554. }
  555.  
  556. stock Show(playerid)
  557. {
  558. TextDrawShowForPlayer(playerid, Textdraw0);
  559. TextDrawShowForPlayer(playerid, Textdraw1);
  560. TextDrawShowForPlayer(playerid, Textdraw2);
  561. TextDrawShowForPlayer(playerid, Textdraw3);
  562. TextDrawShowForPlayer(playerid, Textdraw4);
  563. TextDrawShowForPlayer(playerid, Textdraw5);
  564. TextDrawShowForPlayer(playerid, Textdraw6);
  565. TextDrawShowForPlayer(playerid, Textdraw7);
  566. TextDrawShowForPlayer(playerid, Textdraw8);
  567. TextDrawShowForPlayer(playerid, Textdraw9);
  568. TextDrawShowForPlayer(playerid, Textdraw10);
  569. TextDrawShowForPlayer(playerid, Textdraw11);
  570. TextDrawShowForPlayer(playerid, Textdraw12);
  571. TextDrawShowForPlayer(playerid, Textdraw13);
  572. TextDrawShowForPlayer(playerid, Textdraw14);
  573. TextDrawShowForPlayer(playerid, Textdraw15);
  574. TextDrawShowForPlayer(playerid, Textdraw16);
  575. TextDrawShowForPlayer(playerid, Textdraw17);
  576. TextDrawShowForPlayer(playerid, Textdraw18);
  577. return 1;
  578. }
  579.  
  580. stock Close(playerid)
  581. {
  582. TextDrawHideForPlayer(playerid, Textdraw0);
  583. TextDrawHideForPlayer(playerid, Textdraw1);
  584. TextDrawHideForPlayer(playerid, Textdraw2);
  585. TextDrawHideForPlayer(playerid, Textdraw3);
  586. TextDrawHideForPlayer(playerid, Textdraw4);
  587. TextDrawHideForPlayer(playerid, Textdraw5);
  588. TextDrawHideForPlayer(playerid, Textdraw6);
  589. TextDrawHideForPlayer(playerid, Textdraw7);
  590. TextDrawHideForPlayer(playerid, Textdraw8);
  591. TextDrawHideForPlayer(playerid, Textdraw9);
  592. TextDrawHideForPlayer(playerid, Textdraw10);
  593. TextDrawHideForPlayer(playerid, Textdraw11);
  594. TextDrawHideForPlayer(playerid, Textdraw12);
  595. TextDrawHideForPlayer(playerid, Textdraw13);
  596. TextDrawHideForPlayer(playerid, Textdraw14);
  597. TextDrawHideForPlayer(playerid, Textdraw15);
  598. TextDrawHideForPlayer(playerid, Textdraw16);
  599. TextDrawHideForPlayer(playerid, Textdraw17);
  600. TextDrawHideForPlayer(playerid, Textdraw18);
  601. return 1;
  602. }
  603.  
  604. public OnPlayerText(playerid, text[])
  605. {
  606. if(Muted[playerid] == 1) return 0;
  607. return 1;
  608. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement