Not saving position in the SQL Server
#1

Okay, So, i made a script that is supposed to save the position etc of the player when they disconnect. here it is.
pawn Код:
new query[500], Float:FacingAngle, Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,X);
    GetPlayerFacingAngle(playerid, FacingAngle);
    if(IsLoggedIn[playerid] == 1 && playerid != INVALID_PLAYER_ID && !IsPlayerNPC(playerid))
    {
        mysql_format(MysqlCon, query, sizeof(query), "UPDATE `players` SET `Admin`=%d, `Vip`=%d, `Money`=%d, `Score`=%d, `TrustedLevel`=%d, `Deaths`=%d, `Kills`=%d, `X`=%f, `Y`=%f, `Z`=%f, 'FacingAngle'=%f, `Interior`=%d, 'VW'=0 WHERE `ID`=%d AND `user`='%e'",
        pInfo[playerid][pAdmin],
        pInfo[playerid][pVip],
        GetPlayerMoney(playerid),
        GetPlayerScore(playerid),
        pInfo[playerid][pTrustedLevel],
        pInfo[playerid][pDeaths],
        pInfo[playerid][pKills],
        X,
        Y,
        Z,
        FacingAngle,
        GetPlayerInterior(playerid),
        pInfo[playerid][pID],
        PlayerName(playerid));
        mysql_tquery(MysqlCon, query, "", "");
        resetVar(playerid);
        print(query);
    }
But I got a problem, On My print(query); this is in my server log
Код:
[17:26:58] [join] Brad_Nunchr has joined the server (0:127.0.0.1)
[17:27:39] UPDATE `players` SET `Admin`=0, `Vip`=0, `Money`=1250, `Score`=0, `TrustedLevel`=0, `Deaths`=0, `Kills`=0, `X`=-95.805450, `Y`=1194.072876, `Z`=19.589136, 'FacingAngle'=0.000000, `Interior`=0, 'VW'=1133108785 WHERE `ID`=5 AND `user`='Brad_Nunchr'
[17:27:39] [part] Brad_Nunchr has left the server (0:1)
But in my phpmyadmin it says the X, Y, Z is 0 > http://prntscr.com/3m22bd
Please help me fix this issue
Reply


Messages In This Thread
Not saving position in the SQL Server - by Mriss - 24.05.2014, 07:11
Re: Not saving position in the SQL Server - by BroZeus - 24.05.2014, 07:16
Re: Not saving position in the SQL Server - by Mriss - 24.05.2014, 07:24
Re: Not saving position in the SQL Server - by Mriss - 24.05.2014, 07:26
Re: Not saving position in the SQL Server - by RajatPawar - 24.05.2014, 07:32
Re: Not saving position in the SQL Server - by ball - 24.05.2014, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)