gta.createObject: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 31: Line 31:
let object = gta.createObject(model, client.player.position.addPolar(15.0, client.player.heading + (Math.PI/2.0)));
let object = gta.createObject(model, client.player.position.addPolar(15.0, client.player.heading + (Math.PI/2.0)));
     object.heading = client.player.heading;
     object.heading = client.player.heading;
message(client.name + ' added an object with model ID ' + model, COLOUR_GREEN)
message(client.name + ' added an object with model ID ' + model, COLOUR_GREEN);
});
});
|exampleJSCS = addCommandHandler("object", (command, text) =>
|exampleJSCS = addCommandHandler("object", (command, text) =>
Line 50: Line 50:
let object = gta.createObject(model, localPlayer.position.addPolar(15.0, localPlayer.heading + (Math.PI/2.0)));
let object = gta.createObject(model, localPlayer.position.addPolar(15.0, localPlayer.heading + (Math.PI/2.0)));
     object.heading = localPlayer.heading;
     object.heading = localPlayer.heading;
message('You added an object with model ID ' + model, COLOUR_GREEN)
message('You added an object with model ID ' + model, COLOUR_GREEN);
});
});
}}
}}
7,072

edits