Question about y_ini
#1

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 ?
Reply
#2

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.
Reply
#3

No, no. I want to read from the player file, when he isn't connected to the server.
Reply
#4

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
Reply
#5

Can you give me example?
Reply
#6

Can you give me your code for online players?
Reply
#7

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#8

whole code

not just player definition
Reply
#9

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.
Reply
#10

can you just tell me, why do you need this. What purposes ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)