21.02.2012, 23:34
esta funcion deberia funcionar bien:
pawn Код:
PlayerVehicleHasPassengers(playerid)
{
if(!IsPlayerInAnyVehicle(playerid))return -1;
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return -1;
new count;
for(new i, p=GetMaxPlayers(); i<p; i++)
if(IsPlayerConnected(i) && playerid != i && IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)))
count++;
if(count)return 1;
return 0;
}