Need help (SetVehicleToRespawn)
#2

Use IsVehicleOccupied or something to detect if it's occupied or not. Also, your code is very stretched out when it doesn't have to be so confusing, and stretched out because your not using a stock to detect if it's taken.

After a quick ****** search I found this:
pawn Код:
stock IsVehicleOccupied(vehicleid) // Returns 1 if there is anyone in the vehicle
{
    foreach(Player,i)
    {
        if(IsPlayerInAnyVehicle(i))
        {
            if(GetPlayerVehicleID(i)==vehicleid)
            {
                return 1;
            }
            else
            {
                return 0;
            }
        }
    }
}
Source: https://sampforum.blast.hk/showthread.php?tid=235783
Reply


Messages In This Thread
Need help (SetVehicleToRespawn) - by Useryy - 24.04.2014, 00:11
Re: Need help (SetVehicleToRespawn) - by Abagail - 24.04.2014, 00:26
Re: Need help (SetVehicleToRespawn) - by xVIP3Rx - 24.04.2014, 00:27
Re: Need help (SetVehicleToRespawn) - by Useryy - 24.04.2014, 00:28
Re: Need help (SetVehicleToRespawn) - by Jefff - 24.04.2014, 00:40

Forum Jump:


Users browsing this thread: 2 Guest(s)