08.02.2014, 19:14
I have function for toys saving but they are not saving
This is under public OnPlayerStatsUpdate(playerid)
This is under public OnPlayerStatsUpdate(playerid)
PHP код:
for(new v = 0; v < MAX_PLAYERTOYS; v++)
{
format(var, 32, "pt%dModelID=%d\n", v, PlayerToyInfo[playerid][v][ptModelID]);fwrite(hFile, var);
format(var, 32, "pt%dBone=%d\n", v, PlayerToyInfo[playerid][v][ptBone]);fwrite(hFile, var);
format(var, 32, "pt%dPosX=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosX]);fwrite(hFile, var);
format(var, 32, "pt%dPosY=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosY]);fwrite(hFile, var);
format(var, 32, "pt%dPosZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosZ]);fwrite(hFile, var);
format(var, 32, "pt%dRotX=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotX]);fwrite(hFile, var);
format(var, 32, "pt%dRotY=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotY]);fwrite(hFile, var);
format(var, 32, "pt%dRotZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotZ]);fwrite(hFile, var);
format(var, 32, "pt%dScaleX=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleX]);fwrite(hFile, var);
format(var, 32, "pt%dScaleY=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleY]);fwrite(hFile, var);
format(var, 32, "pt%dScaleZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleZ]);fwrite(hFile, var);
}