22.07.2013, 18:22
(
Last edited by lelemaster; 22/07/2013 at 08:32 PM.
)
Those are basic codes, you'll need to adapt them to fit your script.
pawn Code:
new found = 0;
new passengerid;
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i) && GetPlayerVehicleSeat(i) == 1) // Seat 1 = co-driver
{
if(PlayerInfo[i][pJob] == yourjobid) // change my variable of PlayerInfo and pJob to fit your script
{
found = 1;
passengerid = i;
break;
}
}
}
if(found == 0) return SendClientMessage(playerid, -1, "You have no passenger who works with you.");
// use passengerid for the player id of the passenger.