Position saving with MySQL
#2

Set 3 more values in your MySQL database under your Player data, PosX, PosY and PosZ. Set them to FLOAT with the length of 10.

pawn Код:
enum pData
{
Float:PosX,
Float:PosY,
Float:PosZ
//etc..
};
pawn Код:
public OnPlayerDisconnect(playerid)
{
    new query[128];
    format(query, sizeof(query), "UPDATE PlayerData SET PosX=%f, PosY=%f, PosZ=%f WHERE pName='%s'", Player[playerid][PosX], Player[playerid][PosY], Player[playerid][PosZ], )
}
I'm not the best at PAWN, but I attempted it for you.
Tell me if it works
Reply


Messages In This Thread
Position saving with MySQL - by Sturra - 09.07.2014, 14:42
Re: Position saving with MySQL - by AMouldyLemon - 09.07.2014, 14:55
Re: Position saving with MySQL - by Stanford - 09.07.2014, 15:18
Re: Position saving with MySQL - by Sturra - 09.07.2014, 15:41
Re: Position saving with MySQL - by AMouldyLemon - 09.07.2014, 16:33
Re: Position saving with MySQL - by Sturra - 09.07.2014, 16:46
Re: Position saving with MySQL - by AMouldyLemon - 09.07.2014, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)