All gists

jackz
Last active 2 months ago
0 0 1
1 {
2 // The format version. Script only checks the last piece (the 1.3.1)
3 "version": "Jackz Custom Vehicle 1.3.1",
4 "created": 1661726534, // Unix timestamp when the vehicle was created. Optional
5 "name": "MyVehicle", // A name for the vehicle, used for when importing into the editor. Optional
6 "author": null, // An author name credited for making vehicle. Optional
7 "blipIcon": 252, // The blip id to show. See https://docs.fivem.net/docs/game-references/blips/
8 "spawnLocation": { x = 0, y = 0, z = 0 }, // The spawn location of the vehicle. Optional, null will disable
9 "allowPlayerSpawning": false // Default is false, allows other players to use 'spawnbuild name' command
10
jackz
Last active 2 months ago
0 0 1
1 public static void DrawBoundingBoxFromCenter(Vector3 center, Vector3 size, Color color)
2 {
3 Vector3 cornerA = new Vector3(center.X - size.X, center.Y - size.Y, center.Z + size.Z);
4 Vector3 cornerB = new Vector3(center.X + size.X, center.Y - size.Y, center.Z + size.Z);
5 Vector3 cornerC = new Vector3(center.X + size.X, center.Y + size.Y, center.Z + size.Z);
6 Vector3 cornerD = new Vector3(center.X - size.X, center.Y + size.Y, center.Z + size.Z);
7 DrawLine(cornerA, cornerB, color);
8 DrawLine(cornerB, cornerC, color);
9 DrawLine(cornerC, cornerD, color);
10 DrawLine(cornerD, cornerA, color);