26.02.2015, 15:39
Hello when i add the code to CheckBan Mysql i get this Problem
This is the code
Fast help mee
PHP код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 9988 bytes
Code size: 490368 bytes
Data size: 3181236 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4414 cells (17656 bytes)
Total requirements: 3697976 bytes
PHP код:
stock CheckBan(playerid)
{
new Query[500],playerIP[16],timeBanned[256],largestringtwo[256],adminName[24],bannedName[24],reasonBanned[128];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
format(Query, sizeof(Query), "SELECT * FROM `banlog` WHERE ( `Name` = '%s' OR `pIPBanned` = '%s' ) AND `pAccountLock` = '1' LIMIT 1",PlayerName(playerid),playerIP);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
while(mysql_fetch_row(Query))
{
mysql_fetch_field_row(reasonBanned, "pBannedReason");
mysql_fetch_field_row(adminName, "pBannedBy");
mysql_fetch_field_row(timeBanned, "pTime");
mysql_fetch_field_row(playerIP, "pIPBanned");
mysql_fetch_field_row(bannedName, "Name");
}
format(largestringtwo, sizeof(largestringtwo), "You are currently banned from this server. \r\nUser: %s \r\nIP: %s \r\nTime: %s \r\nAdmin: %s\r\nReason: %s", bannedName, playerIP, timeBanned, adminName, reasonBanned);
ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "You are banned from this server", largestringtwo, "Leave", "");
Kick(playerid);
printf("Username %s || IP %s is banned!",PlayerName(playerid),playerIP);
}
return 1;
}