• DarkRP shipments.lua problem
    4 replies, posted
Hello, I have just completed the shipments.lua for M9K weapons. It's mostly working as expected, as it has for me 100 times before. However, the job restrictions are slightly broken. In the shipments tab in the F4 menu, each gun dealer job can only access the shipments allowed to them. But, in the weapons tab, both TEAM_GUNS and TEAM_HEAVYGUNS can access each others weapons. Below is an example of some of the shipments. They all follow this layout. DarkRP.createShipment("HK USC", { model = "models/weapons/w_hk_usc.mdl", entity = "m9k_usc", price = 20000, // Price for a shipment amount = 10, // How many in a shipment separate = false, pricesep = 3000, // Price of individual guns noship = false, allowed = {TEAM_GUNS}, // Allowed teams category = "Submachine Guns", }) DarkRP.createShipment("MP5SD", { model = "models/weapons/w_hk_mp5sd.mdl", entity = "m9k_mp5sd", price = 20000, // Price for a shipment amount = 10, // How many in a shipment separate = false, pricesep = 3000, // Price of individual guns noship = false, allowed = {TEAM_GUNS}, // Allowed teams category = "Submachine Guns", }) // ASSAULT RIFLES // DarkRP.createShipment("F2000", { model = "models/weapons/w_fn_f2000.mdl", entity = "m9k_f2000", price = 25000, // Price for a shipment amount = 10, // How many in a shipment separate = false, pricesep = 3500, // Price of individual guns noship = false, allowed = {TEAM_HEAVYGUNS}, // Allowed teams category = "Assault Rifles", }) DarkRP.createShipment("AS VAL", { model = "models/weapons/w_dmg_vally.mdl", entity = "m9k_val", price = 25000, // Price for a shipment amount = 10, // How many in a shipment separate = false, pricesep = 3500, // Price of individual guns noship = false, allowed = {TEAM_HEAVYGUNS}, // Allowed teams category = "Assault Rifles", })
The code supplied seems fine. Can any other job access the weapons tab or is it just those two jobs? Also, are you using the default f4 menu?
Nope, just those two jobs. I'm using the Victorious Menu Victorious Menu · gmodstore
Correction, I've just reverted to the default F4 menu to check if I had the same issue and all jobs can access it on there. Strange.
Could be because that f4 menu doesn't have any check for allowed in the weapons tab, yet does for the shipments tab. I would try it out with the original f4 menu.
Sorry, you need to Log In to post a reply to this thread.