Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.97 KB | None | 0 0
  1. // === [ INC. ] === //
  2.  
  3. #include <a_samp>
  4. #include <sscanf2>
  5. #include <ZCMD>
  6.  
  7. // === [ DEF. ] === //
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. // === [ ESC. ] === //
  12.  
  13. public OnFilterScriptInit()
  14. {
  15.     print("Admin Panel v1.0 | by Edward");
  16.     print("FB Profile: Tonson Vasquez | Enjoy!");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     return 1;
  23. }
  24.  
  25. #else
  26.  
  27. main()
  28. {
  29.     print("-------------");
  30. }
  31.  
  32. #endif
  33.  
  34. public OnGameModeInit()
  35. {
  36.     return 1;
  37. }
  38.  
  39. public OnGameModeExit()
  40. {
  41.     return 1;
  42. }
  43.  
  44. public OnPlayerRequestClass(playerid, classid)
  45. {
  46.     return 1;
  47. }
  48.  
  49. public OnPlayerConnect(playerid)
  50. {
  51.     return 1;
  52. }
  53.  
  54. public OnPlayerDisconnect(playerid, reason)
  55. {
  56.     return 1;
  57. }
  58.  
  59. public OnPlayerSpawn(playerid)
  60. {
  61.     return 1;
  62. }
  63. //ZBOG ERRORA JE OVDE STAVLJENO://
  64. #define ZUTA            "{F3FF02}"
  65. #define ORANGE          "{FFAF00}"
  66. #define SPLAVA          "{00C0FF}"
  67. #define BELA            "{FFFFFF}"
  68. #define ZELENA          "{6EF83C}"
  69. #define CRVENA          "{F81414}"
  70. #pragma tabsize 0
  71. //
  72. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  73. {
  74.     if(dialogid == 1000)
  75.     {
  76.         if(response)
  77.         {
  78.             if(listitem == 0)
  79.             {
  80.                 ShowPlayerDialog(playerid,1780,DIALOG_STYLE_INPUT,""ZELENA"SERVER IME","Postavite novo ime servera","Postavi","Izadji");
  81.             }
  82.             if(listitem == 1)
  83.             {
  84.                 ShowPlayerDialog(playerid,1781,DIALOG_STYLE_INPUT,""ZELENA"IME MAPE","Postavite novo ime mape","Postavi","Izadji");
  85.             }
  86.             if(listitem == 2)
  87.             {
  88.                 ShowPlayerDialog(playerid,1782,DIALOG_STYLE_INPUT,""ZELENA"RCON Lozinka","Postavite novu RCON Lozinku","Postavi","Izadji");
  89.             }
  90.             if(listitem == 3)
  91.             {
  92.                 GameModeExit();
  93.             }
  94.             if(listitem == 4)
  95.             {
  96.                 ShowPlayerDialog(playerid,1783,DIALOG_STYLE_INPUT,""ZELENA"SERVER SAJT","Postavite novo ime sajta","Postavi","Izadji");
  97.             }
  98.             if(listitem == 5)
  99.             {
  100.                 ShowPlayerDialog(playerid,1784,DIALOG_STYLE_INPUT,""ZELENA"SERVER IME","Postavite novu Server Lozinku","Postavi","Izadji");
  101.             }
  102.         }
  103.         return 1;
  104. }
  105. ////////////////////////////////////////////////////////////////////////////////
  106. if(dialogid == 1780)
  107. {
  108.     new string[128];
  109.     if(response)
  110.     {
  111.         format(string,sizeof(string),"hostname %s",inputtext);
  112.         SendRconCommand(string);
  113.         format(string,sizeof(string),""CRVENA"[IME:SERVERA]: "ZELENA"Promenili ste 'Ime Servera', ono glasi: "BELA"%s",inputtext);
  114.         SendClientMessage(playerid, -1, string);
  115.     }
  116.     return 1;
  117. }
  118. ////////////////////////////////////////////////////////////////////////////////
  119. if(dialogid == 1781)
  120. {
  121.     new string[128];
  122.     if(response)
  123.     {
  124.         format(string,sizeof(string),"mapname %s",inputtext);
  125.         SendRconCommand(string);
  126.         format(string,sizeof(string),""CRVENA"[IME:SERVERA]: "ZELENA"Promenili ste 'Server Mapu', ona glasi: "BELA"%s",inputtext);
  127.         SendClientMessage(playerid, -1, string);
  128.     }
  129.     return 1;
  130. }
  131. ////////////////////////////////////////////////////////////////////////////////
  132. if(dialogid == 1782)
  133. {
  134.     new string[128];
  135.     if(response)
  136.     {
  137.         format(string,sizeof(string),"rcon_password %s",inputtext);
  138.         SendRconCommand(string);
  139.         format(string,sizeof(string),""CRVENA"[IME:SERVERA]: "ZELENA"Promenili ste 'RCON Sifru', ona glasi: "BELA"%s",inputtext);
  140.         SendClientMessage(playerid, -1, string);
  141.     }
  142.     return 1;
  143. }
  144. ////////////////////////////////////////////////////////////////////////////////
  145. if(dialogid == 1783)
  146. {
  147.     new string[128];
  148.     if(response)
  149.     {
  150.         format(string,sizeof(string),"weburl %s",inputtext);
  151.         SendRconCommand(string);
  152.         format(string,sizeof(string),""CRVENA"[IME:SERVERA]: "ZELENA"Promenili ste 'Sajt Servera', on glasi: "BELA"%s",inputtext);
  153.         SendClientMessage(playerid, -1, string);
  154.     }
  155.     return 1;
  156. }
  157. ////////////////////////////////////////////////////////////////////////////////
  158. if(dialogid == 1784)
  159. {
  160.     new string[128];
  161.     if(response)
  162.     {
  163.             format(string,sizeof(string),"password %s",inputtext);
  164.             SendRconCommand(string);
  165.             format(string,sizeof(string),""CRVENA"[IME:SERVERA]: "ZELENA"Promenili ste 'Server Sifru', ona glasi: "BELA"%s",inputtext);
  166.             SendClientMessage(playerid, -1, string);
  167.         }
  168.     }
  169.     return 1;
  170. }
  171. CMD:apanel(playerid, params[])
  172. {
  173.     if(IsPlayerAdmin(playerid))
  174.     {
  175.         ShowPlayerDialog(playerid,1000,DIALOG_STYLE_LIST,""ZELENA"Admin Panel "BELA"| "CRVENA"by Vasic",""SPLAVA"Ime Servera\n"ZUTA"Ime Mape\n"ZELENA"RCON Lozinka\n"BELA"Restartuj Server\n"ORANGE"Sajt Servera\n"SPLAVA"Server Sifra","Izaberi","Odustani");
  176.     }
  177.     else
  178.     {
  179.         SendClientMessage(playerid,-1,"Nisi Autorizovan!");
  180.     }
  181.     return 1;
  182. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement