Question about y_ini -
Brooks1 - 21.11.2014
Small example with Dini:
format(string,sizeof(string),"Test: %d",dini_Int(File,"Test"));
SendClientMessage(playerid,COLOR,string);
How I can do this with y_ini ?
Re: Question about y_ini -
Banana_Ghost - 21.11.2014
Assuming you have the enumerator and data saving setup:
pawn Код:
format(string),sizeof(string),"Test: %d",pInfo[playerid][Test]);
SendClientMessage(playerid,COLOR,string);
pInfo[playerid][Field] is used to access the enumerator, yours may be different depending on how your setup is.
pInfo is the name of the variable used to access the emunerator.
playerid is the player id to use to access the enumerator.
Field is the actual name of the enumerator you are trying to access.
My explanations might seem different to others but that's how I choose to understand it.
Re: Question about y_ini -
Brooks1 - 21.11.2014
No, no. I want to read from the player file, when he isn't connected to the server.
Re: Question about y_ini -
CoaPsyFactor - 21.11.2014
same as you would if player is online, you'll just need to provide player's name manually

create function that accepts 1 parameter that is players name, and just use that parameter to load file
Re: Question about y_ini -
Brooks1 - 21.11.2014
Can you give me example?
Re: Question about y_ini -
CoaPsyFactor - 21.11.2014
Can you give me your code for online players?
Re: Question about y_ini -
Brooks1 - 21.11.2014
pawn Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Re: Question about y_ini -
CoaPsyFactor - 21.11.2014
whole code
not just player definition
Re: Question about y_ini -
Brooks1 - 21.11.2014
I use the code from this tutorial:
https://sampforum.blast.hk/showthread.php?tid=273088
I started yesterday to use y_ini and now I'm learning.
Re: Question about y_ini -
CoaPsyFactor - 21.11.2014
can you just tell me, why do you need this. What purposes ?