Add resourceName sendback for onResource functions

This commit is contained in:
Jim Shield
2025-07-17 12:47:36 +01:00
parent 9729d2fef1
commit 3911824fc6

View File

@@ -117,7 +117,7 @@ function onResourceStart(func, thisScript)
debugPrint("^6Bridge^7: ^2Shared Load Detected^7.")
hasPrinted = true
end
func()
func(resourceName)
end
end
end)
@@ -136,7 +136,7 @@ function onResourceStop(func, thisScript)
debugPrint("^6Bridge^7: ^2Registering ^3onResourceStop^7()")
AddEventHandler('onResourceStop', function(resourceName)
if getScript() == resourceName and (thisScript or true) then
func()
func(resourceName)
end
end)
end