[vRP] Script collection (vrp_hud_inventory, vrp_cards, vrp_business ...)

Hello, I’d like to release some scripts I made in the past that were used on my vRP server.

You can find all of them on my GitHub profile, I’ll link them individually below. Some more scripts will be added as I translate and fix them up.

I tested them on a standard vRP server and they work fine. If you face any problem, please read the installation instructions again, maybe you missed some steps. If you face any script related problem, please open a new issue on GitHub. If you want to improve the english translation, fix or improve something, feel free to by opening a pull request.

Thanks

vRP Cards: GitHub - CPietro/vRP_cards: With this script you can use a debit card (which is an item) to make purchases or pay people. It's even possible to steal another player's card and use it to make buy something on your own, even if the owner is offline. To avoid fraudolent use of the cards you have to approve every transaction with your very own PIN that you can change in the menu. Criminals can also get a bruteforcing machine, that will enable them to gather the code for any card they stole, so be very careful! By default there is a blip at the Pacific Standard Bank where players can get a card contract, but it's even possible to set up the bank as a business, then you can roleplay as a bank teller and issue players their card, or even deposit and withdraw cash for them! The script is also complete with a transaction tracking feature, that you can use wherever you want to track where and how everyone spends their money! There is even a POS terminal at every vRP market and at every player owned business, so the card will be usable everywhere!
vRP Company Bank Accounts: GitHub - CPietro/vRP_companyaccs: Simple script to provide bank accounts to vRP_business. It's possible to get paid by people, deposit money in the company's bank account, transfer it from the personal account to the business' one and the other way around. You'll also gain interest from the money in the account. A PIN that only the owner can change is there to prevent employees to steal. For public departments bosses there is a special blip in the map to gain access to their department bank account, this may be useful for the head of the police department. It'll have to be used only once.
vRP Items: GitHub - CPietro/vRP_items: With this script it's possible to create custom vRP items, such as driving licenses, bank cards, firearms licenses and so on by signing a simple contract.
vRP Business: GitHub - CPietro/vRP_business: With this script you can set up businesses which will be owned by players. You can buy a company, hire people, fire them and even sell the company. Since this script has vRP_companyaccs as a dependency, each business will also have a bank account to store their money in, and it'll also grow over time thanks to interest rates (which can be set upon your liking!). Each company has their indipendent permission, so you can create missions or menus to do stuff for them. For example a dealership where only employees can buy cars, a gun store or a bank.

vRP Hud Inventory: GitHub - CPietro/vrp_hud_inventory: Basic vRP script that provides an HUD type inventory instead of a menu one.
Image

9 Likes

Nice, glad to see vrp getting some well deserved releases. Is this for dunkos version or vrp2?

dunkos version

Very nice releases! Well done!

1 Like

Nice work!

Respect Bro. Checking it out now!

anyone familiar with esx to vrp conversion? I have something very, very nice for the community if so. feel free to message me

I can do it, what are you thinking about?

Added new hud inventory script for Dunko’s vRP v1. Repo link in the first post.

Hello, vrp_hud_inventory supports trunks and shops? i wasnt able to make it work with neither of them

1 Like

Yes, it does. You need to use the openchest function.

can u explain furder how to do it?

Take a look at the example below

--source -> player source
--name -> vehicle name or something like that
--chestname -> the chest's key in the database (the one below should work for vehicles)
--max_weight -> this is self explanatory

local chestname = "u"..user_id.."veh_"..string.lower(name)
vRPin.openChest({source, name, chestname, max_weight})

Im sorry but im not understanding, am i supposed to add those lines to the main.lua file to make it work? and after thats done how does it show on the game?

You need to edit the script you use to manage trunks.

My base is Dunkovrp so Ive been using the default inventory which is in the menu, so I need to make changes on vrp\modules\inventory.lua?
I also realised that equiping bullets makes another window pop freezing the inventory, is this something that i can fix in the same file?

You can open the inventory with the F3. You could add a button to your menu, but that’s up to your preference. To open a vehicle trunk I use the code below. It may or may not work for you, take it as an example.

--vrp/modules/basic_garage.lua
veh_actions[lang.vehicle.trunk.title()] = {function(user_id,player,vtype,name)
  local chestname = "u"..user_id.."veh_"..string.lower(name)
  local max_weight = cfg_inventory.vehicle_chest_weights[string.lower(name)] or cfg_inventory.default_vehicle_chest_weight
  vRPclient.vc_openDoor(player, {vtype,5})
  vRPin.openChest({player, name, chestname, max_weight, function() 
    vRPclient.vc_closeDoor(player, {vtype,5})
  end})
end, lang.vehicle.trunk.description()}

I’ll take a look, I don’t remember having issues like that.

is there a default button to open the trunk or i need to set one?

I always used the Trunk button in the Vehicle menu.

1 Like

ok, I ll try that