29.11.2015, 12:21
Thats the stock itself
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
PHP код:
IsPlayerInsideTaxi(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (GetVehicleModel(vehicleid) == 420 || GetVehicleModel(vehicleid) == 438)
{
foreach (new i : Player)
{
if ((i != playerid) && (PlayerData[i][pJob] == JOB_TAXI && PlayerData[i][pTaxiDuty] && GetPlayerState(i) == PLAYER_STATE_DRIVER) && GetPlayerVehicleID(i) == vehicleid)
return 1;
}
}
return 0;
}