Hi all, just setting up a DarkRP server and currently having a problem with buying weapons. I have got the latest DarkRP svn before you ask.
basically we have set the below shipments up however it isnt locking them down the TEAM_GUN. Any TEAM can purchase these as entities from the F4 menu.
[lua]AddCustomShipment("Desert eagle", "models/weapons/w_pist_deagle.mdl", "weapon_deagle2", 0, 10, true, 215, false, {TEAM_GUN})
AddCustomShipment("Fiveseven", "models/weapons/w_pist_fiveseven.mdl", "weapon_fiveseven2", 0, 10, true, 205, false, {TEAM_GUN})
AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_glock2", 0, 10, true, 160, false, {TEAM_GUN})
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_p2282", 0, 10, true, 185, false, {TEAM_GUN})
[/lua]
I have attempted to search for a fix and have only come across the same person asking with no answer.
Any Idea's?
AddCustomShipment("<Name of the shipment(no spaces)>"," <the model that the shipment spawns(should be the world model...)>", "<the classname of the weapon>", <the price of one shipment>, <how many guns there are in one shipment>, <OPTIONAL: true/false sold seperately>, <OPTIONAL: price when sold seperately>, < true/false OPTIONAL: /buy only = true> , OPTIONAL which classes can buy the shipment, OPTIONAL: the model of the shipment)
Edit:
Not sure why it says no spaces when there are in the default code but I saw you had this part:
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_p2282", 0, 10, true, 185, [U]true[/U], {TEAM_GUN})
Change all of them to true.
[B]Solved it ignore all the above^:[/B]
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_p2282", 0, 10, true, 185, false, nil, nil, function(ply) return ply:Team() == TEAM_GUN end)
That has worked, thank you ever so much. Been racking my brains for an hour or so on this one!
[QUOTE=Freebo;36680180]That has worked, thank you ever so much. Been racking my brains for an hour or so on this one![/QUOTE]
Yeah no problem. Are you hosting a buildRP?
[QUOTE=brandonj4;36680274]Yeah no problem. Are you hosting a buildRP?[/QUOTE]
No we're just running a regular DarkRP server on rp_downtown_v2_fiend_v2b
[QUOTE=Freebo;36680375]No we're just running a regular DarkRP server on rp_downtown_v2_fiend_v2b[/QUOTE]
Alright nevermind. Glad to help you!
Sorry, you need to Log In to post a reply to this thread.