Addons

How do I make an addon that you like press a certain button then you handcuff a guy. Kinda like arma 3. I know that I need to bone manipulate to make animations, but how do I bone manipulate and how do i make it into a file?

Idk how to make an addon ethier because I am not too good at lua, but good enough to make a darkrp server. I want something that pretty much a beginner can understand. Google doesn’t help.

psst, hey, heard about this new cool thing? it’s called google. you can type shit you want to know, and it gives you the answear! pretty cool, right?

[sp]http://wiki.garrysmod.com/page/Workshop_Addon_Creation[/sp]

Have you ever heard of, TRIED IT BEFORE. If I found something on google that actually helps with the stuff I am asking for, then I wouldn’t be asking the community! Would I?

That article explains it better than we can. So you’re better of going with that.

Article? The one from gmod wiki that just talks about using the addon txt? It doesn’t really tell me how to put gui and stuff into an addon.

You said you could code in servers, it’s the exact same thing…

Yeah, like weps and classes for darkrp. Idk if it is familiar.

It is.

[editline]2nd November 2014[/editline]

Look at other addons to see how they work.

You didn’t have to make 2 threads about it.

[editline]2nd November 2014[/editline]

Wait, you made 3 threads actually. :v:

To make an addon you just create a folder in your SERVER_PATH/garrysmod/addons/ folder naming it whatever you want.

Then make the following folders:

lua/
lua/autorun/ – THIS IS SHARED ( both client and server load this, no need to use include or AddCSLuaFile in the autorun directory
lua/autorun/client/ – THIS IS CLIENT ( only client loads this, no need to use include or AddCSLuaFile in the autorun/client/ directory
lua/autorun/server/ – THIS IS SERVER ( only server loads this, no need to use include or AddCSLuaFile in the autorun/server/ directory

Drag and drop files in there, restart the map and you’re good to go. Autorefresh does work in addons, but if you make entities ( lua/entities/ … lua/weapons/ etc then you need to spawn a new entity each time you update the code otherwise you’ll be using the old code ).

If you have audio then make sound/ directory, etc…

Most of the sub-folders emulate the garrysmod/ directory…

Anyway, take a look at this: https://dl.dropboxusercontent.com/u/26074909/tutoring/_zipped_code/acecool_ttt_end_round_music.rar

Music at end of round for TTT in addon format. acecool_ttt_end_round_music/ gets dropped into SERVER_PATH/addons/ and notice the folder structure…

sound/round/
lua/…

If you want to pack it up for workshop, then post number 2 would be the right click. If you just want to make an addon for yourself so you don’t need to edit things in a game-mode directory ( best way to do it is in addon form ) then a simple directory works.

Take a look at this, almost a similar post: https://dl.dropboxusercontent.com/u/26074909/tutoring/forum_posts/realms_and_npc_help.lua.html

I think I referenced this npc example addon I wrote: https://dl.dropboxusercontent.com/u/26074909/tutoring/_zipped_code/acecool_npc_jointeam_example.rar

Hopefully this helps for your second question…

For the first one… Bones… You can use ENTITY:AddCallback BuildBonePositions which lets you add a function “callback” with arguments for the entity and bones the entity has ( just like calling GetBoneCount or so…

Someone posted a how to handcuff move bones not long ago but I can’t seem to locate the post…