SA-MP Forums Archive
Is there a... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Is there a... (/showthread.php?tid=93379)



Is there a... - Antonio [G-RP] - 25.08.2009

Is there a function that is like 'IsVehicleOccupied' or something?



Re: Is there a... - woot - 25.08.2009

I made this outta my mind, I can't assure you it works, lol.

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
    for(new p; p < MAX_PLAYERS; p++) && if(IsPlayerConnected(p))
    {
        if(IsPlayerInAnyVehicle(p) && GetPlayerVehicleID(p) == vehicleid) return 1;
    }
}