IsVehicleEmpty(carid) function
#1

So finaly I need a help, maybe someone can help.

What I need is, to check if some exact car is empty.

I need it for a event, if some event car is empty set his VW to 9999.

I have tried many ways, maybe someone have some ideas?

Last way I tried like this.
pawn Код:
public IsVehicleEmpty(carid)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInVehicle(i,carid))
            {
                return 1;
            }
        }
    }
    return 0;
}
I know that return 1; shouldn't be in loop, but its not work anyway.
Reply


Messages In This Thread
IsVehicleEmpty(carid) function - by ikey07 - 15.07.2010, 18:42
Re: IsVehicleEmpty(carid) function - by bigcomfycouch - 15.07.2010, 18:48
Re: IsVehicleEmpty(carid) function - by ikey07 - 15.07.2010, 19:03
Re: IsVehicleEmpty(carid) function - by Hiddos - 15.07.2010, 19:04
Re: IsVehicleEmpty(carid) function - by ikey07 - 15.07.2010, 19:09

Forum Jump:


Users browsing this thread: 1 Guest(s)