Check if has server elements when spawning veh

This commit is contained in:
Vortrex
2022-03-09 02:50:38 -06:00
parent c8d8a84c5d
commit f19e09cd41

View File

@@ -526,8 +526,10 @@ function setVehicleColours(vehicle, colour1, colour2, colour3 = -1, colour4 = -1
// ===========================================================================
function createGameVehicle(modelIndex, position, heading) {
return game.createVehicle(getGameConfig().vehicles[getGame()][modelIndex][0], position, heading);
function createGameVehicle(modelIndex, position, heading, toClient = null) {
if(areServerElementsSupported()) {
return game.createVehicle(getGameConfig().vehicles[getGame()][modelIndex][0], position, heading);
}
}
// ===========================================================================