LinkVehicleToInterior
Description:
Function LinkVehicleToInterior links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior).
Parameters:
(vehicleid, interiorid)
int | vehicleid | The ID of the vehicle to link to an interior. |
int | interiorid | The Interior ID to link it to. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute. This means the vehicle does not exist.
Examples:
public OnGameModeInit() { new vehicle1 = AddStaticVehicle(559, 2543.7505, -21.8345, 27.1899, 52.6054, -1, -1); LinkVehicleToInterior(vehicle1, 6); }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetVehicleVirtualWorld: Set the virtual world of a vehicle.
- SetPlayerInterior: Set a player's interior.