[Release] vRP Framework

Hello. I have a problem with relocated hidden items.
52460 - 5 days
When i put only 5, they not relocate.
What value should it be to put on for 1 hour? Thanks.

Guys im really trying my best at coding but i cant find a way to apply wanted level to player onstart of using item transformer. I would greatly appreciate any help. Here is my code , it calls a nill value and dont give wanted level.

{
    name="Химик со стажем", -- menu name
    r=255,g=125,b=0, -- color
    max_units=5,
    units_per_minute=0.03,
    x=1442.6923828125,y=6331.84912109375,z=22.9818935394287,
    radius=7.5, height=1.5, -- area
    recipes = {
      ["Взять урок"] = { -- action name
        description="Хоть он и выглядит как бомж(а пахнет еще хуже),но кое чему научить может.Придется дать ему выпить и закусить,чтоб вспомнил о науке.", -- action description
        in_money=500, -- money taken per unit
        out_money=0, -- money earned per unit
        reagents={
		["spirt"] = 1,
		["bread"] = 1
		}, -- items taken per unit
        products={}, -- items given per unit
        aptitudes={ -- optional
          ["science.chemicals"] = 1 -- "group.aptitude", give 1 exp per unit
        }		
      }
    },
	onstart = function(player,recipe) tvRP.applyWantedLevel(3)
    end,
    -- onstep = function(player,recipe) end, -- optional step callback
    -- onstop = function(player,recipe) end -- optional stop callback
  }

By the way @Imagic , thanks alot for such a great framework for RP - servers !

1 Like

for me its not a valid path but i can’t find it either in the directories inside vrp.

Are you sure about the name of the lua ?

i’ll start looking inside everything

-- WANTED

-- wanted level sync
local wanted_level = 0

function tvRP.applyWantedLevel(new_wanted)
  Citizen.CreateThread(function()
    local old_wanted = GetPlayerWantedLevel(PlayerId())
    local wanted = math.max(old_wanted,new_wanted)
    ClearPlayerWantedLevel(PlayerId())
    SetPlayerWantedLevelNow(PlayerId(),false)
    Citizen.Wait(10)
    SetPlayerWantedLevel(PlayerId(),wanted,false)
    SetPlayerWantedLevelNow(PlayerId(),false)
  end)
end

client/police.lua

that seem to be exactly that… do you have a suggestion of what to change ? a zero for a one ? :slight_smile: that cant be that easy

This is the original code to trigger the “Wanted level”, but I honestly do not know how to tie to a trigger so that when I press (trigger trigger) in the game it would work, as with the hijacking.

As asked earlier. Since i updated vRP all my resources using the API doenst work anymore? It doesnt give me any errors or something like that? It loads fine, and prints in the console when i say so, but as soon as i use a vRP function like vRP.getUserId() then nothing happens.

Really hope you can help :slight_smile: Delayed my server update for 2-3 days now.

local Proxy = require("resources/vrp/lib/Proxy")

vRP = Proxy.getInterface("vRP")

-- SERVER EVENT: CHECK IF POLICE
RegisterServerEvent('checkIfPolice')
AddEventHandler('checkIfPolice', function()
	print("Check if police run")
	vRP.getUserId({source}, function(user_id)
		print("UserID: ".. user_id) -- Not being printed when inside vRP function??
		vRP.hasGroup({user_id, "police"}, function(isPolice)
			if isPolice then
				TriggerClientEvent("playerIsPoliceEvent", source)
			end
		end)
	end)
end)

So is there a ETA for vRP to work with FXServer, like 2 weeks, 5 months, it is only a dream?
I know this is done on the freetime. But good to know what the plan is :slight_smile:
Also I plan to try and help with the FXServer port :slight_smile:

keep up with things in the discord much easier or check the github and make comits there. and yes magic has begun to port for fx.

Anyone can help me pls getting tvRP interface? :pray: Thanks :slight_smile:

@Kevin_Hansen Proxy doesn’t use callbacks anymore, values are directly returned.

Got this all loaded and working great! Except for the only color of hairstyles offered are green? Any idea?

So, it was painful, but now vRP has a working FXServer version.

https://github.com/ImagicTheCat/vRP/tree/fxserver

Since a lot of things have changed, vrp extensions and custom code could break. Issues are expected too, see this as a beta. Backup your DB before using it, a major potential unstable change is the MySQL sync to async.

7 Likes

Is anyone’s money working? The code is there but no one gets paid. Is there a fix?

By money you mean paychecks ?

Great stuff Imagic, nice to see this project grows. I am making good roleplay mode on your platform and i have great ideas, so i have one question.
Is it possible to make limited job slots, example ( only 5 people can take taxi job ). ? Thanks anyways.

the getinterface works like old vrp ?
i’m triyng to use basic_mission but its trigger erro about proxy and other require

I’m trying to convert FRFuel to vRP, but i’m having some troubles with tvRP.appyWantedLevel(x). I tried almost everything and i couldn’t get it working :confused:


That is my error:


And these are the codes:
price.lua

__resource.lua

Thanks :slight_smile:

1 Like

@nax0r Everything is possible if you code it using the static menus.

@Psychorustle fxserver branch

i’m waiting updates, thanks for great work dude