Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/juliuswadskov/vrp-lib

vRP Library with callback included
https://github.com/juliuswadskov/vrp-lib

Last synced: about 1 month ago
JSON representation

vRP Library with callback included

Awesome Lists containing this project

README

        

# vrp-lib
vRP Library with callback included

## Add this to your fxmanifest.lua
```lua
client_scripts {
"lib/Proxy.lua",
"lib/Tunnel.lua",
"lib/callback/client.lua"
}

server_scripts {
"@vrp/lib/utils.lua",
"lib/callback/server.lua"
}
```

## To use the callback
### Client
```lua
TriggerServerCallback('test', {'hey'}, function(bool)
if bool then
print('works')
end
end)
```

### Server
```lua
RegisterServerCallback('test', function(source, cb, arg2)
print(arg2)
cb(true)
end)
```