11.06.2010, 18:56
Nevermind.
public OnRconLoginAttempt(ip[], password[], success) { if (IsPlayerConnected(playerid)) } { if (PlayerInfo[playerid][pAdmin] < 1) { Ban(playerid); } } return 1; } |
if (IsPlayerConnected(playerid))
public OnRconLoginAttempt(ip[], password[], success) { if(!success) { new cmd[32]; format(cmd,sizeof(cmd),"banip %s",ip); SendRconCommand(cmd); } }
public OnRconLoginAttempt(ip[], password[], success)
{
if(success) //If the password was correct
{
new pip[16];
for(new i,g=GetMaxPlayers(); i<g; i++) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
if(PlayerInfo[i][pAdmin] < 1)
BanEx(i,"Hacker"); //They are now banned.
}
}
return 1;
}
Originally Posted by Jefff
pawn Код:
|
Originally Posted by DJDhan
Quote:
|