function help
#1

Can i check in any whay if an car has any player in it ? like an function or something , IsAnyPlayerInVehicle .
Reply
#2

pawn Код:
stock IsAnyPlayerInVehicle(vehicleid)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInVehicle(i, vehicleid))
            {
                return 1;
            }
        }
    }
    return 0;
}
Reply
#3

ok thnx , but that will take huge amount of time , looping trough 150 + vehicles for 150 players will be an disaster , and if i do this every 10minutes ..
Reply
#4

It may take you huge amount of time, but computer does it fast
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)