Rcon system help
#1

mm hey there I have made an rcon system to my server but it isn working good when he log in as rcon he should put second rcon pass but if I put any 2 rcon pass it make him login so he is supposed to be blocked if the second rcon pass here is the code:
Код:
public OnRconLoginAttempt(ip[],password[],success)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnectedEx(i))
        {
			new pip[16];
   			GetPlayerIp(i,pip,sizeof(pip));
    		if(!strcmp(ip,pip,true))
    		{
				if(!success)
        	    {
	    	    	new string[128];
	    	    	format(string,sizeof(string),"SERVER: {FFFFFF}%s tried to login as RCON with the password %s",PlayerName(i),password);
	    	    	SendMessageToAdmins(RED,string);
        	    }
				if(success)
    			{
    			    ShowPlayerDialog(i,SVPASS,DIALOG_STYLE_PASSWORD,"{FF0000}Remote Console","{FFFFFF}Fox Gaming RolePlay/FreeRoam Remote Console\n\nPlease Enter Remote Console Password","Enter","");
			    }
    		}
		}
	 }
    return 1;
}
that ondialogresponce:
if(dialogid==SVPASS)
	{
		if(!response)
		{
			Kicked[playerid]=1;
			SendClientMessage(playerid,RED,"SERVER: {FFFFFF}Access Denied");
		}
		if(response)
		{
			if(strcmp(inputtext,"78836784",true)==0)
			{
        		PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
     			SendClientMessage(playerid,RED,"SERVER: {FFFFFF}Authorized Access");
     			if(AdminLevel[playerid]!=4)
     			{
				 	AdminLevel[playerid]=4;
     				SendClientMessage(playerid,-1,"You have been set has Owner,automatically");
				}
			}
  			if(strcmp(inputtext,"78836784",true) !=0)
  			{
     			SendClientMessage(playerid,RED,"SERVER: {FFFFFF}Access Denied");
			 	ShowPlayerDialog(playerid,SVPASS,DIALOG_STYLE_PASSWORD,"{FF0000}Remote Console","{FFFFFF}Fox Gaming RolePlay/FreeRoam Remote Console\n\nPlease Enter Remote Console Password","Enter","");
			}
		}
		return 1;
	}
plz help me as much as u can
Reply


Messages In This Thread
Rcon system help - by silverms - 05.01.2017, 15:44
Re: Rcon system help - by Jochemd - 06.01.2017, 15:13
Re: Rcon system help - by iLearner - 06.01.2017, 15:19
Re: Rcon system help - by Jochemd - 06.01.2017, 15:34
Re: Rcon system help - by Lordzy - 06.01.2017, 16:00
Re: Rcon system help - by silverms - 07.01.2017, 12:44
Re: Rcon system help - by Lordzy - 07.01.2017, 13:30
Re: Rcon system help - by Yaa - 07.01.2017, 13:44
Re: Rcon system help - by silverms - 08.01.2017, 06:49
Re: Rcon system help - by Sew_Sumi - 08.01.2017, 07:05

Forum Jump:


Users browsing this thread: 3 Guest(s)