27.02.2017, 16:25
Today check the MySQL log and saw this: http://imgur.com/QIeoZke
What even means? I mean yes, lost conection , but why?
Actual query:
The call back:
What even means? I mean yes, lost conection , but why?
Actual query:
PHP код:
mysql_format(g_SQL, query, sizeof(query),"SELECT * FROM `bans` WHERE (`BanName` = '%e' OR `IP` = '%e') LIMIT 1",APlayerData[playerid][PlayerName],IP);
mysql_tquery(g_SQL, query, "BanCheck","is",playerid,IP);
PHP код:
forward BanCheck(playerid,IP[]);
public BanCheck(playerid,IP[])
{
new admin[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME],Reason[60], string[60],query[164],IP1[17];
if(cache_num_rows() >= 1)
{
for(new row; row < cache_num_rows(); row++)
{
cache_get_field_content(row, "AdminName", admin, g_SQL, sizeof(admin));
cache_get_field_content(row, "BanName", pname, g_SQL, sizeof(pname));
cache_get_field_content(row, "Reason", Reason, g_SQL, sizeof(Reason));
cache_get_field_content(row, "IP", IP1, g_SQL, sizeof(IP1));
}
SendClientMessage(playerid, C_RED,"Esti banat pe acest server!");
SendClientMessage(playerid, C_RED,"___________________");
format(string, sizeof(string),"Admin: %s", admin);
SendClientMessage(playerid, C_RED, string);
format(string, sizeof(string),"Nume: %s", pname);
SendClientMessage(playerid, C_RED, string);
format(string, sizeof(string),"Motiv: %s", Reason);
SendClientMessage(playerid, C_RED, string);
SendClientMessage(playerid, C_RED,"___________________");
SendClientMessage(playerid, C_RED, "Daca crezi ca ai primit ban pe nedrept fa o poza(F8) si posteaza-o pe forum la sectiuena serverului.");
SendClientMessage(playerid, C_RED, "www.gamelive.ro/forum");
if((strcmp(pName(playerid), pname, false, MAX_PLAYER_NAME) == 0) && (strcmp(IP1, IP, true, sizeof(IP1)) != 0))
{
mysql_format(g_SQL, query, sizeof(query), "INSERT INTO `bans` (`BanName`,`AdminName`,`IP`,`Reason`) VALUES ('%e','AdmBot','%e','Ban Evade')",pName(playerid),IP1);
mysql_tquery(g_SQL, query, "","");
}
else if((strcmp(pName(playerid), pname, false, MAX_PLAYER_NAME) != 0) && (strcmp(IP1, IP, true, sizeof(IP1)) == 0))
{
mysql_format(g_SQL, query, sizeof(query), "INSERT INTO `bans` (`BanName`,`AdminName`,`IP`,`Reason`) VALUES ('%e','AdmBot','%e','Ban Evade')",pName(playerid),IP1);
mysql_tquery(g_SQL, query, "","");
}
SetTimerEx("_KickPlayerDelayed", 500, false, "i", playerid);
}
return 1;
}