fivem
fivem copied to clipboard
Code execution on resource initialization?
What happened?
I'm not entirely sure if this is intended to happen but you can provide code that executes on server start-up via fxmanifest using pcall (without said resource added to start-up) it also executes when refreshing resources
Expected result
I'm honestly not sure
Reproduction steps
Simple basic resource setup with a fxmanifest
Example code with the "issue" present
function stonky()
print('Hello on refresh resource?')
end
pcall(stonky)
fx_version 'cerulean'
game 'gta5'
Example image of output:
Importancy
Unknown
Area(s)
FiveM, RedM, FXServer, ScRT: Lua
Specific version(s)
Server 7290 windows
Additional information
No response
It's a Lua file, that's expected.
The fxmanifest.lua is the start entry of the script, in which you define information about the script, it is normal that code can be executed