This repository was archived by the owner on Dec 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Only Full Auto Mode
Christopher M edited this page Apr 30, 2020
·
2 revisions
-
Open your
client.luafile -
Find these lines near the top of the file:
-- These weapons will have their reticle enabled
Config.Weapons.Reticle = {
'WEAPON_SNIPERRIFLE',
'WEAPON_HEAVYSNIPER',
'WEAPON_HEAVYSNIPER_MK2',
'WEAPON_MARKSMANRIFLE',
'WEAPON_MARKSMANRIFLE_MK2',
'WEAPON_STUNGUN'
}- Add these lines below the above lines, and add the weapons you want to have only safety and full auto modes:
Config.Weapons.Custom = {
}- Find these lines near the middle of the file:
-- If weapon was not found in full auto loop
if not Active then
-- Loop though all the weapons that require a reticle
for _, Weapon in ipairs(Config.Weapons.Reticle) do
-- If weapon is in list
if GetHashKey(Weapon) == PedWeapon then
-- Set weapon type to full
Active = 'reticle'
break
end
end
end- Add these lines below the above lines:
if not Active then
for _, Weapon in ipairs(Config.Weapons.Custom) do
if GetHashKey(Weapon) == PedWeapon then
Active = 'custom'
break
end
end
end- Find these lines near the middle of the file:
if Active == 'full' then
if FireMode.Weapons[PedWeapon] <= 2 then
...
elseif FireMode.Weapons[PedWeapon] >= 3 then
...
end
else
if FireMode.Weapons[PedWeapon] == 0 then
...
elseif FireMode.Weapons[PedWeapon] >= 1 then
...
end
end- Replace those lines with these lines:
if Active == 'full' then
if FireMode.Weapons[PedWeapon] <= 2 then
if FireMode.Weapons[PedWeapon] == 0 then
NewNUIMessage('NewMode', 'single')
elseif FireMode.Weapons[PedWeapon] == 1 then
NewNUIMessage('NewMode', 'burst')
elseif FireMode.Weapons[PedWeapon] == 2 then
NewNUIMessage('NewMode', 'full_auto')
end
PlaySoundFrontend(-1, 'Faster_Click', 'RESPAWN_ONLINE_SOUNDSET', 1)
FireMode.Weapons[PedWeapon] = FireMode.Weapons[PedWeapon] + 1
elseif FireMode.Weapons[PedWeapon] >= 3 then
NewNUIMessage('NewMode', 'safety')
PlaySoundFrontend(-1, 'Reset_Prop_Position', 'DLC_Dmod_Prop_Editor_Sounds', 0)
FireMode.Weapons[PedWeapon] = 0
end
elseif Active == 'custom' then
if FireMode.Weapons[PedWeapon] == 0 then
NewNUIMessage('NewMode', 'full_auto')
PlaySoundFrontend(-1, 'Reset_Prop_Position', 'DLC_Dmod_Prop_Editor_Sounds', 0)
FireMode.Weapons[PedWeapon] = 3
elseif FireMode.Weapons[PedWeapon] >= 1 then
NewNUIMessage('NewMode', 'safety')
PlaySoundFrontend(-1, 'Faster_Click', 'RESPAWN_ONLINE_SOUNDSET', 1)
FireMode.Weapons[PedWeapon] = 0
end
else
if FireMode.Weapons[PedWeapon] == 0 then
NewNUIMessage('NewMode', 'single')
PlaySoundFrontend(-1, 'Reset_Prop_Position', 'DLC_Dmod_Prop_Editor_Sounds', 0)
FireMode.Weapons[PedWeapon] = FireMode.Weapons[PedWeapon] + 1
elseif FireMode.Weapons[PedWeapon] >= 1 then
NewNUIMessage('NewMode', 'safety')
PlaySoundFrontend(-1, 'Faster_Click', 'RESPAWN_ONLINE_SOUNDSET', 1)
FireMode.Weapons[PedWeapon] = 0
end
end- Save and close the file, restart your server, and enjoy.
If you have any troubles, suggestions, feedback, etc, please check the Wiki, create a new issue, and/or contact us on Discord.