SA-MP Forums Archive
[not a bug and fixed]OnPlayerUpdate in samp0.3a - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [not a bug and fixed]OnPlayerUpdate in samp0.3a (/showthread.php?tid=111850)



[not a bug and fixed]OnPlayerUpdate in samp0.3a - oicq747285250 - 04.12.2009

Код:
forward ...
new...

public OnPlayerHealthChange(playerid, Float:newhealth, Float:oldhealth)
{
  do something lots...
}
public OnPlayerUpdate(playerid) 
{
	if(IsPlayerConnected(playerid))
	{
		GetPlayerHealth(playerid, iNewPlayerHealth[playerid]);
		if(iNewPlayerHealth[playerid] != iPlayerHealth[playerid])
		{
		  OnPlayerHealthChange(playerid, iNewPlayerHealth[playerid], iPlayerHealth[playerid]);
		  iPlayerHealth[playerid] = iNewPlayerHealth[playerid];
		}
	}
}
then in game all the players' movement do not appear
and cant see their run,fight,aiming etc....


Re: OnPlayerUpdate in samp0.3a - Balon - 04.12.2009

Because you should return 1 in OnPlayerUpdate.


Re: OnPlayerUpdate in samp0.3a - oicq747285250 - 04.12.2009

I love you
it fixed