From a0ef45c60d5044176f4a1e4ff2b66f8df8a34aed Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 5 Nov 2020 11:51:51 +0000 Subject: [PATCH] Remove dynamic resource naming --- cl_radar.lua | 15 --------------- nui/radar.js | 6 +----- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/cl_radar.lua b/cl_radar.lua index 4598020..8b95cfc 100644 --- a/cl_radar.lua +++ b/cl_radar.lua @@ -39,21 +39,6 @@ local tostring = tostring local math = math local pairs = pairs ---[[---------------------------------------------------------------------------------- - Resource Rename Fix - for those muppets who rename the resource and - complain that the NUI aspect doesn't work! -----------------------------------------------------------------------------------]]-- -Citizen.SetTimeout( 1000, function() - -- Get the name of the resource, for example the default name is 'wk_wars2x' - local name = string.lower( GetCurrentResourceName() ) - - -- Print a little message in the client's console - UTIL:Log( "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 - SendNUIMessage( { _type = "updatePathName", pathName = name } ) -end ) - --[[---------------------------------------------------------------------------------- UI loading trigger diff --git a/nui/radar.js b/nui/radar.js index f1210cf..808e9be 100644 --- a/nui/radar.js +++ b/nui/radar.js @@ -33,7 +33,6 @@ /*------------------------------------------------------------------------------------ Variables ------------------------------------------------------------------------------------*/ -var resourceName; var uiEdited = false; // All of the audio file names @@ -629,7 +628,7 @@ $.ajaxSetup({ // This function is used to send data back through to the LUA side function sendData( name, data ) { - $.post( "https://" + resourceName + "/" + name, JSON.stringify( data ), function( datab ) { + $.post( "https://wk_wars2x/" + name, JSON.stringify( data ), function( datab ) { if ( datab != "ok" ) { console.log( datab ); } @@ -1077,9 +1076,6 @@ window.addEventListener( "message", function( event ) { switch ( type ) { // System events - case "updatePathName": - resourceName = item.pathName - break; case "loadUiSettings": loadUiSettings( item.data, true ); break;