29.03.2013, 17:51
pawn Код:
CountPlayersInVehicle(countVehicle)
{
new playerCount;
for(new playerIndex; playerIndex < MAX_PLAYERS; playerIndex++)
{
if(IsPlayerInVehicle(playerIndex, countVehicle))
{
playerCount++;
}
}
return playerCount;
}
pawn Код:
new clientMessage[128];
format(clientMessage, sizeof(clientMessage), "There are %d players in your vehicle.", CountPlayersInVehicle(GetPlayerVehicleID(playerid)));
SendClientMessage(playerid, -1, clientMessage);