SA-MP Forums Archive
taxi - 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)
+--- Thread: taxi (/showthread.php?tid=378158)



taxi - thefatshizms - 16.09.2012

I don't know why but I'm getting stuck on this when it seems pretty simple thing.

I want to make a taxi class and basicly a player does a command (lets say /taxi) and it sets his var to 1 or true for available to taxi. All that is easy as pie but im getting stuck on when he enters a car i want to make sure he is passenger and seewho is driving the car and then see if that driver is a taxi driver.


Re: taxi - ViniBorn - 16.09.2012

Is something like :

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger)
    {
        for(new v, b = GetMaxPlayers(); v != b; v++)
            if(IsPlayerConnected(v))
                if(GetPlayerVehicleID(v) == vehicleid)
                    if(v == Taxi Driver)
                    {
                    }
    }
    return true;
}