11.01.2011, 03:52
here's an example of what it may look like
pawn Код:
OnPlayerConnect(playerid)
{
new IP[20];
GetPlayerIp(playerid,IP,sizeof(IP));
SetPVarString(playerid,"ip",IP);
}
OnPlayerBugged(playerid)
{
SetPVarInt(playerid,"bugban",1);
new IP[24];
GetPlayerIp(playerid,IP,sizeof(IP));
format(IP,sizeof(IP),"banip %s",IP);
SendRconCommand(IP);
}
OnPlayerDisconnect(playerid)
{
if(GetPVarInt(playerid,"bugban") == 1)
{
new string[24];
GetPVarString(playerid,"ip",string,sizeof(string));
format(string,sizeof(string),"unbanip %s",string);
SendRconCommand(string);
SendRconCommand("reloadbans");
}
}