stock SaveUserStats(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
if(PlayerInfo[playerid][pLoggedIn] == true)
{
PlayerInfo[playerid][pX] = x;
PlayerInfo[playerid][pY] = y;
PlayerInfo[playerid][pZ] = z;
}
new query[256];
? strcat(query, "UPDATE `playerinfo` SET `skin` = '%d', `score` = '%d', `money` = '%d', `murders` = '%d', `zombieskilled` = '%d', `health` = '%d', `armour` = '%d',`deaths` = '%d', `hunger` = '%d', `thirst` = '%d', `pX` = '%i', `pY` = '%i', `pZ` = '%i',? WHERE 'acc_name' = '%e'");
format(query, sizeof(query), query, PlayerInfo[playerid][pSkin],
PlayerInfo[playerid][pScore],
PlayerInfo[playerid][pMoney],
PlayerInfo[playerid][pKills],
PlayerInfo[playerid][pZombiesKilled],
PlayerInfo[playerid][pHealth],
PlayerInfo[playerid][pArmour],
PlayerInfo[playerid][pDeaths],
PlayerInfo[playerid][pHunger],
PlayerInfo[playerid][pX],
PlayerInfo[playerid][pY],
PlayerInfo[playerid][pZ],
GetPlayerName(playerid));
mysql_tquery(handle, query, "", "");
printf("%s", query);
return 1;
}