[Release] vRP Framework

ive added los santos customs too our server and i would like too limit it only for lets say ppl with permission = “towing.service” is it possible and how so

1 Like

Anyone have an issue with placing multiple transformers? I had the weedfield, trevor’s house(to buy weed), meth lab(make) and buys around sandy(All worked for a few hours). HOWEVER, I added a jail location at the prison and started adding markers and blips and now I am not able to have more than 2 transformers at a time? It seems to be that the weedfield stays indefinitely, but it will switch between Trevor and the Meth lab depending on which code block is placed first in the file… any ideas…? Doubt that it has anything to do with the markers and blips, but that is what I was messing with when I restarted and the transformers had broken… :confused:

`cfg.item_transformers = {
  -- example of harvest item transformer
  {
    name="Bill and Dave's Farm", -- menu name
    -- permission = "harvest.water_bottle", -- you can add a permission
    r=0,g=125,b=255, -- color
    max_units=10,
    units_per_minute=5,
    x=2224.05029296875,y=5577.7861328125,53,z=53.7328758239746, -- pos
    radius=5, height=1.5, -- area
    action="Harvest", -- action name
    description="Wanna help trim some buds? We'll toss ya some green both ways ;) Take it back to Trevor in Sandy Shores for some more cash!", -- action description
    in_money=0, -- money taken per unit
    out_money=50, -- money earned per unit
    reagents={}, -- items taken per unit
    products={ -- items given per unit
      ["weed"] = 1
    }
  }
}

-- define transformers randomly placed on the map
cfg.hidden_transformers = {
  ["weed field"] = {
    def = {
      name="Bill and Dave's Farm", -- menu name
      -- permission = "harvest.water_bottle", -- you can add a permission
      r=0,g=200,b=0, -- color
      max_units=30,
      units_per_minute=1,
      x=0,y=0,z=0, -- pos
      radius=5, height=1.5, -- area
      action="Harvest", -- action name
      description="Wanna help trim some buds? We'll toss ya some green both ways ;) Take it back to Trevor in Sandy Shores for some more cash!", -- action description
      in_money=0, -- money taken per unit
      out_money=50, -- money earned per unit
      reagents={}, -- items taken per unit
      products={ -- items given per unit
        ["weed"] = 1
      }
    },
    positions = {
      {1873.36901855469,3658.46215820313,33.8029747009277},
      {1856.33776855469,3635.12109375,34.1897926330566},
      {1830.75390625,3621.44140625,33.8487205505371}
    }
  }
}

-- time in minutes before hidden transformers are relocated (min is 5 minutes)
cfg.hidden_transformer_duration = 5*24*60 -- 5 days

-- configure the information reseller (can sell hidden transformers positions)
cfg.informer = {
  infos = {
    ["weed field"] = 3000
  },
  positions = {
    {1821.12390136719,3685.9736328125,34.2769317626953},
    {1804.2958984375,3684.12280273438,34.217945098877}
  },
  interval = 2, -- interval in minutes for the reseller respawn
  duration = 100, -- duration in minutes of the spawned reseller
  blipid = 133,
  blipcolor = 2
}

cfg.item_transformers = {
  -- example of harvest item transformer
  {
    name="Trevor", -- menu name
    -- permission = "harvest.water_bottle", -- you can add a permission
    r=0,g=125,b=255, -- color
    max_units=50,
    units_per_minute=5,
    x=1972.6060,y=3817.0440,z=33.4363, -- pos
    radius=5, height=1.5, -- area
    action="Sell Trevor weed.", -- action name
    description="WOOO-WEEE that smells like some dankity dank! Here, take the money and get the hell of my porch before someone sees you!", -- action description
    in_money=0, -- money taken per unit
    out_money=250, -- money earned per unit
    reagents={
	  ["weed"] = 1}, -- items taken per unit
    products={ -- items given per unit
    }
  }
}

cfg.item_transformers = {
  -- example of harvest item transformer
  {
    name="Meth Lab", -- menu name
    -- permission = "harvest.water_bottle", -- you can add a permission
    r=0,g=0,b=255, -- color
    max_units=10,
    units_per_minute=5,
    x=1390.90356445313,y=3604.98876953125,z=39.5187873840332, -- pos
    radius=5, height=1.5, -- area
    action="Make Meth", -- action name
    description="Cook up some crank! You can make meth by using 2 pills and 1 water bottle. You can sell this to people in SandyShores, or you can be a bit risky and drive up to grapeseed and get a little more cash!", -- action description
    in_money=0, -- money taken per unit
    out_money=0, -- money earned per unit
    reagents={
	  ["water"] = 1,
	  ["pills"] = 2}, -- items taken per unit
    products={ -- items given per unit
      ["meth"] = 1
    }
  }
}

return cfg
`

