25.01.2014, 22:12
If string is null is same, so add this.
Код:
public OnPlayerConnect(playerid) { new name[24],ip[16]; GetPlayerIp(playerid,ip,sizeof ip); GetPlayerName(playerid,name,sizeof name); for(new id; id < 24; id++) { if(strlen(TempBans[id][BannedName]) > 0 && !strcmp(name,TempBans[id][BannedName])) { // ban type is name SendClientMessage(playerid,COLOR_RED,"Your ban has not expired!"); SetTimerEx("KickPlayer",1000,0,"i",playerid); return 1; } if(strlen(TempBans[id][BannedIP]) > 0 && !strcmp(ip,TempBans[id][BannedIP])) { // ban type is ip ! SendClientMessage(playerid,COLOR_RED,"Your ban has not expired!"); SetTimerEx("KickPlayer",1000,0,"i",playerid); return 1; } } return 1; }