28.04.2015, 20:01
The saving part only saves the first set. So, for example:
These two are at the top of the stock that saves all my variables when the player logs out. It only saves the first set, so like the Admin, posX, PosY ect... is saved, but the Gender, Hours, Level is not.
I'm having a problem with the Gender especially. When they select their gender, I do:
And when they log out the stock above is called so that it saves it but when I check the database it's not saved.
Код:
new query[518]; mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Admin`=%d, `Money`=%d, `posX`=%f, `posY`=%f, `posZ`=%f WHERE `ID`=%d", PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ], PlayerInfo[playerid][ID]); mysql_tquery(mysql, query, "", ""); mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Gender`=%d, `Level`=%d, `Entered`=%d, `Minutes`=%d, `TMinutes`=%d, 'Hours'=%d, 'Age'=%d, 'Bank'=%d, 'Model'=%d, 'Model1'=%d WHERE `ID`=%d", PlayerInfo[playerid][pGender], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pEntered], PlayeInfo[playerid][pMinutes], PlayerInfo[playerid][pTMinutes], PlayerInfo[playerid][pHours], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pBank], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pModel1], PlayerInfo[playerid][ID]); mysql_tquery(mysql, query, "", "");
I'm having a problem with the Gender especially. When they select their gender, I do:
Код:
PlayerInfo[playerid][pGender] = 1; //male