Command
#4

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Here's an example:
pawn Код:
// Somewhere in your code (A command for example)
for (new i = 0; i < 23; i++)
{
    if (!IsVehicleOccupied(car[i])) DestroyVehicle(car[i]); // Use SetVehicleToRespawn(car[i]); if you want them to respawn instead of getting destroyed.
}
Here's the IsVehicleOccupied function.
pawn Код:
stock IsVehicleOccupied(vehid)
{
    for( new all = 0; all < MAX_PLAYERS; all++)
    {
        if (IsPlayerInVehicle(all, vehid))
        {
            return 1;
        }
    }
    return 0;
}
Should work.
It works,thanks a lot.
Reply


Messages In This Thread
Command - by AdelS - 01.09.2014, 09:48
Re: Command - by DaniceMcHarley - 01.09.2014, 09:51
Re: Command - by Stinged - 01.09.2014, 10:14
Re: Command - by AdelS - 01.09.2014, 10:23

Forum Jump:


Users browsing this thread: 1 Guest(s)