AKA with MySQL.
#2

Not good with MySQL but I think this will work...

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);
Then
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..
    {
    }
}
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.
Reply


Messages In This Thread
AKA with MySQL. - by Edvin - 14.08.2012, 11:28
Re: AKA with MySQL. - by ryansheilds - 14.08.2012, 11:57
Re: AKA with MySQL. - by Edvin - 14.08.2012, 12:14

Forum Jump:


Users browsing this thread: 1 Guest(s)