GetPlayerPos + GMX.
#5

I don't want to GetPlayerPos - OnPlayerUpdate or with timers. It would lag my server. So, I'm taking player position on his disconnect.

But I want to disable getting position, if I'm gmxing.

Код:
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;
}
And I'm sorry for wrong section ;P
Reply


Messages In This Thread
GetPlayerPos + GMX. - by IgrexolonO - 22.09.2011, 18:51
Re: GetPlayerPos + GMX. - by Hiddos - 22.09.2011, 19:35
Re: GetPlayerPos + GMX. - by XGh0stz - 22.09.2011, 19:54
Re: GetPlayerPos + GMX. - by Amit_B - 22.09.2011, 19:56
Re: GetPlayerPos + GMX. - by IgrexolonO - 22.09.2011, 21:13
Re: GetPlayerPos + GMX. - by XGh0stz - 22.09.2011, 23:07
Re: GetPlayerPos + GMX. - by Babul - 22.09.2011, 23:47
Re: GetPlayerPos + GMX. - by BeckzyBoi - 23.09.2011, 01:45
Re: GetPlayerPos + GMX. - by XGh0stz - 23.09.2011, 02:47
Re: GetPlayerPos + GMX. - by MP2 - 23.09.2011, 07:05

Forum Jump:


Users browsing this thread: 2 Guest(s)