16.11.2014, 10:46
When i close my server and if someone is connected, the accounts save wrong with all variables in 0..
How i can save the accounts nice when i close the server?
How i can save the accounts nice when i close the server?
pawn Код:
public OnGameModeExit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new solicitud[359], Float:PosicX, Float:PosicY, Float:PosicZ,name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
GetPlayerPos(i, PosicX, PosicY, PosicZ);
format(solicitud, sizeof(solicitud), "UPDATE `usuarios` SET `Nivel`=%d, `Tutorial`=%d, `Dinero`=%d,`PosX`=%f,`PosY`=%f,`PosZ`=%f WHERE `Usuario`= '%s'",\
pInfo[i][pNivel],pInfo[i][pTutorial],pInfo[i][pDinero],PosicX,PosicY,PosicZ, name);
mysql_query(mysql, solicitud);
}
}