gta.createVehicle: Difference between revisions

m
Removed 'addToWorld()' function invoke as the webpage for 'addToWorld()' (https://wiki.gtaconnected.com/addToWorld) states that it no longer needs to be invoked.
No edit summary
 
m (Removed 'addToWorld()' function invoke as the webpage for 'addToWorld()' (https://wiki.gtaconnected.com/addToWorld) states that it no longer needs to be invoked.)
 
(3 intermediate revisions by one other user not shown)
Line 6: Line 6:
|parametersCS = int model, [ Vec3 position ]
|parametersCS = int model, [ Vec3 position ]
|parameter1 = int model The vehicle model ID.
|parameter1 = int model The vehicle model ID.
|parameter2 = Vec3 position optional Vec3(0.0,0.0,0.0) The position for the vehicle.
|parameter2 = Vec3 position optional Vec3(0.0, 0.0, 0.0) The position for the vehicle.
|return1 = Vehicle The vehicle handle.
|return1 = Vehicle The vehicle handle.
|returnFail1 = null n/a
|returnFail1 = null n/a
|usage = add a vehicle, use the [[addToWorld|addToWorld]] function afterwards to add the vehicle to the players games
|usage = add a vehicle
|returnInfo = a handle to the vehicle
|returnInfo = a handle to the vehicle
|bcMaxVersion = 1.0.71
|bcMaxVersion = 1.0.71
|bcName = game.createVehicle
|bcName = game.createVehicle
|notes = [[Resources/GTA3/VehicleModels|III Vehicle Models]]<br>
|notes = Use the [[addToWorld|addToWorld]] function afterwards to add the vehicle to the players games.
[[Resources/GTAVC/VehicleModels|VC Vehicle Models]]<br>
|exampleJSSS = addCommandHandler("vehicle", function(command, parameters, client) {
[[Resources/GTASA/VehicleModels|SA Vehicle Models]]<br>
    var model = parseInt(parameters);
[[Server/Defines#GTA_III_-_Game_Defines|Server Game Defines]]<br>
    var vehicle = gta.createVehicle(model, client.player.position);
This function has an example page: [[ScriptingExamples/AddVehicle|Add a Vehicle Example]]
});
|exampleJSCS = addCommandHandler("vehicle", function(command, parameters) {
    var model = parseInt(parameters);
    var vehicle = gta.createVehicle(model, localPlayer.position);
});
}}
}}
14

edits