18.04.2015, 15:41
Hello to everyone..
I want to make Last Position Spawn..The Float Pos is savings GOOD in database.. pPosX , pPosY, pPosZ..Coordinates save fine..But when player login, he will spawn in Palomino Creek in water..I don't know why..
SAVE STATS CODE OnPlayerDisconnect..
You will see there : PlayerInfo[playerid][pPosY],
PlayerInfo[playerid][pPosZ],
PlayerInfo[playerid][pPosA],
This is Player Last Position..
And When player Login code :
But don't work..Player will spawn in Palomino Crekk (in water ) or Montgomery..I don't have any coordinates for that towns...
If i enter in database and copy pPosX,Y,Z coordinates and i use /gotopos COORDINATES i will go to player good coordinates..but when he spawn don't work..
I want to make Last Position Spawn..The Float Pos is savings GOOD in database.. pPosX , pPosY, pPosZ..Coordinates save fine..But when player login, he will spawn in Palomino Creek in water..I don't know why..
SAVE STATS CODE OnPlayerDisconnect..
Код:
public SavePlayerStats(playerid) { new vehicles[64], contacts[256], drugs[256], tickets[256]; if(playerid != INVALID_PLAYER_ID && PlayerIsOn(playerid) && PlayerLogged(playerid)) { SavePlayerPos(playerid); format(query, sizeof(query), "UPDATE `users` SET `registered` = %d, `cash` = %d, `bank` = %d, `skin` = %d, `sex` = %d, `age` = %d, `origin` = '%s', `level` = %d, `exp` = %d, `hours` = %d, `admin` = %d, `helper` = %d, `int` = %d, `world` = %d WHERE `name` = '%s'", PlayerInfo[playerid][pRegistered], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pBank], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pSex], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pOrigin], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pExp], PlayerInfo[playerid][pHours], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pHelper], PlayerInfo[playerid][pInt], PlayerInfo[playerid][pWorld], GetName(playerid)); mysql_function_query(dbHandle, query, false, "", ""); //========================================================================================================= format(query, sizeof(query), "UPDATE `users` SET `jailed` = %d, `jailtime` = %d, `banned` = %d, `warns` = %d, `donate` = %d, `carlic` = %d, `weplic` = %d, `flylic` = %d, `posx` = %f, `posy` = %f, `posz` = %f, `posa` = %f WHERE `name` = '%s'", PlayerInfo[playerid][pJailed], PlayerInfo[playerid][pJailTime], PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pWarns], PlayerInfo[playerid][pDonateRank], PlayerInfo[playerid][pCarLic], PlayerInfo[playerid][pWepLic], PlayerInfo[playerid][pFlyLic], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pPosA], GetName(playerid)); mysql_function_query(dbHandle, query, false, "", ""); //=============================================================
PlayerInfo[playerid][pPosZ],
PlayerInfo[playerid][pPosA],
This is Player Last Position..
And When player Login code :
Код:
PutPlayer(playerid, PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetInterior(playerid,0); SetWorld(playerid, 0);
If i enter in database and copy pPosX,Y,Z coordinates and i use /gotopos COORDINATES i will go to player good coordinates..but when he spawn don't work..