Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Includes
- #include <a_samp>
- // Defines
- #define MSG DIALOG_STYLE_MSGBOX
- #define INPUT DIALOG_STYLE_INPUT
- #define LIST DIALOG_STYLE_LIST
- // Colors
- #define ROT 0xFF0000FF
- // Dialogs
- #define DIALOG_1 955
- #define DIALOG_2 966
- #define DIALOG_CP 977
- // news
- new string[126];
- new CountdownT;
- // Forward
- forward Countdown();
- /* ---DAS SCRIPT BEGINNT------ */
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Easy Rcon Admin Include by G-Mac_x3");
- print("--------------------------------------\n");
- return 0;
- }
- public OnFilterScriptExit()
- {
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/rcon menu", cmdtext, true) == 0)
- {
- if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,ROT,"Du bist nicht als Rcon Admin eingeloggt!");
- {
- ShowPlayerDialog(playerid,DIALOG_1,LIST,"Rcon Admin Menu","\n Rcon Kick \n Rcon Ban \n Rcon Filterscript laden \n Rcon Filterscript unladen \n Rcon GMX \n Rcon Say \n Rcon Hostnamechange \n Rcon Gamemodetextchange \n Rcon Mapnamechange \n Rcon weburlchange \n Rcon changemode","Schließen","Schließen");
- return 0;
- }
- }
- if(strcmp("/copyright", cmdtext, true) == 0)
- {
- ShowPlayerDialog(playerid,DIALOG_CP,MSG,"Easy Rcon Admin Copyright / Version","Copyright bei G-Mac_x3 \n Version 0.1 \n Lizenz Bestimmungen: \n Du Darfst das Script verwenden, Nutze und verändern. Du darf NICHT das Script als deins Augeben"," "," ");
- }
- return 0;
- }
- public OnRconCommand(cmd[])
- {
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case 955:
- {
- switch(listitem)
- {
- case 1:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Kick","Gebe hier die ID des Users ein den du Kicken willst","Schließen","OK");
- format(string,sizeof(string), "kick %d",inputtext);
- SetPVarInt(playerid,"RconLog",1);
- log(playerid);
- SendRconCommand(string);
- }
- case 2:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Ban","Gebe hier die ID des Users ein den du Bannen willst","Schließen","OK");
- format(string,sizeof(string), "ban %d",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",2);
- log(playerid);
- }
- case 3:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Load Filterscript","Gebe hier den Name des Filterscripts ein, das du laden willst","Schließen","OK");
- format(string,sizeof(string), "loadfs %d",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",3);
- log(playerid);
- }
- case 4:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon UnLoad Filterscript","Gebe hier den Name des Filterscripts ein, das du unloaden willst","Schließen","OK");
- format(string,sizeof(string), "unloadfs %d",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",4);
- log(playerid);
- }
- case 5:
- {
- CountdownT = SetTimerEx("Countdown", 1000, 1, "i", 20);
- SetPVarInt(playerid,"RconLog",5);
- log(playerid);
- }
- case 6:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Say","Schreibe hier rein, was du sagen willst","Schließen","OK");
- format(string,sizeof(string), "say %s",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",6);
- log(playerid);
- }
- case 7:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Hostname","Schreibe hier rein in welchen Namen du den Hostnamen ändern willst.","Schließen","OK");
- format(string,sizeof(string), "hostname %s",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",7);
- log(playerid);
- }
- case 8:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Gamemodetext","Schreibe hier rein in welchen Namen du den Gamemodetext ändern willst.","Schließen","OK");
- format(string,sizeof(string), "gamemodetext %s",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",8);
- log(playerid);
- }
- case 9:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Mapname","Schreibe hier rein in welchen Namen du den Mapnamen ändern willst.","Schließen","OK");
- format(string,sizeof(string), "mapname %s",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",9);
- log(playerid);
- }
- case 10:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Weburl","Schreibe hier die URL deines Forums/deiner Homepage rein.","Schließen","OK");
- format(string,sizeof(string), "weburl %s",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",10);
- log(playerid);
- }
- case 11:
- {
- ShowPlayerDialog(playerid,DIALOG_2,INPUT,"Rcon Changegamemode","Schreibe hier den Names des neuen Gamemodes rein.","Schließen","OK");
- format(string,sizeof(string), "changemode %s",inputtext);
- SendRconCommand(string);
- SetPVarInt(playerid,"RconLog",11);
- log(playerid);
- }
- }
- }
- }
- return 0;
- }
- new CountSek = -1;
- public Countdown()
- {
- if(CountSek == -1)
- {
- return 1;
- }
- if(CountSek == 0)
- {
- GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~~h~~h~GMX NOW", 3000, 3);
- KillTimer(CountdownT);
- CountSek = -1;
- SendRconCommand("GMX");
- }
- else
- {
- new cstr[50];
- format(cstr, sizeof(cstr),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~%i", CountSek);
- GameTextForAll(cstr, 2000, 3);
- CountSek--;
- }
- return 0;
- }
- forward log(playerid);
- public log(playerid)
- {
- new befehl[126];
- switch(GetPVarInt(playerid,"RconLog"))
- {
- case 1:{befehl="Rcon Kick";}
- case 2:{befehl="Rcon Ban";}
- case 3:{befehl="Rcon Load Filterscript";}
- case 4:{befehl="Rcon UnLoad Filterscript";}
- case 5:{befehl="Rcon GMX";}
- case 6:{befehl="Rcon Say";}
- case 7:{befehl="Rcon Hostname";}
- case 8:{befehl="Rcon Gamemodetext";}
- case 9:{befehl="Rcon Mapname";}
- case 10:{befehl="Rcon Weburl";}
- case 11:{befehl="Rcon Changegamemode";}
- }
- new entry[256];
- GetPlayerName(playerid,string,sizeof(string));
- format(entry, sizeof(entry), " Person: %s Befehl: %s \r\n",string,befehl);
- new File:hFile;
- hFile = fopen("rconlog.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- /* ---DAS SCRIPT ENDET------ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement