07.10.2015, 14:26
I want to use pquery and can not!
Function Work (To OnPlayerConnect) with "mysql_query":
Function Not Work (To OnPlayerConnect) with "mysql_pquery":
Function Work (To OnPlayerConnect) with "mysql_query":
Код:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE Player = '%s'", GetName(playerid)); mysql_query(MySQLCon, query); if(cache_num_rows()) { SetTimerEx("KickPublic", 10, false, "i", playerid); new playerIP[32]; GetPlayerIp(playerid, playerIP, sizeof(playerIP)); format(AdminWText, sizeof(AdminWText), "AdminWarning: %s(%s) tried to login while banned.", GetName(playerid), playerIP); SendAdminMessage(COLOR_ADMWARNING, AdminWText); }
Код HTML:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE Player = '%s'", GetName(playerid)); mysql_pquery(MySQLCon, query); if(cache_num_rows()) { SetTimerEx("KickPublic", 10, false, "i", playerid); new playerIP[32]; GetPlayerIp(playerid, playerIP, sizeof(playerIP)); format(AdminWText, sizeof(AdminWText), "AdminWarning: %s(%s) tried to login while banned.", GetName(playerid), playerIP); SendAdminMessage(COLOR_ADMWARNING, AdminWText); }