SA-MP Forums Archive
Dini -> Y_INI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dini -> Y_INI (/showthread.php?tid=489270)



Dini -> Y_INI - martoivanov - 21.01.2014

How would be this in y_ini?
pawn Код:
TempTotalTime = dini_Int(rFile, string);
dini_IntSet(rFile, string, TotalRaceTime);
dini_Set(rFile, string, pName);
TotalRaces = dini_Int(rNameFile, "TotalRaces");
RaceVehicle = dini_Int(rFile, "vModel");
CPCoords[x][0] = dini_Float(rFile, string);
dini_Get(rFile, string)



Re: Dini -> Y_INI - Sawalha - 21.01.2014

dini_IntSet -> INI_WriteInt
dini_Set -> Don't know, maybe INI_SetTag
dini_Float -> INI_Float
dini_Get -> None.
But before all that do
pawn Код:
new INI:File = INI_Open(// here's the definition of File Path(playerid));
To define The path do as an example
pawn Код:
#define Path "Users/%s.ini"
and Then make a stock to get the file from there:
pawn Код:
stock UserPath(playerid)
{
    new string[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), Path, name);
    return string;
}
Good luck