Pular para o conteúdo principal

IsVehicleStreamedIn

Description

Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player.

NameDescription
vehicleidThe ID of the vehicle to check.
playeridThe ID of the player to check.

Returns

true - Vehicle is streamed in for the player.

false - Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).

Examples

new streamedVehicleCount;

for(new i = 1; i < MAX_VEHICLES; i++)
{
if (IsVehicleStreamedIn(i, playerid))
{
streamedVehicleCount ++;
}
}

new string[144];
format(string, sizeof(string), "You currently have %i vehicles streamed in to your game.", streamedVehicleCount);
SendClientMessage(playerid, -1, string);