Skip to content

Commit bc08389

Browse files
Add test bike and test shooter plane
1 parent ea9b970 commit bc08389

8 files changed

Lines changed: 6 additions & 7 deletions

File tree

[examples]/test_vehicles/c_test_gui.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ local function spawnVehicleByID(vehicleID)
2020
end
2121

2222
local x, y, z = getElementPosition(localPlayer)
23-
local rot = getPedRotation(localPlayer)
23+
local _, _ rot = getElementRotation(localPlayer)
2424
local offsetDistance = 5
2525
local spawnX = x + offsetDistance * math.sin(math.rad(-rot))
2626
local spawnY = y + offsetDistance * math.cos(math.rad(-rot))
27-
2827
triggerServerEvent("newmodels-test_vehicles:requestVehicleSpawn", resourceRoot, localPlayer, vehicleID, spawnX, spawnY, z, rot)
2928
end
3029

@@ -68,4 +67,4 @@ end
6867

6968
bindKey("F4", "down", toggleSpawnerGUI)
7069
addCommandHandler("vspawner", toggleSpawnerGUI, false)
71-
addCommandHandler("spawnveh", function(cmd, id) spawnVehicleByID(tonumber(id)) end, false)
70+
addCommandHandler("spawnveh", function(_, id) spawnVehicleByID(tonumber(id)) end, false)

[examples]/test_vehicles/s_test_cmd.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ end, false, false)
2222

2323
addEvent("newmodels-test_vehicles:requestVehicleSpawn", true)
2424
addEventHandler("newmodels-test_vehicles:requestVehicleSpawn", resourceRoot, function(player, vehicleID, x, y, z, rot)
25-
2625
local customModels = exports['newmodels_azul']:getCustomModels()
2726
local isValidCustomModel = customModels[vehicleID] and true or false
2827
local isValidDefaultID = exports['newmodels_azul']:isDefaultID("vehicle", vehicleID)
29-
28+
3029
if not isValidCustomModel and not isValidDefaultID then
3130
triggerClientEvent(player, "newmodels-test_vehicles:vehicleSpawnResponse", player, false, "Invalid ID")
3231
return
3332
end
34-
33+
3534
local vehicle = exports['newmodels_azul']:createVehicle(vehicleID, x, y, z, 0, 0, rot)
36-
3735
if isElement(vehicle) then
3836
triggerClientEvent(player, "newmodels-test_vehicles:vehicleSpawnResponse", player, true, "Vehicle spawned")
3937
else

[examples]/test_vehicles/s_vehicles.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
local VEHICLE_SPAWNS = {
77
{490, -941.95, 1043.03, 24.25, 355.90, 356.51, 199.00, 0, 0},
88
{-1, -947.94, 1060.05, 25.96, 356.28, 356.34, 204.01, 0, 0},
9+
{-420, -926, 1010.67, 22, 356.28, 356.34, 204.01, 0, 0},
910
}
1011

1112
local function createVehicles()

[examples]/test_vehicles/s_vehicles_alt.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ loadstring(exports.newmodels_azul:import())()
99
local VEHICLE_SPAWNS = {
1010
{525, -938.74, 1034.21, 23.59, 3.42, 2.85, 20.27, 0, 0},
1111
{-5, -944.88, 1051.90, 24.84, 355.97, 356.23, 198.86, 0, 0},
12+
{-69, -924.62, 1015.67, 22, 355.97, 0, 0, 0, 0},
1213
}
1314

1415
local function createVehicles()
11.9 MB
Binary file not shown.
2.77 MB
Binary file not shown.
682 KB
Binary file not shown.
821 KB
Binary file not shown.

0 commit comments

Comments
 (0)