14
edits
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 | |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 = [[ | |notes = Use the [[addToWorld|addToWorld]] function afterwards to add the vehicle to the players games. | ||
|exampleJSSS = addCommandHandler("vehicle", function(command, parameters, client) { | |||
var model = parseInt(parameters); | |||
var vehicle = gta.createVehicle(model, client.player.position); | |||
}); | |||
|exampleJSCS = addCommandHandler("vehicle", function(command, parameters) { | |||
var model = parseInt(parameters); | |||
var vehicle = gta.createVehicle(model, localPlayer.position); | |||
}); | |||
}} | }} |
edits