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","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);
- 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);
- }
- 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);
- }
- 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);
- }
- case 5:
- {
- CountdownT = SetTimerEx("Countdown", 1000, 1, "i", 20);
- }
- 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);
- }
- }
- }
- }
- 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;
- }
- /* ---DAS SCRIPT ENDET------ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement