IsVehicleStreamedIn

warning

This function was added in SA-MP 0.3a and will not work in earlier versions!

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.
forplayeridThe ID of the player to check.

Returns

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

1: Vehicle is streamed in for the player.

Examples

new streamedVehicleCount;
for(new v = 1; v <= MAX_VEHICLES; v++)
{
if (IsVehicleStreamedIn(v, playerid))
{
streamedVehicleCount ++;
}
}
new szString[144];
format(szString, sizeof(szString), "You currently have %i vehicles streamed in to your game.", streamedVehicleCount);
SendClientMessage(playerid, -1, szString);

Related Functions