Camera Angle not saving on Disconnect
#1

So my position is fine when it saves, however, my camera angle never seems to save. I have this running on disconnect and connect

Код:
public OnPlayerDisconnect(playerid, reason)
{
    new query[256], Float:pos[4];

    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);

    mysql_format(mysql, query, sizeof(query), "UPDATE `accounts` SET `Money` = '%d' , `PosX` = '%f' , `PosY` = '%f' , `PosZ` = '%f' , `PosA` = '%f' WHERE `ID` = '%d'",
    GetPlayerMoney(playerid), pos[0], pos[1], pos[2], pos[3], Player[playerid][pID]);
    mysql_tquery(mysql, query, "", "");

    return true;
}

public OnPlayerSpawn(playerid)
{
 	SetPlayerPos(playerid, Player[playerid][PosX], Player[playerid][PosY], Player[playerid][PosZ]);
    SetPlayerFacingAngle(playerid, Player[playerid][PosA]);

    if(IsLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn**");
    }

    IsSpawned[playerid] = 1;
    return true;
}
PosX, PosY, and PosZ all save, except PosA. When you log in, the camera is always facing north.
Reply


Messages In This Thread
Camera Angle not saving on Disconnect - by BR3TT - 31.05.2016, 17:30
Re: Camera Angle not saving on Disconnect - by Luicy. - 31.05.2016, 17:33
Re: Camera Angle not saving on Disconnect - by Kaliber - 31.05.2016, 17:39
Re: Camera Angle not saving on Disconnect - by BR3TT - 31.05.2016, 18:06
Re: Camera Angle not saving on Disconnect - by Kaliber - 31.05.2016, 18:12
Re: Camera Angle not saving on Disconnect - by BR3TT - 31.05.2016, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)