Is it possible?
#2

pawn Код:
CountPlayersInVehicle(countVehicle)
{
    new playerCount;

    for(new playerIndex; playerIndex < MAX_PLAYERS; playerIndex++)
    {
        if(IsPlayerInVehicle(playerIndex, countVehicle))
        {
            playerCount++;
        }
    }

    return playerCount;
}
Usage:

pawn Код:
new clientMessage[128];
format(clientMessage, sizeof(clientMessage), "There are %d players in your vehicle.", CountPlayersInVehicle(GetPlayerVehicleID(playerid)));
SendClientMessage(playerid, -1, clientMessage);
Reply


Messages In This Thread
Is it possible? - by TrueForYourSelf - 29.03.2013, 17:48
Re: Is it possible? - by SuperViper - 29.03.2013, 17:51
Re: Is it possible? - by Sandiel - 29.03.2013, 18:06
Re: Is it possible? - by MP2 - 29.03.2013, 18:09
Re: Is it possible? - by TrueForYourSelf - 29.03.2013, 18:30

Forum Jump:


Users browsing this thread: 1 Guest(s)