y_ini Help
#6

Try this:

pawn Code:
new checkedIP[32];

forward checkIP(name[], value[]);
public checkIP(name[], value[])
{
    INI_String("IP", checkedIP, sizeof(checkedIP));
}
pawn Code:
new filename[13 + MAX_PLAYER_NAME];
format(filename, sizeof(filename), "Accounts/%s.ini", Encode(pName(playerid)));

if(!fexist(filename))
{
    //register request
}
else
{
    INI_ParseFile(filename, "checkIP");

    new IP[32];
    GetPlayerIp(playerid, IP, sizeof(IP));

    if(!strcmp(IP, checkedIP, true))
    {
        //auto login
    }
    else
    {
        //login request
    }
}
Edit: Changed the code once again.
Reply


Messages In This Thread
y_ini Help - by Linus- - 22.01.2011, 10:50
Re: y_ini Help - by Code_Red - 22.01.2011, 10:51
Re: y_ini Help - by Linus- - 22.01.2011, 10:55
Re: y_ini Help - by HyperZ - 22.01.2011, 11:19
Re: y_ini Help - by Linus- - 22.01.2011, 11:22
Re: y_ini Help - by Finn - 22.01.2011, 11:45
Re: y_ini Help - by Linus- - 22.01.2011, 13:09

Forum Jump:


Users browsing this thread: 4 Guest(s)