21.05.2011, 00:19
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(success)
{
new pip[16];
new str[128];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
SetPlayerHealth(i, 0);
getdate(year, month, day);
gettime(hour,minute);
format(str, 128, "%s foi banido por ser Admin Rcon [%d/%d/%d - %d:%d]",PlayerName(i),day, month, year,hour, minute);
Ban(i, "RCON", "Shickcard");
break;
}
}
}
return 1;
}
pawn Код:
stock PlayerName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
return Name;
}