In script when I set player Skin for example to: 288 ( PlayerInfo[playerid] = 288; )
And when I save it to mysql base on player disconnect it saves under pSpawn 288 and under pSkin 49 for unknown reason. Here is the code:
Sometimes it won't save pSkin also...
And when I save it to mysql base on player disconnect it saves under pSpawn 288 and under pSkin 49 for unknown reason. Here is the code:
PHP Code:
format(JLstring, sizeof(JLstring), "UPDATE `players` SET `Tutorial` = %d, `HoursGameplay` = %d, `LastOnline` = '%e',", PlayerInfo[playerid][pTutorial], PlayerInfo[playerid][pHoursGameplay], PlayerInfo[playerid][pLastOnline]);
strcat(string, JLstring);
format(JLstring, sizeof(JLstring), "`LatestIP` = '%e', `Skin` = %d, `Spawn` = %d, `VirtualWorld` = %d, `Interior` = %d,", PlayerInfo[playerid][pLatestIP], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pSpawn], PlayerInfo[playerid][pVirtualWorld], PlayerInfo[playerid][pInterior]);
strcat(string, JLstring);
format(JLstring, sizeof(JLstring), "`Kills` = %d, `Deaths` = %d, `Hunger` = %d, `Thirst` = %d,", PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pHunger], PlayerInfo[playerid][pThirst]);
strcat(string, JLstring);
format(JLstring, sizeof(JLstring), "`AdminLevel` = %d, `LeaderCoord` = %d, `AdminPin` = %d, `LeaderCoordPin` = %d,", PlayerInfo[playerid][pAdminLevel], PlayerInfo[playerid][pLeaderCoord], PlayerInfo[playerid][pAdminPin], PlayerInfo[playerid][pLeaderCoordPin]);
strcat(string, JLstring);
format(JLstring, sizeof(JLstring), "`Leader` = %d, `LeaderPin` = %d, `Member` = %d, `Rank` = %d, `OrgContract` = %d, `OrgDelivers` = %d, `OrgTasks` = %d,", PlayerInfo[playerid][pLeader], PlayerInfo[playerid][pLeaderPin], PlayerInfo[playerid][pMember], PlayerInfo[playerid][pRank], PlayerInfo[playerid][pOrgContract], PlayerInfo[playerid][pOrgDelivers], PlayerInfo[playerid][pOrgTasks]);
strcat(string, JLstring);
format(JLstring, sizeof(JLstring), "`SubOrgLeader` = %d, `SubOrgMember` = %d, `SubOrgRank` = %d, `SubOrgContract` = %d, `SubOrgTasks` = %d, `Roadblock` = %d WHERE `ID` = %d LIMIT 1", PlayerInfo[playerid][pSubOrgLeader], PlayerInfo[playerid][pSubOrgMember], PlayerInfo[playerid][pSubOrgRank], PlayerInfo[playerid][pSubOrgContract], PlayerInfo[playerid][pSubOrgTasks], PlayerInfo[playerid][pRoadblock], PlayerInfo[playerid][pID]);
strcat(string, JLstring);
mysql_format(Database, DB_Query, sizeof(DB_Query), string);
mysql_tquery(Database, DB_Query);