OnPlayerUpdate message?
#10

Quote:
Originally Posted by HotPlayer
Посмотреть сообщение
Thats here is my try
Код:
public OnPlayerUpdate(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid, 30.0, 4621.3721,-5468.7544,16.0294))
		{
  		GivePlayerMoney(playerid, LiveMoney);
  		SetPlayerPos(playerid,1359.2667,-2667.1755,13.5391);
		}
		new StopMessage = 0;
		if( StopMessage == 0 )
		{
		    StopMessage = 1;
		}
		else
		{
  		SendClientMessage(playerid,0x21DD00FF,"[Greats]: You have FINISHED the /drag race!");
  		new pName[MAX_PLAYER_NAME];
		new string[128];
		GetPlayerName(playerid, pName, 30);
		format(string, 128, "{09FE00}[Race]: {FFFFFF}%s {09FE00}have finished the {FFFFFF}(/drag){09FE00} race.", pName);
		SendClientMessageToAll(COLOR_LIGHTBLUE, string);
		}

    return 1; // Send this update to other players.
}
But its dont work

You need to rethink what you are doing. No one here will recommend that you do what you are trying to do in OnPlayerUpdate you must think of a better way. OnPlayerUpdate is called X amount of times in a millisecond (its actual what your OnFoot, Incar, Weapon rates are) so let say using the default setting of 40 you are running that check 40 times in a millisecond. You can get the info here: https://sampforum.blast.hk/showthread.php?pid=417583#pid417583 So you really need to think about what you are trying to do and do you need to check those conditions 40 times in a millisecond. I highly doubt it.
Reply


Messages In This Thread
OnPlayerUpdate message? - by HotPlayer - 24.09.2011, 17:21
Re: OnPlayerUpdate message? - by HotPlayer - 24.09.2011, 17:38
Re: OnPlayerUpdate message? - by Wesley221 - 24.09.2011, 17:40
Re: OnPlayerUpdate message? - by HotPlayer - 24.09.2011, 17:41
Re: OnPlayerUpdate message? - by Wesley221 - 24.09.2011, 17:43
Re: OnPlayerUpdate message? - by HotPlayer - 24.09.2011, 17:46
Re: OnPlayerUpdate message? - by Wesley221 - 24.09.2011, 17:48
Re: OnPlayerUpdate message? - by HotPlayer - 24.09.2011, 17:56
Re: OnPlayerUpdate message? - by Riddick94 - 24.09.2011, 18:03
Re: OnPlayerUpdate message? - by cyber_punk - 24.09.2011, 18:05

Forum Jump:


Users browsing this thread: 1 Guest(s)