make so only some jobs can buy money printers and guns and stuff
3 replies, posted
i just installed darkrp but i went threw the jobs and basicly every one can buy pistols and moneyprinters how do i change it so only selected jobs can
[editline]22nd January 2011[/editline]
Bump
[lua]AddCustomShipment("Desert eagle", "models/weapons/w_pist_deagle.mdl", "weapon_deagle2", 215, 10, true, 215, true, {TEAM_GUN})
AddCustomShipment("Fiveseven", "models/weapons/w_pist_fiveseven.mdl", "weapon_fiveseven2", 0, 10, true, 205, true, {TEAM_GUN})
AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_glock2", 0, 10, true, 160, true, {TEAM_GUN})
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_p2282", 0, 10, true, 185, true, {TEAM_GUN})
AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_ak472", 2450, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_mp52", 2200, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("M4", "models/weapons/w_rif_m4a1.mdl", "weapon_m42", 2450, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("Mac 10", "models/weapons/w_smg_mac10.mdl", "weapon_mac102", 2150, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("Pump shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_pumpshotgun2", 1750, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("Sniper rifle", "models/weapons/w_snip_g3sg1.mdl", "ls_sniper", 3750, 10, false, nil, false, {TEAM_GUN})
AddEntity("Drug lab", "drug_lab", "models/props_lab/crematorcase.mdl", 400, 3, "/buydruglab", {TEAM_GANG, TEAM_MOB})
AddEntity("Money printer", "money_printer", "models/props_c17/consolebox01a.mdl", 1000, 2, "/buymoneyprinter")
AddEntity("Microwave", "microwave", "models/props/cs_office/microwave.mdl", 400, 1, "/buymicrowave", TEAM_COOK)
AddEntity("Gun lab", "gunlab", "models/props_c17/TrapPropeller_Engine.mdl", 500, 1, "/buygunlab", TEAM_GUN)
[/lua]
This is all entities in DarkRP, to modify a shipment so only specific jobs can buy it, here's how you do it.
First, find the one you want to edit. Let's take the default money printer for an example.
[lua]AddEntity("Money printer", "money_printer", "models/props_c17/consolebox01a.mdl", 1000, 2, "/buymoneyprinter")[/lua]
Then add [lua], TEAM_WHATEVER JOB THAT CAN BUY IT)[/lua] to the end of it. So if only gundealers could buy printers, you'd have to modify the original shipment code to this
[lua]AddEntity("Money printer", "money_printer", "models/props_c17/consolebox01a.mdl", 1000, 2, "/buymoneyprinter", TEAM_GUN)[/lua]
Now only gundealers can buy the money printer.
Hope it helps :buddy:
and wat file is that in? cause i went in the entities folder and thats about some door thing
in shared.lua
Sorry, you need to Log In to post a reply to this thread.