qbcore-framework / qb-core

FiveM RP Framework Core :muscle:
GNU General Public License v3.0
582 stars 962 forks source link

Remote procedure call #1056

Closed makaman59 closed 7 months ago

makaman59 commented 9 months ago

Description

It allows you to call methods on remote side and receive return values Registers new method that can be called from remote side. Retrieving values will become easier and faster

for example:

client side

function test()
    local account = QBCore.Functions.TriggerRpc("qb-test:server:test1")
    print(json.encode(account))
end

server side

QBCore.Functions.CreateCallback('qb-test:server:test1', function(source, cb)
    cb('all value run')
end)

Checklist

github-actions[bot] commented 7 months ago

This PR has had 60 days of inactivity & will close within 7 days