05.08.2013, 22:55
I got a ban function that does EVERYTHING except sends the client message. Wtf?
pawn Код:
public DynBan(playerid,days,reason[])
{
new IP[16];
GetPlayerIp(playerid, IP, sizeof(IP));
new Query[200];
new BanTime = days * 86400;
new FinalBanTime = gettime() + BanTime;
format(Query,sizeof(Query),"INSERT INTO `bans` (`username`,`ip`,`reason`,`time`) VALUES ('%s','%s','%s','%i')",PlayerName(playerid),IP,reason,FinalBanTime);
mysql_query(Query);
new String[200];
format(String,sizeof(String),"You have been banned for %i days for %s!",days,reason);
SendClientMessage(playerid,COLOR_RED,String);
Kick(playerid);
return 1;
}