MysqL ban??
#4

use this:

pawn Код:
public SHOBanEx(playerid, reason[384])
{
new shoquery[384];
GetPlayerName(playerid, shoname, sizeof(shoname));
GetPlayerIp(playerid, shoIP, sizeof(shoIP));
gettime(shoHour, shoMinute, shoSecond);
getdate(shoYear, shoMonth, shoDay);
format(shostring, sizeof(shostring), "%d:%d/%d/%d/%d",shoHour,shoMinute,shoDay,shoMonth,shoYear);
format(shoquery, sizeof(shoquery), "UPDATE `%s`.`SAMP_USERLOG` SET `banned` = '0' WHERE `SAMP_USERLOG`.`playername` = '%s' LIMIT 1", SQL_DB, shoname);
mysql_query(shoquery);
format(shoquery, sizeof(shoquery), "INSERT INTO `%s`.`SAMP` (`playername` ,`IP` ,`reason` ,`admin` ,`start` ,`expires`) VALUES ('%s', '%s', '%s', 'In-Game Ban', '%s', '0')", SQL_DB, shoname, shoIP, reason, shostring);
mysql_query(shoquery);
SendClientMessage(playerid, COLOR_SHBANDENY, "You have been banned from the server!");
Kick(playerid);
return 1;
}
Reply


Messages In This Thread
MysqL ban?? - by Super_Panda - 21.01.2012, 17:59
Re: MysqL ban?? - by rati555 - 21.01.2012, 18:00
Respuesta: MysqL ban?? - by Super_Panda - 21.01.2012, 19:09
Re: MysqL ban?? - by FuTuяe - 21.01.2012, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)