Custom framework
Everything that depends on the framework is in functions.lua, which is open. The top part runs on the server and the bottom part on the client.
With Config.Framework = "auto" and Config.Inventario = "auto" the script figures it out and prints on start something like base: qb · inventário: ox · idioma: en.
What each framework does
| Topic | vRP | ESX | QBCore | QBox |
|---|---|---|---|---|
Who the player is (Gui.UserId) | user_id | identifier | citizenid | citizenid |
| Name | vRP identity | xPlayer.getName() | charinfo | charinfo |
| Permission | vRP.hasPermission | group in Config.gruposAdmin | framework HasPermission | HasPermission / ace group.* |
| Cash prize | vRP.giveMoney | addAccountMoney (money/bank) | AddMoney (cash/bank) | qbx_core AddMoney |
| Full hunger and thirst | setHunger/setThirst (or upgrade/downgrade) | esx_status | metadata hunger/thirst | metadata hunger/thirst |
| Revive on respawn and on exit | native revive + framework events | native + esx_ambulancejob:revive | native + hospital:client:Revive | native + hospital:client:Revive / qbx_medical |
| Death checked on the server | health | health | health or laststand/isdead | health or laststand/isdead |
| Event vehicle keys | not needed | not needed | vehiclekeys:client:SetOwner | qbx_vehiclekeys |
| Event vehicle fuel | engine:tryFuel | fuel state bag | fuel state bag | fuel state bag |
Also recognized:
wasabi_ambulance: its revive event is called too.qs-vehiclekeysandwasabi_carlock: for vehicle keys.
Inventory: see Inventories.