Die outside the vehicle
#3

On a timer:
pawn Код:
public OnGameModeInit() //Or OnFilterScriptInit()
{
    SetTimer("CarTimer", 1000, true);
    return 1;
}

forward CarTimer();
public CarTimer()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInAnyVehicle(i))
            {            
                new vehicleid = GetPlayerVehicleID(i);
                new Float:health;
                GetVehicleHealth(vehicleid, health);
                if(health <= 250)
                {
                    RemovePlayerFromVehicle(i);
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Die outside the vehicle - by kbalor - 27.09.2012, 00:14
Re: Die outside the vehicle - by Mauzen - 27.09.2012, 00:18
Re: Die outside the vehicle - by clarencecuzz - 27.09.2012, 00:18
Re: Die outside the vehicle - by kbalor - 27.09.2012, 00:51
Re: Die outside the vehicle - by OnlyOne - 27.09.2012, 01:02

Forum Jump:


Users browsing this thread: 1 Guest(s)