OnPlayerUpdate
#4

Try this:

pawn Код:
public OnGameModeInit()
{
    SetTimer("PlayersCheck", 1000, true);
    return 1;
}

forward PlayersCheck();

public PlayersCheck()
{
    for(new i = 0; i <= GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected(i))
        {
            if(isPlayerInAnyVehicle(i))
            {
                new vid, FLoat:vhealth;
                vid = GetPlayerVehicleID(i);
                GetVehicleHealth(vid, vhealth);
                if(vhealth < 450)
                {
                    RemovePlayerFromVehicle(i);
                }
            }
        }
    }
}
Reply


Messages In This Thread
OnPlayerUpdate - by new121 - 20.03.2012, 21:00
Re: OnPlayerUpdate - by ReneG - 20.03.2012, 21:28
Re: OnPlayerUpdate - by new121 - 20.03.2012, 21:29
Re: OnPlayerUpdate - by SpiritEvil - 20.03.2012, 21:41
Re: OnPlayerUpdate - by ReneG - 20.03.2012, 22:02
Re: OnPlayerUpdate - by antonio112 - 20.03.2012, 22:05
Re: OnPlayerUpdate - by Micko123 - 04.11.2016, 07:17
Re: OnPlayerUpdate - by Vince - 04.11.2016, 10:32
Re: OnPlayerUpdate - by Micko123 - 04.11.2016, 10:51

Forum Jump:


Users browsing this thread: 1 Guest(s)