Check if player inside a taxi and has it's job
#1

Thats the stock itself

PHP код:
IsPlayerInsideTaxi(playerid)
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    if (
GetVehicleModel(vehicleid) == 420 || GetVehicleModel(vehicleid) == 438)
    {
        foreach (new 
Player)
        {
            if ((
!= playerid) && (PlayerData[i][pJob] == JOB_TAXI && PlayerData[i][pTaxiDuty] && GetPlayerState(i) == PLAYER_STATE_DRIVER) && GetPlayerVehicleID(i) == vehicleid)
                return 
1;
        }
    }
    return 
0;

Now how I can do that if the player isn't has a taxi job (JOB_TAXI) it will return an error message and kick him out of the taxi. + rep for helpers
Reply


Messages In This Thread
Check if player inside a taxi and has it's job - by DemME - 29.11.2015, 12:21
Re: Check if player inside a taxi and has it's job - by DaniceMcHarley - 29.11.2015, 12:25
Re: Check if player inside a taxi and has it's job - by Denying - 29.11.2015, 12:29
Re: Check if player inside a taxi and has it's job - by DemME - 29.11.2015, 12:32
Re: Check if player inside a taxi and has it's job - by Denying - 29.11.2015, 12:37
Re: Check if player inside a taxi and has it's job - by gurmani11 - 29.11.2015, 12:38

Forum Jump:


Users browsing this thread: 3 Guest(s)