This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.lua
64 lines (60 loc) · 1.9 KB
/
main.lua
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
if Config.Options.ForcedFirst then
CreateThread(function()
while true do
sleep = 1000
local _, weapon = GetCurrentPedWeapon(PlayerPedId())
local unarmed = `WEAPON_UNARMED`
if weapon == unarmed then
sleep = 1000
else
sleep = 1
if IsPlayerFreeAiming(PlayerId()) then
SetFollowPedCamViewMode(3)
else
SetFollowPedCamViewMode(0)
end
end
Wait(sleep)
end
end)
end
if Config.Options.Vehicle then
CreateThread(function()
while true do
local ped = PlayerPedId()
local _, weapon = GetCurrentPedWeapon(ped)
local unarmed = `WEAPON_UNARMED`
local inVeh = GetVehiclePedIsIn(PlayerPedId(), false)
sleep = 1000
if IsPedInAnyVehicle(PlayerPedId()) and weapon ~= unarmed then
sleep = 1
if IsControlJustPressed(0, 25) then
SetFollowVehicleCamViewMode(3)
elseif IsControlJustReleased(0, 25) then
SetFollowVehicleCamViewMode(0)
end
end
Wait(sleep)
end
end)
end
if Config.Options.Bike then
CreateThread(function()
while true do
sleep = 1000
local _, weapon = GetCurrentPedWeapon(PlayerPedId())
local unarmed = `WEAPON_UNARMED`
if IsPedOnAnyBike(PlayerPedId()) and weapon ~= unarmed then
sleep = 1
if IsControlJustPressed(0, 25) then
SetCamViewModeForContext(2, 3)
elseif IsControlJustReleased(0, 25) then
SetCamViewModeForContext(2, 0)
end
else
sleep = 1000
end
Wait(sleep)
end
end)
end