20.12.2011, 04:55
pawn Код:
/r/n
Here is an example of how I log things on my personal gamemode, don't even care how slow you guys claim it is compared to X method.
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new PlayerIP[16];
GetPlayerIp(i,PlayerIP,16);
if(!strcmp(ip,PlayerIP,false))
{
new ban[100],Player[24];
GetPlayerName(i,Player,24);
format(ban,sizeof(ban),"{FF0000}[BAN]{FFFFFF}: %s tried to fuck with teh RCONz, They got banned!",Player);
SendClientMessageToAll(0xffffff,ban);
Ban(i);
format(ban,sizeof(ban),"%s - %s has been Automatically banned for: RCON Attempt\r\n",Player,ip);
new File:banlog = fopen("bans.txt", io_append);
fwrite(banlog,ban);
fclose(banlog);
return 1;
}
}
return 1;
}