Watch your commas. I was able to get the code you provided working by simply adding a single comma. Where you ask? When you add a garage, it needs to have a comma at the end to indicate another garage is in the list, for the most part you had it right, but your bankdriver garage does not have an ending comma to indicate that the final garage BikeToGo is also present. So your code:
Make sure to watch out for this when adding new garages to the end of your list! I don’t see anything with your groups.lua, but I also have not implemented whitelisting, so am not sure if you need a:
is it possible that you could help me out?? seems to have some trouble making the garage into using the cardealer script and remove the garages so you buy there… but so you acctually just get you car from the garage??
Hi, I have a problem, when using the animation to sit, the character hangs in the air for 1 meter. Configuration did not change, but as I understood the problem in the file resources\vrp\client\base.lua
Im hosting a server via Zap Hosting, when i start the server with vRP i get this message ‘‘connection vRP not found’’ and when I join the server vRP doesn’t work. Please help <3
Server stack trace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at (wrapper cominterop) CitizenFX.Core.IScriptHost:OpenHostFile (string)
at (wrapper cominterop-invoke) CitizenFX.Core.IScriptHost:OpenHostFile (string)
at CitizenFX.Core.MonoScriptRuntime+WrapScriptHost.OpenHostFile (System.String fileName) [0x00000] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\MonoScriptRuntime.cs:254
at (wrapper remoting-invoke-with-check) CitizenFX.Core.MonoScriptRuntime+WrapScriptHost:OpenHostFile (string)
at (wrapper xdomain-dispatch) CitizenFX.Core.MonoScriptRuntime+WrapScriptHost:OpenHostFile (object,byte[]&,byte[]&,string)
Exception rethrown at [0]:
at (wrapper xdomain-invoke) CitizenFX.Core.MonoScriptRuntime+WrapScriptHost:OpenHostFile (string)
at CitizenFX.Core.InternalManager.LoadAssembly (System.String name) [0x00000] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\InternalManager.cs:112
[vRP/C#] Load MySQL app.
Instantiated instance of script vRP.MySQL.
Started resource vrp_mysql
Error loading script base.lua in resource vrp: lib/utils.lua:13: bad argument #1 to ‘load’ (function expected, got nil)
stack traceback:
[C]: in function ‘load’
lib/utils.lua:13: in function ‘module’
base.lua:1: in main chunk
Failed to load script base.lua.
Error loading script modules/gui.lua in resource vrp: modules/gui.lua:14: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/gui.lua:14: in main chunk
Failed to load script modules/gui.lua.
Error loading script modules/group.lua in resource vrp: modules/group.lua:15: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/group.lua:15: in main chunk
Failed to load script modules/group.lua.
Error loading script modules/admin.lua in resource vrp: modules/admin.lua:291: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/admin.lua:291: in main chunk
Failed to load script modules/admin.lua.
Error loading script modules/survival.lua in resource vrp: modules/survival.lua:2: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/survival.lua:2: in main chunk
Failed to load script modules/survival.lua.
Error loading script modules/player_state.lua in resource vrp: modules/player_state.lua:2: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/player_state.lua:2: in main chunk
Failed to load script modules/player_state.lua.
Error loading script modules/map.lua in resource vrp: modules/map.lua:10: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/map.lua:10: in main chunk
Failed to load script modules/map.lua.
Error loading script modules/money.lua in resource vrp: modules/money.lua:1: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/money.lua:1: in main chunk
Failed to load script modules/money.lua.
Error loading script modules/inventory.lua in resource vrp: modules/inventory.lua:1: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/inventory.lua:1: in main chunk
Failed to load script modules/inventory.lua.
Error loading script modules/identity.lua in resource vrp: modules/identity.lua:4: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/identity.lua:4: in main chunk
Failed to load script modules/identity.lua.
Error loading script modules/business.lua in resource vrp: modules/business.lua:6: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/business.lua:6: in main chunk
Failed to load script modules/business.lua.
Error loading script modules/item_transformer.lua in resource vrp: modules/item_transformer.lua:8: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/item_transformer.lua:8: in main chunk
Failed to load script modules/item_transformer.lua.
Error loading script modules/emotes.lua in resource vrp: modules/emotes.lua:5: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/emotes.lua:5: in main chunk
Failed to load script modules/emotes.lua.
Error loading script modules/police.lua in resource vrp: modules/police.lua:3: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/police.lua:3: in main chunk
Failed to load script modules/police.lua.
Error loading script modules/home.lua in resource vrp: modules/home.lua:4: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/home.lua:4: in main chunk
Failed to load script modules/home.lua.
Error loading script modules/home_components.lua in resource vrp: modules/home_components.lua:3: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/home_components.lua:3: in main chunk
Failed to load script modules/home_components.lua.
Error loading script modules/mission.lua in resource vrp: modules/mission.lua:3: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/mission.lua:3: in main chunk
Failed to load script modules/mission.lua.
Error loading script modules/aptitude.lua in resource vrp: modules/aptitude.lua:5: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/aptitude.lua:5: in main chunk
Failed to load script modules/aptitude.lua.
Error loading script modules/basic_phone.lua in resource vrp: modules/basic_phone.lua:4: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/basic_phone.lua:4: in main chunk
Failed to load script modules/basic_phone.lua.
Error loading script modules/basic_atm.lua in resource vrp: modules/basic_atm.lua:4: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/basic_atm.lua:4: in main chunk
Failed to load script modules/basic_atm.lua.
Error loading script modules/basic_market.lua in resource vrp: modules/basic_market.lua:3: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/basic_market.lua:3: in main chunk
Failed to load script modules/basic_market.lua.
Error loading script modules/basic_gunshop.lua in resource vrp: modules/basic_gunshop.lua:4: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/basic_gunshop.lua:4: in main chunk
Failed to load script modules/basic_gunshop.lua.
Error loading script modules/basic_garage.lua in resource vrp: modules/basic_garage.lua:4: attempt to index a nil value (global ‘MySQL’)
stack traceback:
modules/basic_garage.lua:4: in main chunk
Failed to load script modules/basic_garage.lua.
Error loading script modules/basic_items.lua in resource vrp: modules/basic_items.lua:5: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/basic_items.lua:5: in main chunk
Failed to load script modules/basic_items.lua.
Error loading script modules/basic_skinshop.lua in resource vrp: modules/basic_skinshop.lua:4: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/basic_skinshop.lua:4: in main chunk
Failed to load script modules/basic_skinshop.lua.
Error loading script modules/cloakroom.lua in resource vrp: modules/cloakroom.lua:3: attempt to index a nil value (global ‘vRP’)
stack traceback:
modules/cloakroom.lua:3: in main chunk
Failed to load script modules/cloakroom.lua.
Hello! I have a problem when some player is take wanted level, not coming police notifycation have point in map, just problem with notify. I changed police.lua files to standart but still not working. Help pleace.
Hi everyone,
Important announcement for vRP developers:
I’m refactoring the vRP API to “unleash the true power of Lua” (since NeoLua is gone), this will break every scripts using Proxy or Tunnel. For now, changes are made in the vrpex branch, basic missions and TCG have this branch too, but it should be soon merged into the fxserver branch. Take a look at it to understand the changes, I will also rewrite the vRP doc.
Features:
Proxy calls will look like normal calls
Tunnel calls will look like normal calls with the player/source as first argument (sequential, no more callback hell)
no more specific client lib, extensions will directly load Proxy and Tunnel using the module function defined by lib/utils
This means that asynchronous functions will now be defined using async(), making, for example, MySQL queries synchronous-like. This simplify a lot the code, but requires more understanding for special cases.
You can try the vrpex version to help find issues, but do a database backup before using it.
The game already includes Citizen.Await and a copy of GitHub - zserge/lua-promises: A+ promises in Lua since a pull request by @Brouznouf, these are fully aware of the game’s scheduler unlike a naive coroutine implementation, and are both used by the built-in RPC system as well as (a testing version of?) @Brouznouf’s mysql-async resource.
Therefore, it’s hard to see why you’re trying to reimplement built-in game subsystems yourself for a refactor instead of relying on FiveM’s built-in client<->server RPC (pass a callback in an event argument, and you can save it and call it on client and server transparently with coroutine-like behavior - you can even send a whole API along in a single table on join if that’s what you prefer) and scheduler system.
@element.86 I saw that in the code of the scheduler, but couldn’t find any documentation about it. Thanks for the infos, I just don’t understand the promise system. I also wasn’t aware that callbacks were “proxied” to the clients, I assume that they are based on TriggerEvent ?