YINI problem
#4

I am testing this on localhost with this specs, it shouldn't lag with only 1 player online....


Lemme show more code, under onplayerconnect:

This will load player's password if file exsist.
Код:
	if(fexist(UserPath(playerid)))
	{
	    INI_ParseFile(UserPath(playerid), "LoadUserP_%s", .bExtra = true, .extra = playerid);
		gPlayerAccount[playerid] = 1;
		return 1;
	}
	else
	{
		gPlayerAccount[playerid] = 0;
		return 1;
	}
This is under OnPlayerLogin(playerid,password[]) custom function:

Код:
	if(fexist(UserPath(playerid)))
	{
		if(strcmp(PlayerInfo[playerid][pKey],password ,false) == 0)
		{
            INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
		}
Register part:

Код:
public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
			new string[128];
			new playername3[MAX_PLAYER_NAME];
			new playersip[24];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			GetPlayerIp(playerid, playersip, sizeof(playersip));
			new File: hFile = fopen(UserPath(playerid), io_write);
			fclose(hFile);
   			strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
			SavePlayer(playerid);
                        ....
	}
	return 1;
}
Might be a problem that i am using 2 different functions for loading on same file?
Reply


Messages In This Thread
YINI problem - by kepa333 - 31.05.2015, 22:39
Re: YINI problem - by kepa333 - 01.06.2015, 13:41
Re: YINI problem - by Bennyy - 01.06.2015, 13:49
Re: YINI problem - by kepa333 - 01.06.2015, 14:54
Re: YINI problem - by SickAttack - 01.06.2015, 15:02
Re: YINI problem - by kepa333 - 01.06.2015, 15:14

Forum Jump:


Users browsing this thread: 2 Guest(s)