22.09.2011, 18:51
Hello. When I'm trying to GetPlayerPos, within server GMX, it's setting coordinations as x - 0, y - 0, z - 0. Is there any solution about this?
public OnPlayerDisconnect(playerid) { if(PlayerInfo[playerid][loggedIn] == 1) { GetPlayerPos(playerid, PlayerInfo[playerid][x], PlayerInfo[playerid][y], PlayerInfo[playerid][z]); GetPlayerFacingAngle(playerid, PlayerInfo[playerid][angle]); format(query, 128, "UPDATE `players` SET `x`=%f,`y`=%f,`z`=%f,`angle`=%f WHERE `login`='%s'", PlayerInfo[playerid][x], PlayerInfo[playerid][y], PlayerInfo[playerid][z], PlayerInfo[playerid][angle], playerName(playerid)); mysql_query(query); } return 1; }
new ServerRunning=1;
ServerRunning=0;
if(ServerRuning==1) { GetPlayerPos(blabla); }
OnPlayerDisconnect(playerid); GameModeExit();