Fix for capitalised resource names

This commit is contained in:
Dan
2020-03-05 21:49:30 +00:00
parent a02386018b
commit 1e2578c877

View File

@@ -45,10 +45,10 @@ local pairs = pairs
----------------------------------------------------------------------------------]]-- ----------------------------------------------------------------------------------]]--
Citizen.SetTimeout( 1000, function() Citizen.SetTimeout( 1000, function()
-- Get the name of the resource, for example the default name is 'wk_wars2x' -- Get the name of the resource, for example the default name is 'wk_wars2x'
local name = GetCurrentResourceName() local name = string.lower( GetCurrentResourceName() )
-- Print a little message in the client's console -- Print a little message in the client's console
print( "[wk_wars2x]: Sending resource name (" .. name .. ") to JavaScript side." ) print( "[WolfKnight's Wraith ARS 2X]: Sending resource name (" .. name .. ") to JavaScript side." )
-- Send a message through the NUI system to the JavaScript file to give the name of the resource -- Send a message through the NUI system to the JavaScript file to give the name of the resource
SendNUIMessage( { _type = "updatePathName", pathName = name } ) SendNUIMessage( { _type = "updatePathName", pathName = name } )