OnPlayerUpdate
#1

Код:
public OnPlayerUpdate(playerid)
{
	new Float:hp;
	GetPlayerHealth(playerid,hp);
    if(hp <= 1.0) return SetPlayerHealth(playerid,-1.0);

	if(Map[AllowWater] == 0)
	{
    	if(IsPlayerInWater(playerid))
		{
			SetPlayerHealth(playerid,0.0);
		}
	}
    PauseTime[playerid] = gettime();
	return 1;
}
Код:
forward pausecheck();
public pausecheck()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        new PausedSeconds = gettime()-PauseTime[i];
        if(PausedSeconds > 5)
        SetPlayerChatBubble(i, "Paused", COLOR_YELLOW, 100.0, 5000);
        }
    return 1;
}
How to make that more ressourcefree?
Reply


Messages In This Thread
OnPlayerUpdate - by Blackazur - 04.04.2013, 17:46
Re: OnPlayerUpdate - by Scenario - 04.04.2013, 17:51
AW: OnPlayerUpdate - by Blackazur - 04.04.2013, 17:53
Re: OnPlayerUpdate - by Scenario - 04.04.2013, 17:56
AW: OnPlayerUpdate - by Blackazur - 04.04.2013, 17:57
Re: OnPlayerUpdate - by Face9000 - 04.04.2013, 22:55

Forum Jump:


Users browsing this thread: 1 Guest(s)