Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Este sistema es creado por MatrixenXD
- ----------------------------------------------------------
- -¦¦¦¦¦¦----------¦¦¦¦¦¦-¦¦¦¦¦¦¦¦--¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦¦¦¦¦---
- -¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦--¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦¦¦¦¦¦¦-
- -¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦--¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦¦¦¦¦¦¦-
- -¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦---¦¦¦¦¦¦¦¦¦¦¦¦¦¦---¦¦¦¦¦¦--¦¦¦¦¦¦-
- -¦¦¦¦¦¦--¦¦¦¦¦¦--¦¦¦¦¦¦---¦¦¦¦¦¦¦¦¦¦¦¦¦¦---¦¦¦¦¦¦--¦¦¦¦¦¦-
- -¦¦¦¦¦¦--¦¦¦¦¦¦--¦¦¦¦¦¦-----¦¦¦¦¦¦¦¦¦¦-----¦¦¦¦¦¦--¦¦¦¦¦¦-
- -¦¦¦¦¦¦--¦¦¦¦¦¦--¦¦¦¦¦¦---¦¦¦¦¦¦¦¦¦¦¦¦¦¦---¦¦¦¦¦¦--¦¦¦¦¦¦-
- -¦¦¦¦¦¦----------¦¦¦¦¦¦---¦¦¦¦¦¦¦¦¦¦¦¦¦¦---¦¦¦¦¦¦--¦¦¦¦¦¦-
- -¦¦¦¦¦¦----------¦¦¦¦¦¦-¦¦¦¦¦¦¦¦--¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦¦¦¦¦¦¦-
- -¦¦¦¦¦¦----------¦¦¦¦¦¦-¦¦¦¦¦¦¦¦--¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦¦¦¦¦¦¦-
- -¦¦¦¦¦¦----------¦¦¦¦¦¦-¦¦¦¦¦¦¦¦--¦¦¦¦¦¦¦¦-¦¦¦¦¦¦¦¦¦¦¦¦---
- ----------------------------------------------------------
- Este es mi primer FS así que no robar creditos :V
- */
- //Define FS//
- #define FILTERSCRIPT
- #define SegundaRcon "cambiame"
- #define DIALOGO_RCON2 1 //Cambiar si es que lo pondrás en tu GM
- #define Rojo 0xFF0000AA
- //Include//
- #include <a_samp>
- //Variables//
- new Rcon2Attemp[MAX_PLAYERS];
- new RconAttemp[MAX_PLAYERS];
- //Callbacks//
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Sistema de doble Rcon by MatrixenXD");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Rcon2Attemp[playerid] = 0;
- RconAttemp[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- Rcon2Attemp[playerid] = 0;
- RconAttemp[playerid] = 0;
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- for(new pid = 0; pid < MAX_PLAYERS; pid++)
- {
- if(RconAttemp[pid] == 0)
- {
- SendClientMessage(pid, Rojo, "Error: La contraseña es incorrecta, si sigues así serás baneado");
- SendClientMessage(pid, Rojo, "Advertencia 1/3");
- RconAttemp[pid] = 1;
- }
- if(RconAttemp[pid] == 1)
- {
- SendClientMessage(pid, Rojo, "Error: La contraseña es incorrecta, si sigues así serás baneado");
- SendClientMessage(pid, Rojo, "Advertencia 2/3");
- RconAttemp[pid] = 2;
- }
- if(RconAttemp[pid] == 2)
- {
- SendClientMessage(pid, Rojo, "Serás baneado por exedidos fallos en el inicio de Rcon");
- SendClientMessage(pid, Rojo, "Advertencias 3/3");
- Ban(pid);
- }
- }
- }
- else
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new IPjugador[16];
- GetPlayerIp(i, IPjugador, 16);
- if(!strcmp(IPjugador, ip, true))
- {
- ShowPlayerDialog(i, DIALOGO_RCON2, DIALOG_STYLE_INPUT,"Sistema de RCON2", "Ingrese la RCON2:", "Aceptar", "Salir");
- }
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOGO_RCON2)
- {
- if (response)
- {
- if(!strcmp(SegundaRcon, inputtext) && !(!strlen(inputtext)))
- {
- SendClientMessage(playerid, Rojo, "Info: Has iniciado RCON2");
- }
- else
- {
- if(Rcon2Attemp[playerid] == 3)
- {
- SendClientMessage(playerid, Rojo, "Has sido automáticamente baneado! Razón: Exedidos fallos de ingreso de la RCON2");
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Ban","{FFFFFF} Has sido baneado del servidor \n\n{FF0000}Razón: {FFFFFF}Exedidos fallos de ingreso de la RCON2", "Aceptar", "") ;
- Ban(playerid);
- }
- Rcon2Attemp[playerid]++;
- new dialogo2[200];
- SendClientMessage(playerid, Rojo, "Error: contraseña Rcon2 invalida!");
- format(dialogo2, sizeof(dialogo2), "¡Contraseña incorrecta!\n\nIngresa nuevamente la Rcon2\n\nIntentos: %d/3", Rcon2Attemp[playerid]);
- ShowPlayerDialog(playerid, DIALOGO_RCON2, DIALOG_STYLE_INPUT, "Rcon2 Ingreso",dialogo2, "Aceptar","");
- }
- }
- else
- {
- SendClientMessage(playerid, Rojo, "Error en el sistema de segunda rcon, serás expulsado.");
- return Kick(playerid);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement