i'm trying to save data when player disconnect but i don't know where is the error...
Код:
enum ptInfo
{
ptModelID,
ptBone,
Float:ptPosX,
Float:ptPosY,
Float:ptPosZ,
Float:ptRotX,
Float:ptRotY,
Float:ptRotZ,
Float:ftscaleX,
Float:ftscaleY,
Float:ftscaleZ
};
new PlayerToyInfo[MAX_PLAYERS][MAX_PLAYERTOYS][ptInfo];
Код:
for(new v; v < MAX_PLAYERTOYS; v++){
new sql[16];
format(sql, sizeof(sql), "pt%dModelID", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptModelID]);
format(sql, sizeof(sql), "pt%dBone", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptBone]);
format(sql, sizeof(sql), "pt%fPosX", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptPosX]);
format(sql, sizeof(sql), "pt%fPosY", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptPosY]);
format(sql, sizeof(sql), "pt%fPosZ", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptPosZ]);
format(sql, sizeof(sql), "pt%fRotX", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptRotX]);
format(sql, sizeof(sql), "pt%fRotY", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptRotY]);
format(sql, sizeof(sql), "pt%fRotZ", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ptRotZ]);
format(sql, sizeof(sql), "ft%fscaleX", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ftscaleX]);
format(sql, sizeof(sql), "ft%fscaleY", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ftscaleY]);
format(sql, sizeof(sql), "ft%fscaleZ", v);
GuardarValor(playerid, sql, PlayerToyInfo[playerid][v][ftscaleZ]);
}