Skip to content

New RPC functions #43

Open
Open
@Disinterpreter

Description

@Disinterpreter

Is your feature request related to a problem? Please describe.
If you check out my #41 you can see, I use triggers, because the current RPC system is really weird.

Describe the solution you'd like
I'd like to suggest make a new RPC system it will better, simple and it will contains documentation.

Additional context

Current realization:

amx/amx/server/util.lua

Lines 44 to 50 in dd50399

function clientCall(player, fnName, ...)
local called = triggerClientEvent(player, 'onClientCall', resourceRoot, fnName, ...)
if called == nil or called == false then
called = false --if it's null set it to false to prevent stuff like 'concatenating nil values'
end
return called
end

amx/amx/client/util.lua

Lines 55 to 63 in dd50399

server = setmetatable(
{},
{
__index = function(self, k)
self[k] = function(...) triggerServerEvent('onCall', resourceRoot, k, ...) end
return self[k]
end
}
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions