22.01.2011, 11:45
Try this:
Edit: Changed the code once again.
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
}
}