18.03.2014, 14:30
or alternatively you could use something like that (just a rough draft, I fastly created for you)
that will ban anyone except "EnterYourNameHere", so you could still login
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
new playerid = -1, cip[20];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerIp(i, cip, sizeof(cip));
if(!strcmp(ip, cip, true))
{
playerid = i;
break;
}
}
}
if(playerid != -1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name, "EnterYourNameHere", true) != 0)
{
Ban(playerid);
}
}
return 1;
}

