Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
December 04, 2024, 09:36:56 AM
News:
Trouble in Terrorist Town
?
Site here
,
forum here
.
Zombie Master
|
Other
|
Trouble in Terrorist Town
| Topic:
HELP: STOOL/SWEP Adding.
Pages: [
1
]
Author
Topic: HELP: STOOL/SWEP Adding. (Read 6801 times)
Glathal
Poster
Posts: 13
«
on:
October 24, 2011, 03:33:44 AM »
Hi, I'm a little new to lua coding, and was wondering if anyone would like to take some time and introduce me how to add generic sweps/stools to TTT, I know how to use shared Lua guns in the game, but for addon based tools and sweps, its a different story. If anyone is willing to help I'll be greatly happy. THANKS. :D
BipolarDiZ
Poster
Posts: 101
|:NxS:| Staff! :D
«
Reply #1 on:
October 24, 2011, 03:49:15 AM »
I think you are simply asking on how to add the weapons to your server or how to code them? Either way check out this link, it shows all things related to custom weapons.
http://ttt.badking.net/custom-weapon-guide
BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
Glathal
Poster
Posts: 13
«
Reply #2 on:
October 24, 2011, 05:10:14 AM »
Yuh... I understand that much, but say I wanted to add a swep/stool thts in addon format, how would I do that?
BipolarDiZ
Poster
Posts: 101
|:NxS:| Staff! :D
«
Reply #3 on:
October 24, 2011, 03:16:17 PM »
Well I don't think you can add a stool, because it requires the tool gun. I guess you could code it into some sort of weapon form. When it comes to sweps in addon form its simple as converting the shared.lua of the weapon to TTT by adding things like the icon into it and stuff. Just make sure it has all of the stuff from the guide really. You would then copy the weapon's shared.lua into a folder named weapon_ttt_namehere and copy the materials and models and such from the addon to their respective directories.
If that doesn't help, maybe give an example of an addon you wanted to add as a weapon.
BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
Bad King Urgrain
Administrator
Posts: 12276
«
Reply #4 on:
October 24, 2011, 05:48:57 PM »
If you simply want to package a TTT weapon as an addon (ie. one you place in /garrysmod/addons/ instead of in TTT's directory), you could try copying the structure of the default counter-strike addon. It has a bunch of weapons in there, so that's the closest thing I know of. As far as I know everyone just places weapons in the TTT entities/weapons/ directory rather than packaging it as an addon.
Glathal
Poster
Posts: 13
«
Reply #5 on:
October 24, 2011, 06:36:58 PM »
Alright I think i'm beginning to understand, but what about the sounds, and cl init/init files, is there a way to compile them? Or what.
Glathal
Poster
Posts: 13
«
Reply #6 on:
October 24, 2011, 06:58:19 PM »
What would I do here for example. I would like to add http://www.garrysmod.org/downloads/?a=view&id=103959 to take over the holstered spot for the detective, but the guns I currently added only come with lua files, which are auto determined by CSS, do I force download to the cl_init, Shared, And init files, along with editing them so they're ttt base? I don't really get it. Thanks. :U
BipolarDiZ
Poster
Posts: 101
|:NxS:| Staff! :D
«
Reply #7 on:
October 24, 2011, 09:36:09 PM »
First to start off you shouldn't ever really need to have the client dl the lua files of the server. Those are usually sent in the cache if I am not mistaken. I haven't really messed with any weapons that require /lua/autorun files much so this is mostly just my impressions from a quick glance at the code. I would just try copying the weapons lua to a folder specifed as something like weapon_ttt_climb and port it to TTT. Porting it to TTT should be easy since this weapon doesn't have another base its already working off of. Then just copy over the autorun stuff to your lua/autorun. With that said I didn't look over the lua files line by line so I am not sure how they call on each other. You will have to make sure that the files know where the other files are. Also all that really should go to the client is the sound files.
Not sure if it will work but I hope I helped some.
BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
Glathal
Poster
Posts: 13
«
Reply #8 on:
October 25, 2011, 04:49:57 AM »
Wow, It works really well, the only problem being when dropped, it can't be seen.
«
Last Edit: October 25, 2011, 04:52:48 AM by Glathal
»
Glathal
Poster
Posts: 13
«
Reply #9 on:
October 25, 2011, 04:50:18 AM »
When the item is dropped on the ground its invisible, when there is a clear world model for it.
Glathal
Poster
Posts: 13
«
Reply #10 on:
October 25, 2011, 04:50:49 AM »
http://pastebin.com/5tD3bANQ Wow, didn't mean that triple post. Sorry. :U And the drawworldmodel true thing at the bottom, its originally false, Don't know if that has to do anything with it, I tried with and without, and still no dice.
«
Last Edit: October 25, 2011, 04:52:27 AM by Glathal
»
BipolarDiZ
Poster
Posts: 101
|:NxS:| Staff! :D
«
Reply #11 on:
October 25, 2011, 02:45:45 PM »
I have been having this same issue with a weapon of mine. Well first of all the weapon of mine shouldn't even drop. It is specified to be removed on drop. So I have like no clue why it is just going invisible. Sorry. I am glad its mostly working.
What I was thinking though, is that you might just want to make the weapon remove on drop like the holstered would. Make it completely detective only. I find making det only weapons make people enjoy it just that much more.
BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
Glathal
Poster
Posts: 13
«
Reply #12 on:
October 25, 2011, 06:36:32 PM »
Actually I think I agree with you, thanks a bunch man.
BipolarDiZ
Poster
Posts: 101
|:NxS:| Staff! :D
«
Reply #13 on:
October 25, 2011, 07:58:44 PM »
No problem at all. :D I am just glad I could be of some help! :D
BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
Pages
: [
1
]
Zombie Master
|
Other
|
Trouble in Terrorist Town
| Topic:
HELP: STOOL/SWEP Adding.
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Other
-----------------------------
=> Trouble in Terrorist Town
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Page created in 0.011 seconds with 17 queries.
Loading...