Skip to content

fx resources read/write permission #3832

@Jeromebro06

Description

@Jeromebro06

What happened?

its not possible with load / save resorucefile to edit the fxmanifest of the fx resoruces (monitor, yarn, webpack, chat)
if anticheats try to add a shared lua to them have no perms but it is important that works to prevent game injections from cheats etc. a lot of cheats inject code directly into runtime and execute own code in client resources.

Expected result

read / write permissions for fx resources

Reproduction steps

local function installAntiInjection()
    local directive = ('shared_script "@%s/shared.lua"'):format(GetCurrentResourceName())
    
    local content = LoadResourceFile("monitor", "fxmanifest.lua")
    if not content then return print("^1[AntiInjection] fxmanifest.lua not found ^0") end
    
    if content:find(directive, 1, true) then
        return print("^3[AntiInjection] Already installed ^0")
    end
    
    SaveResourceFile("monitor", "fxmanifest.lua", directive .. "\n" .. content, -1)
    print("^2[AntiInjection] Installed successfully ^0")
end

-- error: directory not found (for all fx resources)

Importancy

Unknown

Area(s)

FXServer

Specific version(s)

FiveM 25987 and higher (newest server builds)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions