Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- [=========================================================================================]
- Admin Panel by Volter
- [=========================================================================================]
- */
- #include <a_samp> //Include
- #pragma tabsize 0 // warning 217: loose indentation Fixano sa Ovom Linijom ( Mozes obrisati ).
- #define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
- #define Message SendClientMessage // Definiste " Message " umesto SendClientMessage.
- #define COLOR_RED 0xFF0000FF // Crvena Boja Def.
- #define COLOR_GREEN 0x00FF00FF // Zelena.
- #define COLOR_WHITE 0xFFFFFFFF // Bela.
- #define COLOR_USAGE 0x5D7E8D77 // Definicija boje za Upotrebu.
- // Sta ce sve trebati :
- new ServerName[MAX_PLAYERS][128];
- new ServerPassword[MAX_PLAYERS][128];
- new BanIP[MAX_PLAYERS][128];
- new Say[MAX_PLAYERS][128];
- new Gamemodetext[MAX_PLAYERS][128];
- new Language[MAX_PLAYERS][128];
- new Custom[MAX_PLAYERS][128];
- new WantName[MAX_PLAYERS];
- new WantPass[MAX_PLAYERS];
- new WantGMX[MAX_PLAYERS];
- new WantSay[MAX_PLAYERS];
- new WantBanIP[MAX_PLAYERS];
- new WantGMText[MAX_PLAYERS];
- new WantLang[MAX_PLAYERS];
- new WantUnBanIP[MAX_PLAYERS];
- new WantCustom[MAX_PLAYERS];
- // Kraj.
- public OnFilterScriptInit()
- {
- print("\n------------------------------------------");
- print(" Control Panel Za Ownera/Vlasnika ");
- print(" By: Volter ");
- print("--------------------------------------------\n");
- return 1;
- }
- // Publici
- public OnPlayerConnect(playerid)
- {
- WantName[playerid] = 0;
- WantPass[playerid] = 0;
- WantGMX[playerid] = 0;
- WantSay[playerid] = 0;
- WantUnBanIP[playerid] = 0;
- WantBanIP[playerid] = 0;
- WantGMText[playerid] = 0;
- WantLang[playerid] = 0;
- WantCustom[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- WantName[playerid] = 0;
- WantPass[playerid] = 0;
- WantGMX[playerid] = 0;
- WantSay[playerid] = 0;
- WantUnBanIP[playerid] = 0;
- WantBanIP[playerid] = 0;
- WantGMText[playerid] = 0;
- WantLang[playerid] = 0;
- WantCustom[playerid] = 0;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 267)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: Ime Servera Promenjano u:{ff0000} %s.", ServerName[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 268)
- {
- if(response)
- {
- if(!strcmp(ServerPassword[playerid],"0",true))
- {
- Message(playerid, COLOR_WHITE, "[C-P]: Sifra Servera Sklonjena.");
- return 1;
- }
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: Sifra Servera je Postavljena/Promenjena u:{ff0000} %s.", ServerPassword[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 270)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: BanIP{ff0000} %s{ffffff} je banovan ( IP ).", BanIP[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 271)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: UnBanIP{ff0000} %s{ffffff} je unbanovan ( IP ).", BanIP[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 272)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[OOC]:{ff0000} %s.", Say[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 273)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: GameModeText je postavljen na:{ff0000} %s.", Gamemodetext[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 274)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: Jezik GameModa je postavljen na:{ff0000} %s.", Language[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 279)
- {
- if(response)
- {
- new googool[144];
- format(googool, sizeof(googool), "[C-P]: Koristio si{ff0000} %s{ffffff} sa prilagodjenim odeljkom u Panelu.", Custom[playerid]);
- Message(playerid, COLOR_WHITE, googool);
- }
- }
- if(dialogid == 312)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, 313,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi novo ime servera ispod:", "Done", "Back");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, 314,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi novu Sifru servera ispod:", "Done", "Back");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, 315,DIALOG_STYLE_MSGBOX, "Panel", "[C-P]: Ako si siguran klikni YES, server ce se Restartovati za 2 sec.", "YES", "NO");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, 316,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi IPAddressu koju zelis da UnBan-ujes ispod:", "Done", "Back");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, 317,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi IpAddressu koju zelis banovati ispod:", "Done", "Back");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, 318,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi Bilo Sta sto zelis da kazes ispod:", "Done", "Back");
- }
- if(listitem == 6)
- {
- ShowPlayerDialog(playerid, 319,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi sta zelis da bude u GameText-u ispod:", "Done", "Back");
- }
- if(listitem == 7)
- {
- ShowPlayerDialog(playerid, 320,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi bilo koji Jezik koji ce stajati u Language ispod:", "Done", "Back");
- }
- if(listitem == 8)
- {
- ShowPlayerDialog(playerid, 321,DIALOG_STYLE_INPUT, "Panel", "[C-P]: Unesi Bilo koji RCON ispod:", "Done", "Back");
- }
- }
- }
- if(dialogid == 313)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 313,DIALOG_STYLE_INPUT, "Panel", "{FF0000}Molim te, ispuni ovo.\n{A9C4E4}[C-P]: Novo ime servera ukucaj ispod:", "Done", "Back");
- return 1;
- }
- WantName[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"hostname %s", inputtext);
- SendRconCommand(string);
- strcpy(ServerName[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Uspesno si{FF0000} promenio{A9C4E4} ime servera u:\n{FF0000} %s{A9C4E4}.", inputtext);
- ShowPlayerDialog(playerid, 267, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantName[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 314)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 314,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, ispuni ovo. (Da sklonis Sifru, kucaj 0)\n{A9C4E4}[C-P]: Ukucaj novu sifru servera ispod:", "Done", "Back");
- return 1;
- }
- if(!strcmp(inputtext,"0",true))
- {
- new DG[1024];
- format(DG, sizeof(DG), "[C-P]: Uspesno si{FF0000} uklonio{A9C4E4} sifru servera.", inputtext);
- ShowPlayerDialog(playerid, 268, DIALOG_STYLE_MSGBOX,"Panel", DG,"Done", "");
- new pass[128];
- format(pass,sizeof(pass),"password %s", inputtext);
- SendRconCommand(pass);
- strcpy(ServerPassword[playerid],inputtext,128);
- return 1;
- }
- WantPass[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"password %s", inputtext);
- SendRconCommand(string);
- strcpy(ServerPassword[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Uspesno si{FF0000} promenio{A9C4E4} sifru servera na:\n{FF0000} %s{A9C4E4}.", inputtext);
- ShowPlayerDialog(playerid, 268, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantPass[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 315)
- {
- if(response)
- {
- WantGMX[playerid] = 1;
- SetTimer("fss",2000,0);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Server ce se Restartovati za 2 sekunde.");
- ShowPlayerDialog(playerid, 269, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantGMX[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 316)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 317,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, popuni ovo.\n{A9C4E4}[C-P]: Unesi IpAddressu koju zelis da UnBanujes ispod :", "Done", "Back");
- return 1;
- }
- WantUnBanIP[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"unbanip %s", inputtext);
- SendRconCommand(string);
- strcpy(BanIP[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: IpAddressa %s je UnBanovana.", inputtext);
- ShowPlayerDialog(playerid, 271, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantUnBanIP[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 317)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 317,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, popuni ovo.\n{A9C4E4}[C-P]: Unesi IPAddressu koju zelis da Banujes Ispod:", "Done", "Back");
- return 1;
- }
- WantBanIP[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"banip %s", inputtext);
- SendRconCommand(string);
- strcpy(BanIP[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: IpAddressa %s je banovana.", inputtext);
- ShowPlayerDialog(playerid, 270, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantBanIP[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 318)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 318,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, popuni ovo.\n{A9C4E4}[C-P]: Unesi sta zelis da kazes Ispod:", "Done", "Back");
- return 1;
- }
- WantSay[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"say %s", inputtext);
- SendRconCommand(string);
- strcpy(Say[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Uspesno si {FF0000}rekao{A9C4E4}:\n{FF0000} %s{A9C4E4}.", inputtext);
- ShowPlayerDialog(playerid, 272, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantSay[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 319)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 319,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, popuni ovo.\n{A9C4E4}[C-P]: Unesi sta zelis da postavis za GameModeText ispod:", "Done", "Back");
- return 1;
- }
- WantGMText[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"gamemodetext %s", inputtext);
- SendRconCommand(string);
- strcpy(Gamemodetext[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Uspesno si{FF0000} promenio{A9C4E4} GameModeText u:\n{FF0000} %s{A9C4E4}.", inputtext);
- ShowPlayerDialog(playerid, 273, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantGMText[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 320)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 320,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, popuni ovo.\n{A9C4E4}[C-P]: Unesi sta zelis da postavis u GameModeLanguage ispod:", "Done", "Back");
- return 1;
- }
- WantLang[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"language %s", inputtext);
- SendRconCommand(string);
- strcpy(Language[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Uspesno si{FF0000} promenio{A9C4E4} GameModeLanguage u:\n{FF0000} %s{A9C4E4}.", inputtext);
- ShowPlayerDialog(playerid, 274, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantLang[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- if(dialogid == 321)
- {
- if(response)
- {
- new length = strlen(inputtext);
- if(length==0)
- {
- ShowPlayerDialog(playerid, 321,DIALOG_STYLE_INPUT, "Panel", "{FF0000}[C-P]: Molim te, popuni ovo.\n{A9C4E4}[C-P]: Unesi sta zelis da bude RCON ispod:", "Done", "Back");
- return 1;
- }
- WantCustom[playerid] = 1;
- new string[128];
- format(string,sizeof(string),"%s", inputtext);
- SendRconCommand(string);
- strcpy(Custom[playerid],inputtext,128);
- new Dialog[1024];
- format(Dialog, sizeof(Dialog), "[C-P]: Uspesno si{FF0000} iskoristio{A9C4E4}:\n{FF0000} %s{A9C4E4}.", inputtext);
- ShowPlayerDialog(playerid, 279, DIALOG_STYLE_MSGBOX,"Panel", Dialog,"Done", "");
- WantCustom[playerid] = 0;
- }
- else
- {
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/panel", true) == 0)
- {
- // Ovde unesti sta vec zelis, da mora biti Admin za komandu itd.... Ja necu, napravio sam ovo da vi Radite Dalje na Komandi.
- new panel[1024];
- format(panel,sizeof(panel),"[C-P]: ImeServera. \t\n[C-P]: Sifra Servera. \t\n[C-P]: Restart Servera. \t\n[C-P]: UnBanIP Igraca. \t\n[C-P]: BanIP Igraca. \t\n[C-P]: Reci Nesto( Svima ). \t\n[C-P]: GameModeText. \t\n[C-P]: GameModeLanguage. \t\n[C-P]: Prilagodjeno.");
- ShowPlayerDialog(playerid,312,DIALOG_STYLE_LIST,"Panel",panel,"Select","Cancel");
- return 1;
- }
- return 1;
- }
- forward fss();
- public fss()
- {
- new string[128];
- format(string,sizeof(string),"gmx");
- SendRconCommand(string);
- }
Advertisement
Add Comment
Please, Sign In to add comment