O arquivo vrp-server.js é o arquivo que será encarrecado de realizar as chamadas ao VRP. Porém, além da inclusão do arquivo, você deve alterar o arquivo Proxy.lua da sua base, vai trocar a função chamada addInterface.
function Proxy.addInterface(name,itable)
AddEventHandler(name..":proxy",function(member,args,identifier,rid, JSONJS)
local f = itable[member]
local rets = {}
if JSONJS then
local json = json.decode(JSONJS)
args = json["args"]
if not args then
args={}
end
identifier = json["identifier"]
rid = json["rid"]
end
if type(f) == "function" then
rets = {f(table.unpack(args,1,table.maxn(args)))}
end
if rid >= 0 then
if JSONJS then
rets = table.unpack(rets,1,table.maxn(rets))
rets = json.encode(rets)
end
TriggerEvent(name..":"..identifier..":proxy_res",rid,rets)
end
end)
end
files{
'vrp-server.js'
}
Um exemplo de utilização completo utilizando o fogoadmin. Um script para colocar fogo em um usuário específico da sua base.