05.01.2017, 15:44
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:
plz help me as much as u can
Код:
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;
}


