-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathclient.lua
More file actions
64 lines (62 loc) · 1.66 KB
/
Copy pathclient.lua
File metadata and controls
64 lines (62 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Speed Limiter --
if Config.speedlimiter then
Citizen.CreateThread(function()
while true do
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
local speed = GetEntitySpeed(vehicle)
local class = GetVehicleClass(vehicle)
Citizen.Wait(20)
if (ped) then
if class == 16 then
-- planes
else
if class == 15 then
-- helicopters
else
if class == 18 then
if math.floor(speed*2.2369) == Config.emergencyclassSpeedlimit then
cruise = speed
SetEntityMaxSpeed(vehicle, cruise)
end
else
if math.floor(speed*2.2369) == Config.speedlimit then
cruise = speed
SetEntityMaxSpeed(vehicle, cruise)
end
end
end
end
end
end
end)
end
-- Anti VDM --
if Config.antivdm then
Citizen.CreateThread(function()
while true do
SetWeaponDamageModifier(-1553120962, 0.0)
Citizen.Wait(10)
end
end)
end
-- Disable Vehicle Weapons --
if Config.disablevehicleweapons then
Citizen.CreateThread(function()
while true do
local wait = 500
local playerped = PlayerPedId()
if IsPedInAnyVehicle(playerped, false) then
wait = 0
local veh = GetVehiclePedIsUsing(playerped)
if DoesVehicleHaveWeapons(veh) == 1 and vehicleweaponhash ~= 1422046295 then
vehicleweapon, vehicleweaponhash = GetCurrentPedVehicleWeapon(playerped)
if vehicleweapon == 1 then
DisableVehicleWeapon(true, vehicleweaponhash, veh, playerped)
end
end
end
Citizen.Wait(wait)
end
end)
end