MysqL ban??
#1

When I ban someone it'll appear in my web page? Please help me to figure out how to do it.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=308878 use this
Reply
#3

pawn Код:
C:\Users\Alex\Desktop\Archivos\NPCTest\Filterscripts\ladmin4v2.pwn(2652) : error 047: array sizes do not match, or destination array is too small
C:\Users\Alex\Desktop\Archivos\NPCTest\Filterscripts\ladmin4v2.pwn(2652) : warning 209: function "SHOBanEx" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
//2652:                 return SHOBanEx(player1, string);
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)