*Also I know I have 2 of the same fields jsut different transformer variants, otherwise it was doing this thing where even though i had the stock trans. set to the in game weedfield, it would set a gps out infront of SSPD… 0.o

Hi. I think you should post the issue in github :wink: https://github.com/ImagicTheCat/vRP/issues

Sry, bad speak eng. Like this

`cfg.item_transformers = {
  -- example of harvest item transformer
  {
    name="Bill and Dave's Farm", -- menu name
    -- permission = "harvest.water_bottle", -- you can add a permission
    r=0,g=125,b=255, -- color
    max_units=10,
    units_per_minute=5,
    x=2224.05029296875,y=5577.7861328125,53,z=53.7328758239746, -- pos
    radius=5, height=1.5, -- area
    action="Harvest", -- action name
    description="Wanna help trim some buds? We'll toss ya some green both ways ;) Take it back to Trevor in Sandy Shores for some more cash!", -- action description
    in_money=0, -- money taken per unit
    out_money=50, -- money earned per unit
    reagents={}, -- items taken per unit
    products={ -- items given per unit
      ["weed"] = 1
    }
  },
  {
    name="Trevor", -- menu name
    -- permission = "harvest.water_bottle", -- you can add a permission
    r=0,g=125,b=255, -- color
    max_units=50,
    units_per_minute=5,
    x=1972.6060,y=3817.0440,z=33.4363, -- pos
    radius=5, height=1.5, -- area
    action="Sell Trevor weed.", -- action name
    description="WOOO-WEEE that smells like some dankity dank! Here, take the money and get the hell of my porch before someone sees you!", -- action description
    in_money=0, -- money taken per unit
    out_money=250, -- money earned per unit
    reagents={
      ["weed"] = 1}, -- items taken per unit
    products={ -- items given per unit
    }
  },
  {
    name="Meth Lab", -- menu name
    -- permission = "harvest.water_bottle", -- you can add a permission
    r=0,g=0,b=255, -- color
    max_units=10,
    units_per_minute=5,
    x=1390.90356445313,y=3604.98876953125,z=39.5187873840332, -- pos
    radius=5, height=1.5, -- area
    action="Make Meth", -- action name
    description="Cook up some crank! You can make meth by using 2 pills and 1 water bottle. You can sell this to people in SandyShores, or you can be a bit risky and drive up to grapeseed and get a little more cash!", -- action description
    in_money=0, -- money taken per unit
    out_money=0, -- money earned per unit
    reagents={
      ["water"] = 1,
      ["pills"] = 2}, -- items taken per unit
    products={ -- items given per unit
      ["meth"] = 1
    }
  }

}

-- define transformers randomly placed on the map
cfg.hidden_transformers = {
  ["weed field"] = {
    def = {
      name="Bill and Dave's Farm", -- menu name
      -- permission = "harvest.water_bottle", -- you can add a permission
      r=0,g=200,b=0, -- color
      max_units=30,
      units_per_minute=1,
      x=0,y=0,z=0, -- pos
      radius=5, height=1.5, -- area
      action="Harvest", -- action name
      description="Wanna help trim some buds? We'll toss ya some green both ways ;) Take it back to Trevor in Sandy Shores for some more cash!", -- action description
      in_money=0, -- money taken per unit
      out_money=50, -- money earned per unit
      reagents={}, -- items taken per unit
      products={ -- items given per unit
        ["weed"] = 1
      }
    },
    positions = {
      {1873.36901855469,3658.46215820313,33.8029747009277},
      {1856.33776855469,3635.12109375,34.1897926330566},
      {1830.75390625,3621.44140625,33.8487205505371}
    }
  }
}

-- time in minutes before hidden transformers are relocated (min is 5 minutes)
cfg.hidden_transformer_duration = 5*24*60 -- 5 days

-- configure the information reseller (can sell hidden transformers positions)
cfg.informer = {
  infos = {
    ["weed field"] = 3000
  },
  positions = {
    {1821.12390136719,3685.9736328125,34.2769317626953},
    {1804.2958984375,3684.12280273438,34.217945098877}
  },
  interval = 2, -- interval in minutes for the reseller respawn
  duration = 100, -- duration in minutes of the spawned reseller
  blipid = 133,
  blipcolor = 2
}

return cfg
`
1 Like

