Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* wenn ihr euer server mit diesen Script startet wird eine datei in Scriptfiles ordner erstellt
- wo ihr das passwort eandern koennt
- ==Copyright==
- <<<mskamilor>>>
- */
- #include a_samp
- #define DIALOG_RCON_ATTEMPT 24029
- #define FILE_RCON_PASSWORD "RconAttempt.ini"
- public OnFilterScriptInit()
- {
- if(!fexist(FILE_RCON_PASSWORD))
- {
- new File:xqz=fopen(FILE_RCON_PASSWORD,io_write);
- fwrite(xqz,"bitte schreibe das passwort hier rein ");
- fclose(xqz);
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(success)
- {
- new pip[16];
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true))
- {
- ShowPlayerDialog(i,DIALOG_RCON_ATTEMPT,DIALOG_STYLE_INPUT,"Rcon","du bist als Rcon Admin eingelogt, jedoch muss du ein zweites passwort eingeben\n wenn du es nicht machst wirst du gebannt!\n\n{FFFFFF}Zweites Rcon passwort:","Einlogen","");
- break;
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_RCON_ATTEMPT && response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_RCON_ATTEMPT,DIALOG_STYLE_INPUT,"Rcon","du bist als Rcon Admin eingelogt, jedoch muss du ein zweites passwort eingeben\n wenn du es nicht machst wirst du gebannt!\n\n{FFFFFF}Zweites Rcon passwort:","Einlogen","");
- new File:ohp=fopen(FILE_RCON_PASSWORD,io_read);
- new string[24];
- fread(ohp,string);
- if(strcmp(inputtext,string,true) != 0) Ban(playerid); else SendClientMessage(playerid,-1,"das zweite rcon passwort ist richtig!!");
- fclose(ohp);
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment