12.08.2011, 15:16
Код:
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"); } }