NVM i realized what was wrong, thank you!

Thank you, merci, gracias, It works. i feel like a dip shit, like really, just not ordered right 0.o

I can’t get this to work:

Server startup errors, and tunnel errors for client every ~60 seconds. It’s not creating the MySQL tables either. Using mono 4.8.1 on a fresh install.

I’ve encountered an issue where people on my server are unable to drink, or eat.

Just remember that if something is if the same type (food, cloakroom, item transformers etc) they belong in the same array. Glad you fixed it!

Doesn’t look like a database connection issue since otherwise you’d get an error regarding base.lua

Are you using any other resources apart from vRP?

can someone fix the error that is No defined conversion from MYSQL to MYSQL connection?

Nope. Fresh install. I didn’t see any list of dependencies. Do I need any other mods to support this?

Thanks for this awesome framework.
I have one question: is there a way to add players to groups such as admins, policemen,emergency via “rcon”?
Otherwise, how can I do it even via MySql?.
Thank you!

@Nickatana Admin menu, you need the @Add group, @Remove group permissions (given to “superadmin” by default).

For some reason I’m not admin on my own server, that’s why I’m asking ^^
How can I put myself as superadmin if I can’t acces in-game admin settings?

I have an issue where people are unable to drink and eat, however others are.

If i wanted to add a police garage, could i just change for example the helicopter garage at the bottom the garage.cfg file? and then add it in like i did the boats? when I tried this i had gotten a bunch of errors. is there somewhere that I have to define the police garage first? such as sportsclassics, sports, etc.?

did you add the permission?

garage.lua

["Policia"]  = {
    _config = {vtype="car",permission="police.garage"},
    ["police"] = {"GC Insignia", 50, ""},
    ["sheriff"] = {"GC Ford Mondeo", 50, ""},
	["pbus"] = {"GC Bus", 50, ""},
  },

groups.lua

["Policia"] = {
    _config = { 
      gtype = "job",
      onjoin = function(player) vRPclient.setCop(player,{true}) end,
      onspawn = function(player) vRPclient.setCop(player,{true}) end,
      onleave = function(player) vRPclient.setCop(player,{false}) end
    },
    "police.cloakroom",
    "police.pc",
    "police.handcuff",
    "police.putinveh",
    "police.check",
    "police.service",
    "police.wanted",
    "police.seize.weapons",
    "police.seize.items",
    "police.jail",
    "police.fine",
	"police.garage",
	"police.gun"
  },

check commas too

I wasnt worried about the permission just yet. im just trying to get it to appear on the map and in the world. I changed the boat docks from uncommented and just added

  
    ["boats"]  = {
    _config = {vtype="boat",blipid=356,blipcolor=4},
	["seashark"] = {"JetSki",2500,""},
    ["dinghy"] = {"Dinghy",9000, ""},
	["jetmax"] = {"SpeedBoat",14000,""}
	
  },

and they popped up and worked flawlesly. So i figured it if i added

  
    ["police"]  = {
    _config = {vtype="car",blipid=56,blipcolor=4},
	["vehicle"] = {"vehicle",0,""},
  },

and adding police to the bottom of the cfg. like so

cfg.garages = { {"compacts",-356.146, -134.69, 39.0097}, {"coupe",723.013, -1088.92, 22.1829}, {"sports",-1145.67, -1991.17, 13.162}, {"sportsclassics",1174.76, 2645.46, 37.7545}, {"supercars",112.275, 6619.83, 31.8154}, {"motorcycles",-205.789, -1308.02, 31.2916}, --{"planes",1640, 3236, 40.4}, --{"planes",2123, 4805, 41.19}, --{"planes",-1348, -2230, 13.9}, --{"helicopters",1750, 3260, 41.37}, {"police",1844.51171875,3704.71655273438,33.7054710388184}, --{"helicopters",-745, -1468, 5}, {"boats",-849.5, -1368.64, 2}, {"boats",1538, 3902, 30.95} }

That a blip and marker/menu should appear in the location of said coords

That should work… :cold_sweat: