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.)
 
(2 intermediate revisions by one other user not shown)
Line 14: Line 14:
|bcName = game.createVehicle
|bcName = game.createVehicle
|notes = Use the [[addToWorld|addToWorld]] function afterwards to add the vehicle to the players games.
|notes = Use the [[addToWorld|addToWorld]] function afterwards to add the vehicle to the players games.
This function has an example page: [[ScriptingExamples/AddVehicle|Add a Vehicle Example]]
|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);
});
}}
}}
14

edits