30.03.2014, 11:16
Hi all
First of all, Its my first time of using Y_INI to store values of players, so pelase explain me properly what you have done in the following code/changed.
Okay so my problem is that i dont know how to use loops with Y_INI on writing, in the following code there is a loop that counting my toys number (slots), if i have 5 slots so the following code will be shown 5 times in the INI file of a specific player for each slots.
+REP if your help works :P
First of all, Its my first time of using Y_INI to store values of players, so pelase explain me properly what you have done in the following code/changed.
Okay so my problem is that i dont know how to use loops with Y_INI on writing, in the following code there is a loop that counting my toys number (slots), if i have 5 slots so the following code will be shown 5 times in the INI file of a specific player for each slots.
+REP if your help works :P
Код:
for(new v = 0; v < MAX_PLAYERTOYS; v++)
{
INI_WriteFloat(File, "pt%dModelID", PlayerToyInfo[playerid][v][ptModelID]);
INI_WriteFloat(File, "pt%dBone", PlayerToyInfo[playerid][v][ptBone]);
INI_WriteFloat(File, "pt%dPosX", PlayerToyInfo[playerid][v][ptPosX]);
INI_WriteFloat(File, "pt%dPosY", PlayerToyInfo[playerid][v][ptPosY]);
INI_WriteFloat(File, "pt%dPosZ", PlayerToyInfo[playerid][v][ptPosZ]);
INI_WriteFloat(File, "pt%dRotX", PlayerToyInfo[playerid][v][ptRotX]);
INI_WriteFloat(File, "pt%dRotY", PlayerToyInfo[playerid][v][ptRotY]);
INI_WriteFloat(File, "pt%dRotZ", PlayerToyInfo[playerid][v][ptRotZ]);
INI_WriteFloat(File, "pt%dScaleX", PlayerToyInfo[playerid][v][ptScaleX]);
INI_WriteFloat(File, "pt%dScaleY", PlayerToyInfo[playerid][v][ptScaleY]);
INI_WriteFloat(File, "pt%dScaleZ", PlayerToyInfo[playerid][v][ptScaleZ]);
}


