22.11.2010, 19:03
pawn Код:
//Above your script:
new LastPlayerInVec[MAX_VEHICLES] = (-1);
//Callback OnPlayerExitVehicle:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetPlayerState(playerid) == 2) // Is he/she the driver?
LastPlayerInVec[vehicleid] = playerid;
return 1;
}
//The function
stock GetLastPlayerInVehicle(vehicleid)
{
if(LastPlayerInVec[vehicleid] != -1) //Did someone entered it?
return LastPlayerInVec[vehicleid];
return 0;
}
[EDIT]
Damn bmuk was faster