14.08.2012, 11:57
Not good with MySQL but I think this will work...
Then
Should work I think, also depends on which MySQL plugin you're using but you should get the point.
Also change rename to your connection settings.
pawn Код:
new string[128];
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
format(string, sizeof(string), "SELECT * FROM `Accounts` WHERE `IP` = '%s'", plrIP);
mysql_function_query(rename, string, true, "OnIPCheck", "i", playerid);
pawn Код:
forward OnIPCheck(index);
public OnIPCheck(index)
{
mysql_store_result(rename);
if(mysql_num_rows(rename) > 0) // Change to how many rows and what you want to do..
{
}
}
Also change rename to your connection settings.