18.05.2013, 22:23
(
Последний раз редактировалось HurtLocker; 19.05.2013 в 10:37.
)
I want to drag some players' stats directly from the .ini file without using their enum. This is what ****** says in his y_ini presentation thread:
But I still can't make it work, I don't know how to place the player's .ini file in the line INI:filename[tag](name[], value[]) and the problem is the filename[tag] thing. To get the players name.ini file I use the well known stock copied from Kush's y_ini reg/log tutorial:
This is what I did and I know is crap:
Quote:
pawn Код:
|
pawn Код:
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
pawn Код:
CMD:ytest(playerid, params[])
{
new sc, str[50], n[200]=UserPath(playerid);
INI:n[tag](name[], value[]);
{
INI_Int("Score", sc);
}
format(str, sizeof(str), "sdafsgssgf-->{FF0000}%d", sc);
SendClientMessage(playerid, -1, str);
return 1;
}