-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
files { | ||
'visualsettings.dat' | ||
} | ||
|
||
client_script 'client.lua' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
function stringsplit(inputstr, sep) | ||
if sep == nil then | ||
sep = "%s" | ||
end | ||
|
||
local t={} ; i=1 | ||
|
||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do | ||
t[i] = str | ||
i = i + 1 | ||
end | ||
|
||
return t | ||
end | ||
|
||
local function starts_with(str, start) | ||
return str:sub(1, #start) == start | ||
end | ||
|
||
Citizen.CreateThread(function() | ||
local settingsFile = LoadResourceFile(GetCurrentResourceName(), "visualsettings.dat") | ||
|
||
local lines = stringsplit(settingsFile, "\n") | ||
|
||
for k,v in ipairs(lines) do | ||
if not starts_with(v, '#') and not starts_with(v, '//') and (v ~= "" or v ~= " ") and #v > 1 then | ||
v = v:gsub("%s+", " ") | ||
|
||
local setting = stringsplit(v, " ") | ||
|
||
if setting[1] ~= nil and setting[2] ~= nil and tonumber(setting[2]) ~= nil then | ||
if setting[1] ~= 'weather.CycleDuration' then | ||
Citizen.InvokeNative(GetHashKey('SET_VISUAL_SETTING_FLOAT') & 0xFFFFFFFF, setting[1], tonumber(setting[2])) | ||
end | ||
end | ||
end | ||
end | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
car.headlight.day.emissive.on 180.00 | ||
car.headlight.night.emissive.on 105.00 | ||
car.headlight.day.emissive.off 0.000 | ||
car.headlight.night.emissive.off 0.000 | ||
car.taillight.day.emissive.on 200.0 | ||
car.taillight.night.emissive.on 150.0 | ||
car.taillight.day.emissive.off 0.00 | ||
car.taillight.night.emissive.off 0.000 | ||
car.indicator.day.emissive.on 250.00 | ||
car.indicator.night.emissive.on 220.00 | ||
car.indicator.day.emissive.off 0.00 | ||
car.indicator.night.emissive.off 0.000 | ||
car.reversinglight.day.emissive.on 35.00 | ||
car.reversinglight.night.emissive.on 15.00 | ||
car.reversinglight.day.emissive.off 0.000 | ||
car.reversinglight.night.emissive.off 0.000 | ||
car.defaultlight.day.emissive.on 2300.00 | ||
car.defaultlight.night.emissive.on 1500.00 | ||
car.defaultlight.day.emissive.off 0.00 | ||
car.defaultlight.night.emissive.off 0.000 | ||
car.brakelight.day.emissive.on 240.00 | ||
car.brakelight.night.emissive.on 180.00 | ||
car.brakelight.day.emissive.off 0.00 | ||
car.brakelight.night.emissive.off 0.000 | ||
car.middlebrakelight.day.emissive.on 210.00 | ||
car.middlebrakelight.night.emissive.on 160.00 | ||
car.middlebrakelight.day.emissive.off 0.00 | ||
car.middlebrakelight.night.emissive.off 0.000 | ||
car.extralight.day.emissive.on 350.00 | ||
car.extralight.night.emissive.on 160.00 | ||
car.extralight.day.emissive.off 0.000 | ||
car.extralight.night.emissive.off 0.00 | ||
car.emissiveMultiplier 2.00 |