Fixed UI settings not reloading on resource restart

This commit is contained in:
Dan
2021-01-07 10:52:30 +00:00
parent a166dda1cb
commit cc89d4c72a
2 changed files with 6 additions and 6 deletions

View File

@@ -31,7 +31,6 @@
---------------------------------------------------------------------------------------]]--
UTIL = {}
UTIL.resourceName = ""
-- Returns a number to a set number of decimal places
function UTIL:Round( num, numDecimalPlaces )
@@ -150,9 +149,8 @@ function UTIL:DrawDebugText( x, y, scale, centre, text )
DrawText( x, y )
end
Citizen.CreateThread( function() UTIL.resourceName = GetCurrentResourceName() end )
function UTIL:IsResourceNameValid()
return self.resourceName == "wk_wars2x"
return GetCurrentResourceName() == "wk_wars2x"
end
--[[The MIT License (MIT)