02.10.2013, 22:53
I know I made another thread, but..this is to the point. My SQLite will not save, the table matches OnGameModeInit, I learned from a tutorial and tried on a blank gamemode and it works. The system in my main game mode works the exact same, but dont work.
NOTE: The reason for using GetName(playerid) and GetPlayerName is so that it saves into the DB with the "_" as I made the GetName stock to remove the underscore.
And..yeah, thanks in advance
pawn Код:
new
Query[800],
string[100],
name[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, name, sizeof(name));
if(pLogged[playerid] == 1)
{
format(Query, sizeof(Query), "UPDATE `ACCOUNTS` SET LEVEL = %d, CASH = %d, ADMINLEVEL = %d, HOURS = %d, JOB = '%d', BANNED = %d, SPAWN = %d, BANK = %d, FOOD = %d, WATER = %d, SKIN = '%d', FACTION = %d, FACTION LEVEL = %d WHERE `NAME` = %s COLLATE NOCASE", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pAdmin],
PlayerInfo[playerid][pHours], PlayerInfo[playerid][pJob], PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pSpawn], PlayerInfo[playerid][pBank], PlayerInfo[playerid][pFood], PlayerInfo[playerid][pWater], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pFlevel], DB_Escape(name));
db_query(survival, Query);
format(string, sizeof(string), "%s's data has been successfully saved.", GetName(playerid));
printf(string);
return 1;
}
pLogged[playerid] = 0;
return 1;
}
And..yeah, thanks in advance