How to set what jobs sell? (DarkRP)
-
- New to forums
- Posts: 5
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Apr 17, 2014 8:37 pm
How to set what jobs sell? (DarkRP)
Does anyone know how to set what some jobs can sell? I want to make Drug Dealers and stuff that have custom stores to buy from. I checked the internet, but nothing shows up.
- Sir Nipah
- This is my homepage
- Posts: 76
- Joined: Mon Jul 08, 2013 3:38 am
- Location: Australia/Melbourne
- Contact:
Re: How to set what jobs sell? (DarkRP)
I'l have a little play on my local server for you. Keep in mind it's 6:30PM here, So I may be a 24 hours with a reply.
- Sir Nipah
- This is my homepage
- Posts: 76
- Joined: Mon Jul 08, 2013 3:38 am
- Location: Australia/Melbourne
- Contact:
Re: How to set what jobs sell? (DarkRP)
Ok Mebes, I had a little play and can now tell you a little on what your trying to do.
I'm assuming that you have a entity in mind? no..
1st thing you need to do is add the entity to the server. (I would be a good idea to read over some of the entities in there.)
You will need to edit a file called "addentities.lua"...
I will tell you line by line whats going down.
It's Easter so, Happy Easter mate ^.^
I'm assuming that you have a entity in mind? no..
1st thing you need to do is add the entity to the server. (I would be a good idea to read over some of the entities in there.)
Now that the entity/entities are uploaded we can move onto adding them to the job../garrysmod/gamemodes/darkrp/entities/entities
You will need to edit a file called "addentities.lua"...
You should find that this is the file responsible for the guns the "Gun Dealer" can sell. Take note of this.../garrysmod/gamemodes/darkrp/gamemode/config/addentities.lua
Code: Select all
DarkRP.createEntity("Drug lab", {
ent = "drug_lab",
model = "models/props_lab/crematorcase.mdl",
price = 400,
max = 3,
cmd = "buydruglab",
allowed = {TEAM_GANG, TEAM_MOB}
})
- On line 1, "DarkRP.createEntity" is telling darkrp that this is an entity and it's part of the gamemode. In quotation marks it reads "Drug lab". This is the title of the entity players will see.
- On line 2, "ent" is responsible for getting the entity that you added to the "./darkrp/entities/entities" not to long ago.
You add the name of your entities folder after the "=". - Line 3, "model" asking you for a model to represent the entity ingame.
- Line 4 should be self explanatory
- Line 5, "max" asking you how many of this entity, can one play have on the map at any given time.
- Line 6 "cmd"... I can't tell you for 100% if I'm right here but, I believe that it is the command needed to spawn the thing
- Line 7, "allowed" is asking for the name of the team that can access this entity.
Use the team name not the job name. IE TEAM_MYJOBCode: Select all
-- ./garrysmod/gamemodes/darkrp/gamemode/config/jobrelated.lua TEAM_MYJOB = DarkRP.createJob("My Job",
I'd love to hear if it worksMebes wrote:custom stores to buy from.
It's Easter so, Happy Easter mate ^.^
- Sir Nipah
- This is my homepage
- Posts: 76
- Joined: Mon Jul 08, 2013 3:38 am
- Location: Australia/Melbourne
- Contact:
Re: How to set what jobs sell? (DarkRP)
The feels when you can't edit post to fix mistakes. ._.
Re: How to set what jobs sell? (DarkRP)
Thanks for all the help, I really appreciate all the effort you went through! Once I finish my server, you are very welcome to join. Just message me if interested 
