Edited lockpick entity

So i copied the original lock pick entity edited the time to unlock and deleted the Swep.sound in and added the folder into the darkrp/entity/weapons and i added it as a weapon for one of my jobs in shared.lua but he doesnt have it as a weapon, any idea why? can anyone help me? im not getting any errors because of it.

Cheers for any constructive replies

What did you call the folder?


[editline]26th February 2013[/editline]

i just added it to my entity folder

[editline]26th February 2013[/editline]

I tested my lockpick shared.lua in game as i edited to check it did what i want and didn’t have any errors and that’s fine, but when i add it too its own folder and give it too one of my classes as a job weapon it doesn’t work.

What exactly doesn’t work?
Any errors in console?

No none at all, so i remade my own lockpick shared.lua and it works, so i changed the name in shared.lua too Swep.name “Master lock pick” instead of just “lock pick” and added it to its own folder in entites called Master lock pick and then went to my gamemode shared.lua and added “masterlockpick” as a weapon too my thief job, and he doesn’t spawn with it. make more sense?

[editline]26th February 2013[/editline]

ty for your reply too :slight_smile:

Your lockpick’s folder should be in gamemodes/darkrp/entities/weapons/
If that doesn’t work, make sure the name in shared.lua is the name of the folder.

If you can’t manage to figure it out you can add me on Steam (under my name)

What I’m getting from this is, that you have two lockpick files. Take the one you modified and replace the original. Make sure the class name is the same as the original ie (the name of the folder) lock_pick, or make sure you have added this new version to the addentities.lua. It won’t work in DarkRp unless you tell DarkRp to use it.

sorry i’m not explaining this well, i want to keep the original lockpick and add my new lockpick as another entity, that’s why i made a new folder in entities for it. but it wont let me give it to people as a weapon… so i have 2 lock picks in game. master lock pick and just original lockpick

Put it in the weapons folder, in entities.

If the weapon folder name is “master lock pick” then you can’t have that. For some reason lua doesn’t seem to like caps. Name it as “master_lock_pick” and tell me how it is. If it is already named that then post the code here?

Its not master lock pick, its “masterlockpick” one word

If you only edited the swep name and renamed the folder while still having it in darkrp/entities/weapons
It should work.


hmm, hey man do you do coding work for servers?

[editline]27th February 2013[/editline]

its working now XD i do not know why but it is :confused: maybe i just needed to restart the server or something who knows.

Thanks alot for your help guys :slight_smile: especially you Ms, it is much appreciated,

Didn’t you restart your server before now?

i thought i had lmao

[editline]27th February 2013[/editline]

XD leave me alone! im tired -.- too much work