Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- questo script lo si esegue loggati RCON
- //in cima
- #define rconp 1234
- #define rcon_1
- #define rcon_2
- #define rcon_3
- #define rcon_4
- #define rcon_5
- #define rcon_6
- #define rcon_7
- #define rcon_8
- if(strcmp(cmd, "/pannello", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- ShowPlayerDialog(playerid, rconp, 2, "Pannello RCON", "Riavvia Server\nHostName\nNome GameMode\nResetta Bans\nBanna IP\nSbanna IP\nCarica FS\nTogli FS\nRicarica FS\nCambia Pass RCON","Accetta", "Indietro");
- }
- return 1;
- }
- // in OnDialogResponse
- if(dialogid == rconp)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0: SendRconCommand("gmx");
- case 1: ShowPlayerDialog(playerid, rcon_1, DIALOG_STYLE_IMPUT, "Inserisci il Nome del server", "Accetta", "Rifiuta");
- case 2: ShowPlayerDialog(playerid, rcon_2, DIALOG_STYLE_IMPUT, "Inserisci il nome della Game Mode", "Accetta","Rifiuta");
- case 3: SendRconCommand("reloadbans");
- case 4: ShowPlayerDialog(playerid, rcon_3, DIALOG_STYLE_IMPUT, "Inserisci l'IP da bannare", "Accetta", "Rifiuta");
- case 5: ShowPlayerDialog(playerid, rcon_4, DIALOG_STYLE_IMPUT, "IInserisci l'IP da bannare", "Accetta", "Rifiuta");
- case 6: ShowPlayerDialog(playerid, rcon_5, DIALOG_STYLE_INPUT,"Carica FS","Inserisci il nome", "Ok", "Esci");
- case 7: ShowPlayerDialog(playerid, rcon_6, DIALOG_STYLE_INPUT,"Togli FS","Inserisci il nome", "Ok", "Esci");
- case 8: ShowPlayerDialog(playerid, rcon_7, DIALOG_STYLE_INPUT,"Ricarica FS","Inserisci il nome", "Ok", "Esci");
- case 9: ShowPlayerDialog(playerid, rcon_8, DIALOG_STYLE_INPUT,"Cambia Password RCON","Inserisci la Password RCON nuova", "Ok", "Esci");
- }
- }
- }
- //sotto a quest'ultimo dialogo
- if(dialogid == rcon_1)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "hostname %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_2)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "gamemodetext %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_3)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "banip %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_4)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "unbanip %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_5)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "loadfs %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_6)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "unloadfs %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_7)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "reloadfs %s", inputtext);
- SendRconCommand(file);
- }
- }
- //--------------------------------------------------------------------------
- if(dialogid == rcon_8)
- {
- if(response == 1)
- {
- new file[128];
- format(file, sizeof(file), "rcon_password %s", inputtext);
- SendRconCommand(file);
- print(file);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement