AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Custom Weapons 3 (Beta 2) (https://forums.alliedmods.net/showthread.php?t=285258)

Theray070696 07-15-2016 12:55

[TF2] Custom Weapons 3 (Beta 2)
 
4 Attachment(s)
Wanting new weapons in TF2? Valve not doing it? Take matters into your own hands with Custom Weapons 3! Based on the Custom Weapons 2 plugin by MasterOfTheXP, Custom Weapons 3 has a brand new menu system and the ability for servers to make shields and wearables!

Unlike Custom Weapons 2, however, Custom Weapons 3 uses a module-based system.
"What is that supposed to mean?"
Well, what that means is that if you want to contribute to Custom Weapons 3, a lot of the plugin is exposed via forwards in the .inc file. It also means that if a server owner finds a module that causes lag, it can be removed or replaced by a more optimized module.

"How do I know what to insta..."
Shhhh... I was about to get to that. In the attachments of this post, you will see something called "CW3 Starter Kit.zip". If you're setting up a server, the starter kit has everything you need to get it going, just copy the plugins folder into your servers sourcemod/plugins folder. There are a few modules in the scripting folder, but the default modules do mostly the same job. cw2legacy is only to be used if you have issues getting your CW2 server working with the split CW2 modules.

COMMANDS AND CVARS
Spoiler


WHAT EACH OFFICIAL MODULE DOES
Spoiler


WEAPON CONFIG PARAMETER LIST/HOW TO MAKE A WEAPON CONFIG
Spoiler


EXAMPLE WEAPON CONFIG
Spoiler


Q&A
Spoiler


SIMPLE INSTALLATION
First things first, make sure your server has tf2items and tf2attributes installed. You will also need tf2items.randomizer.txt from this post. (currently outdated! use the attachment in this post!)
  1. Download the CW3 Starter Kit from this post.
  2. Extract the plugins folder from the .zip file you download into your sourcemod folder.
  3. You're done! All you have to do now is download or create some custom weapons! (They go into sourcemod/configs/customweapons btw)

MANUAL INSTALLATION
First things first, make sure your server has tf2items installed. For either of the attribute modules, make sure you also have tf2attributes installed. You will also need tf2items.randomizer.txt from this post. (currently outdated! use the attachment in this post!)
  1. Download the latest CW3 Starter Kit from this post.
  2. Put cw3.smx into your sourcemod/plugins folder.
  3. Create a cw3 folder in sourcemod/plugins
  4. Inside that folder, create a folder named modules
  5. Inside that folder, place any modules you want to use.
  6. Inside the cw3 folder, create a folder named attributes
  7. Inside that folder, place any attribute plugins that run on cw3.
  8. Inside your sourcemod/configs folder, create a folder called cutsomweapons
  9. Inside that folder, place any weapon configs you have, or create your own!
  10. Place tf2items.randomizer.txt into your sourcemod/gamedata folder.
  11. (cw2attributes and cw2legacy users only) Inside your sourcemod/plugins folder, create a folder called customweaponstf
  12. Inside that folder, place any attribute plugins that are built on the CW2 base.
  13. You're done! All you have to do now is download or create some custom weapons!

ABOUT INVISIBLE WEAPONS
If weapon models are invisible to other people on your server, that is not a bug. Valve disabled visible weapons a few years ago. DO NOT POST A FIX HERE! IT IS BANNED ON ALLIEDMODS!

(FREE) DLC
You need weapons and modules to use CW3, so why not grab some of these?
HOTFIXES
Spoiler


CHANGELOG
Spoiler


KNOWN BUGS
Spoiler


Looking for a server? Come check out Custom TF2 Weapons, the officially supported Custom Weapons 3 server!

VIDEOS
Spoiler

crafting 07-15-2016 12:55

Re: [TF2] Custom Weapons 3 (Beta 1)
 
1 Attachment(s)
How to Make a Custom TF2 Weapon Guide
https://www.youtube.com/watch?v=rl8OjrruHMI

Plus, I have some of the current versions of the custom weapons we use on our severs.

Theray070696 07-15-2016 12:55

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Also reserved

Mr.Orion 07-15-2016 13:26

Re: [TF2] Custom Weapons 3 (Beta 1)
 
2 Attachment(s)
________________________________
//* == [ ORION'S ATTRIBUTES ] == *\\
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯


UPDATED : 07/18/2016 : Version : 1.04/1.04/1.04
Sourcemod Version needed : 1.8

¥ Requests :


¥ A non-explained list of 159 attributes :


¥ Changelog :


¥ Known Bugs :


¥ Source Code :



Chdata 07-15-2016 13:50

Re: [TF2] Custom Weapons 3 (Beta 1)
 
"insert a block into your"

just give a [spoiler]'d [code] for an example weapon config, it's much easier than trying to get the average layman to come to the same conclusion that they're using keyvalue config syntax in a very specific way.





I would've kept the convar names the same, that way nobody really needs to update their configs ;p


quick, remind people you've already been running CW3 for a while now lolo!!

PHP Code:

stock WeaponSwitch(iClientiSlot)
{
    
ClientCommand(iClient"slot%i"iSlot+1);


This can make people weapon switch without needing to do anything special to fix the viewmodels. Setting m_hActiveWeapon directly won't fire OnWeaponSwitch, which the core plugin uses to change whether or not viewmodels are visible or not.

shadowpikachu 07-17-2016 03:49

Re: [TF2] Custom Weapons 3 (Beta 1)
 
I know the guy above doesn't take requests but someone just make an attribute that makes a hitscan have a very small aoe with no falloff from the explosion itself.

KaidemonLP 07-18-2016 04:44

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Will there be a tutorial of how to use the attributes and what attributes exist.

Is there a atribute that can make a backstab does no damage(that is applied to the knife).

Mr.Orion 07-18-2016 12:23

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by KaidemonLP (Post 2437401)
Will there be a tutorial of how to use the attributes and what attributes exist.

Is there a atribute that can make a backstab does no damage(that is applied to the knife).

Not be rough or anything, but you should learn to read. :bee:

From my moreaw2.smx : No Backstab ; It disables backstab and you can set your own damage dealt, like 40 for example, which is the base knife damage.

Chdata 07-18-2016 13:15

Re: [TF2] Custom Weapons 3 (Beta 1)
 
aaah! all the rewrite work

SpectraGalaxy 07-19-2016 05:22

Re: [TF2] Custom Weapons 3 (Beta 1)
 
I'm having a bit of trouble with Orion's attributes. It says the attributes failed to load because Native DataPack.DataPack was not found.

MaSerkzn 07-19-2016 06:14

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Time to rewrite all my configs... xd
Is there will be any chance to override sniper rifle's, minigun's and engie's buildings sounds in future ?

Mr.Orion 07-19-2016 09:01

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by SpectraGalaxy (Post 2437691)
I'm having a bit of trouble with Orion's attributes. It says the attributes failed to load because Native DataPack.DataPack was not found.

My attributes are for SM 1.8.

ZwipZwap Zapony 07-21-2016 12:19

Re: [TF2] Custom Weapons 3 (Beta 1)
 
So today when making some Custom Weapons 2 weapons, looking up attribute plug-in posts for documentation on said attribute plug-ins led me to find this, through forum signatures on said attribute plug-in posts for CW2.
Naturally, I quit my server, updated SourceMod to the latest stable version, uninstalled CW2 and related attribute plug-ins, downloaded and installed this instead, and wanting to go with the future, I disabled the CW2 modules, enabled the CW3 modules, rewrote my weapon configurations to work on the CW3 modules, and now I get some errors in the server console whenever a weapon is equipped (which includes just going to the re-supply cabinet).

These are the errors I get, once every time a weapon is equipped:
Spoiler
No, I don't have any weapon configurations referencing that plug-in nor its attributes. The active modules are "cw3-attributes" and "cw3model-application", and the active attribute plug-ins are "tf2attributes", "aw2attrib", "basic-attributes", and "rays-attributes", of which "tf2attributes" is in sourcemod/plugins, and the latter three are in sourcemod/plugins/cw3/attributes.

If the errors are related to me not having the CW2 modules active, that should really be looked into. If not, it should still be looked into, of course.
(Edit: I forgot to test if these errors also show up when equipping weapons without equipping any custom weapons.)



Besides those errors in the server console, everything seems to work perfectly fine. There's only one thing I could wish for... Fresh, new documentation. Mostly on the attribute plug-ins included in the opening post's attachment, but also on weapon configurations. The only time "nobots" is even mentioned is in the example weapon configurations. Who knows what other stuff is there noone knows about, because it's just not documented anywhere outside the plug-in code itself?

But again, besides that, everything works perfectly, just like with the original CW2. I really appreciate people taking their time to develop plug-ins like CW2, and other people taking their time to make said plug-ins even better.

Theray070696 07-22-2016 15:49

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by ZwipZwap Zapony (Post 2438426)
So today when making some Custom Weapons 2 weapons, looking up attribute plug-in posts for documentation on said attribute plug-ins led me to find this, through forum signatures on said attribute plug-in posts for CW2.
Naturally, I quit my server, updated SourceMod to the latest stable version, uninstalled CW2 and related attribute plug-ins, downloaded and installed this instead, and wanting to go with the future, I disabled the CW2 modules, enabled the CW3 modules, rewrote my weapon configurations to work on the CW3 modules, and now I get some errors in the server console whenever a weapon is equipped (which includes just going to the re-supply cabinet).

These are the errors I get, once every time a weapon is equipped:
Spoiler
No, I don't have any weapon configurations referencing that plug-in nor its attributes. The active modules are "cw3-attributes" and "cw3model-application", and the active attribute plug-ins are "tf2attributes", "aw2attrib", "basic-attributes", and "rays-attributes", of which "tf2attributes" is in sourcemod/plugins, and the latter three are in sourcemod/plugins/cw3/attributes.

If the errors are related to me not having the CW2 modules active, that should really be looked into. If not, it should still be looked into, of course.
(Edit: I forgot to test if these errors also show up when equipping weapons without equipping any custom weapons.)



Besides those errors in the server console, everything seems to work perfectly fine. There's only one thing I could wish for... Fresh, new documentation. Mostly on the attribute plug-ins included in the opening post's attachment, but also on weapon configurations. The only time "nobots" is even mentioned is in the example weapon configurations. Who knows what other stuff is there noone knows about, because it's just not documented anywhere outside the plug-in code itself?

But again, besides that, everything works perfectly, just like with the original CW2. I really appreciate people taking their time to develop plug-ins like CW2, and other people taking their time to make said plug-ins even better.

I'll edit the OP when I get home from work tonight. Won't do it from mobile as chrome dev doesn't like modifying text fields (backspace only works once when typing a word, have to retype it after that)

EDIT: had more important matters I had to deal with.
EDIT 2: Updated OP with all parameters for weapon configs!

Mitchell 07-22-2016 16:42

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Hmmm maybe I can now finish my custom gamemode that used Custom Weapons 2.

Potato Uno 07-23-2016 23:32

Re: [TF2] Custom Weapons 3 (Beta 1)
 
You could just do that on your own steam group (far less hassle) but that's just my opinion.

(Mostly copying the fact that STT stuff is mostly hosted on their steam group only.)

KaidemonLP 07-26-2016 05:38

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by Mr.Orion (Post 2437474)
Not be rough or anything, but you should learn to read. :bee:

From my moreaw2.smx : No Backstab ; It disables backstab and you can set your own damage dealt, like 40 for example, which is the base knife damage.

I saw the No Backstab attribute but i was confuzed by the attributes.ods
I tried the No Backstab but i just cant get it to work.
"Laughing psychopath"
{
"classes"
{
"spy" "2"
}
"baseclass" "knife"
"baseindex" "4"
"nobots" "1"
"quality" "6"
"logname" "psycopath"
"description" "Laught all the way"

"attributes"
{
"crit does no damage"
{
"plugin" "tf2attributes"
"value" "1"
}
"crit forces victim to laugh"
{
"plugin" "tf2attributes"
"value" "1"
}
"No Backstab"
{
"plugin" "moreaw2"
"value" "40"
}

}
}
I dont know what is wrong. The moreaw2.smx is in the plugins folder.

Theray070696 07-26-2016 06:36

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by KaidemonLP (Post 2439691)
I saw the No Backstab attribute but i was confuzed by the attributes.ods
I tried the No Backstab but i just cant get it to work.
"Laughing psychopath"
{
"classes"
{
"spy" "2"
}
"baseclass" "knife"
"baseindex" "4"
"nobots" "1"
"quality" "6"
"logname" "psycopath"
"description" "Laught all the way"

"attributes"
{
"crit does no damage"
{
"plugin" "tf2attributes"
"value" "1"
}
"crit forces victim to laugh"
{
"plugin" "tf2attributes"
"value" "1"
}
"No Backstab"
{
"plugin" "moreaw2"
"value" "40"
}

}
}
I dont know what is wrong. The moreaw2.smx is in the plugins folder.

Change "attributes" to "cw3_attributes".

YoNer 07-28-2016 20:49

Re: [TF2] Custom Weapons 3 (Beta 1)
 
2 Attachment(s)
------------------------------------------------
--------------YoNer's Attributes-----------
------------------------------------------------

Version : 2.1


Overview

Currently this plugin only adds the below attribute.

"trigger command" "command"
Upon hitting a player (any team) the selected command (512 chars max) will be executed on the server the plugin will also parse the command and replace all instances of "{target}" with the player that was hit
Example:

'sm_slay {target}'

If player "TommyGunn" is hit 'sm_slay {target}' will be executed as 'sm_slay "TommyGunn"' on the server
Changelog

2.1 7/28/2016
Ported for Custom Weapons 3

1.1 7/15/2016
Updated to use ClientUserId instead of the clients name for security (Thanks nosoop!)

1.0 7/12/2016
First release




A little history

When I found Orion's Attributes for this plugin, which included the "Kick-Ban on Hit-Kill" attribute. I went ahead and made an actual Ban Hammer for TF2, by applying that to the Necro Smasher, which proved a great deal of fun.

However, I had to deactivate Orion's Attributes due to some issues with it's implementation of Hud Texts conflicting with other plugins I frequently use on my server (basically, having Orion's activated, even when not applied to any weapons, would cause Hud Text prints to not be visible most of the times. If anyone has a clue on how to fix, please tell me)

So, I still wanted to be able to Ban Hammer people into submission, without plugins conflicts (I could load custom-attributes or orion's on a case by case basis, I know) but that got me thinking if there was any plugins that allowed you to bind commands to a weapon, that's when I found Trigger Commands plugin by Chase.

Now this and old plugin that required DukeHacks and was never updated, so I couldn't get it to work (In my life I coded mostly in Basic and that was back in highscool). Also, the plugin wasn't exactly what I was looking for since it tied a preconfigured list of commands to some weapon events, I wanted to be able to make weapons on the go via commands and make them available only to a specific player, like Custom Weapon lets you.

So finally I decided to dust whatever amount of programing skills I had and decided to see if I was able to adapt both Orion's attributes and Trigger Commands. In the end I started basing my work on the basic-attributes plugin code included by MasterOfTheXP in the first post. They where clearly commented and were a great help to start tinkering and figuring out what changed I needed to do in order to add an extra attribute to that plugin to see if my concept worked. I took the code that parsed the command and actually executs it from Trigger Commands

After many attempts I was finally able to get it working and so I decided to release the attribute as a separate plugin to keep it tidy and be able to more easily add others I may want to add in the future. I removed all other attributes in the original code and kinda kept the structure (I removed most of the comments since I only used one type of event hook at the moment and in context most of them would not have made much sense otherwise, also I can always go back to the source code should I need to add other hooks or need to refresh my memory on what does what)

Anyway... Give me any suggestions, corrections or ideas you may have, I'm open to include them if I am able to code them and they are not two complex :-P


Thanks

MasterOfTheXP for his Custom Weapons and Attributes plugins
Mr. Orion for his Attributes plugin
Chase for his Trigger Commands plugin

KaidemonLP 07-29-2016 04:32

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by Theray070696 (Post 2439699)
Change "attributes" to "cw3_attributes".

I changed it and it still doesnt work. It looks like this now
"Laughing psychopath"
{
"classes"
{
"spy" "2"
}
"baseclass" "knife"
"baseindex" "4"
"nobots" "1"
"quality" "6"
"logname" "psycopath"
"description" "Laught all the way"

"cw3_attributes"
{
"crit does no damage"
{
"plugin" "tf2attributes"
"value" "1"
}
"crit forces victim to laugh"
{
"plugin" "tf2attributes"
"value" "1"
}
"No Backstab"
{
"plugin" "moreaw2"
"value" "40"
}

}
}
And sorry for wasting your time.

Theray070696 07-30-2016 14:46

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by KaidemonLP (Post 2440482)
I changed it and it still doesnt work. It looks like this now
"Laughing psychopath"
{
"classes"
{
"spy" "2"
}
"baseclass" "knife"
"baseindex" "4"
"nobots" "1"
"quality" "6"
"logname" "psycopath"
"description" "Laught all the way"

"cw3_attributes"
{
"crit does no damage"
{
"plugin" "tf2attributes"
"value" "1"
}
"crit forces victim to laugh"
{
"plugin" "tf2attributes"
"value" "1"
}
"No Backstab"
{
"plugin" "moreaw2"
"value" "40"
}

}
}
And sorry for wasting your time.

Wait! I think I see the issue! Make "no backstab" all lowercase. Looks like Orion might not be ignoring casing for attribute names.

Quote:

Originally Posted by YoNer (Post 2440407)
<snip>

Added to OP.

Chdata 07-31-2016 04:25

Re: [TF2] Custom Weapons 3 (Beta 1)
 
1 Attachment(s)
Here is a fixed version of cw3-attributes.

The .inc now properly marks natives as optional.

Added native FireOnWeaponRemoved to allow other plugins to clear custom cw3 attributes if needed.

Also includes a fix to theray's fix to AddAttribute which was missing the "while active" parameter.

Theray070696 07-31-2016 17:37

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by Chdata (Post 2440985)
Here is a fixed version of cw3-attributes.

The .inc now properly marks natives as optional.

Added native FireOnWeaponRemoved to allow other plugins to clear custom cw3 attributes if needed.

Also includes a fix to theray's fix to AddAttribute which was missing the "while active" parameter.

I'll merge this into the official build tonight, the attribute resetting was implemented before you pushed this (I think. on mobile)

alexde5 08-02-2016 10:39

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Is there a way to limit weapons to Admins, VIP's, mods, ect?
Because that would be useful.

Theray070696 08-02-2016 10:41

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by alexde5 (Post 2441681)
Is there a way to limit weapons to Admins, VIP's, mods, ect?
Because that would be useful.

Yes, use the "flag" or "flags" key in a weapons config, and type the flag(s) of the player(s) that are allowed to use the weapon in there

KaidemonLP 08-05-2016 09:54

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by Theray070696 (Post 2440865)
Wait! I think I see the issue! Make "no backstab" all lowercase. Looks like Orion might not be ignoring casing for attribute names.



Added to OP.

Thank you. Works now. Im sory for taking your time.

KaidemonLP 08-06-2016 09:04

Re: [TF2] Custom Weapons 3 (Beta 1)
 
I searched the internet to try to find a attribute mod that allows to give disguise as victiom on kill but i just coudnt find it and i am only in the beginner stage of programing so my question is if anyone knows someone who made a attribute like that. I dotn mean disguise on backstab i realy mean on kill because i want to make a revolver that when you kill someone you teleport to their place and disguise as them.

+ Is it possible to make a bullet heal a player/building

alexde5 08-14-2016 19:55

Re: [TF2] Custom Weapons 3 (Beta 1)
 
When using the sm_cw3_onlyteam command, it doesn't seem to work right on either players or bots. at first I can't equip the weapon I want because I'm on RED and BLU can equip custom weapons. Except if I respawn or touch a resupply locker, I can get the weapon.

TheOnly8Z 09-07-2016 08:30

Re: [TF2] Custom Weapons 3 (Beta 1)
 
How do I use the "custom projectile model" attribute?

TheOnly8Z 09-08-2016 01:39

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Disregard my other comment.

I would still like to ask about the error that was previously mentioned as per ZwipZwap Zapony.
Quote:

L 07/21/2016 - 17:55:06: [SM] Exception reported: Array index is out of bounds
L 07/21/2016 - 17:55:06: [SM] Blaming: cw3\attributes\rays-attributes.smx()
Doesn't seem to affect anything, but is it solvable?

Theray070696 09-10-2016 09:42

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by TheOnly8Z (Post 2452090)
Disregard my other comment.

I would still like to ask about the error that was previously mentioned as per ZwipZwap Zapony.


Doesn't seem to affect anything, but is it solvable?

There should he a couple more lines after that error containing line numbers, could you grab those for me? I can't fix it unless I have those. I'll see about fixing that (and cleaning up the OP a little) when I get the chance.

KaidemonLP 09-17-2016 04:17

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by TheOnly8Z (Post 2451888)
How do I use the "custom projectile model" attribute?

Does it crash your server when you use it? Because that happens to me.

Vodakman 09-17-2016 05:16

Re: [TF2] Custom Weapons 3 (Beta 1)
 
For some reason, every time I try to equip a custom weapon, my dedicated server crashes. Can anyone help me out?

KaidemonLP 09-17-2016 06:16

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by Vodakman (Post 2454591)
For some reason, every time I try to equip a custom weapon, my dedicated server crashes. Can anyone help me out?

Happened to me when the coding was wrong.
It was because i had name instead of "name" so it crashed

Vodakman 09-17-2016 06:30

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by KaidemonLP (Post 2454600)
Happened to me when the coding was wrong.
It was because i had name instead of "name" so it crashed

Well, all of the weapons have quotation marks around their name, so I don't think that's the problem.

Edit: I think I fixed it, well, slightly atleast. But the only thing that's correct when I equip a weapon is the logname, everything else doesn't work. And the server also crashes when walking into a resupply cabinet.¸

Edit: Okay, I fixed it by installing the newest version of TF2items, seems like I forgot about updating it.

Hertzole 09-22-2016 11:58

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Can someone explain how I can use custom viewmodels/worldmodels? I can't figure it out and I've been trying to get it to work for quite some time.

SpectraGalaxy 09-24-2016 03:46

Re: [TF2] Custom Weapons 3 (Beta 1)
 
The newest update seems to have broken the plugin, or maybe that's just an error with me. Even though i have 30+ custom weapons in my config folder, only a few of them show up. Certain classes like the Heavy and Pyro don't seem to have any weapons at all.

KaidemonLP 09-24-2016 07:57

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by Hertzole (Post 2456021)
Can someone explain how I can use custom viewmodels/worldmodels? I can't figure it out and I've been trying to get it to work for quite some time.

First add this to your weapon config:

"viewmodel"
{
"modelname" ""
}
"worldmodel"
{
"modelname" ""
}

Be sure it it not inside "attributes".
Then Find the name of the model you want to use. I personaly use this site https://steamcommunity.com/sharedfil.../?id=395367659
Then open GCFscape or other vpk file openers and search for the model.
Right click the mdl file and click on propeties. Copy the directory example:
root\models\weapons\c_models\c_pickaxe\c_pick axe.mdl (its better to use c_ models)
then remove the root\ and change all the \ to /
paste it into the "" after modelname of both viewmodel and worldmodel. Shoud look similar to this

"Test"
{
"classes"
{
"soldier" "1"
}
"baseclass" "shotgun"
"baseindex" "441"
"nobots" "1"
"quality" "6"
"logname" "test"
"description" "test"
"viewmodel"
{
"modelname" "models/weapons/c_models/c_xms_cold_shoulder/c_xms_cold_shoulder.mdl"
}
"worldmodel"
{
"modelname" "models/weapons/c_models/c_xms_cold_shoulder/c_xms_cold_shoulder.mdl"
}
"attributes"
{

}
}

This makes a soldier shotgun with the spycicle model.
You cant change the animations so use the base index from a weapon that uses the animations you want. For that i use this:https://wiki.alliedmods.net/Team_for...nition_indexes

Hope this helped you

KaidemonLP 09-27-2016 12:26

Re: [TF2] Custom Weapons 3 (Beta 1)
 
I have a problem. Sometimes on random occations when i start a server it crashes sometimes and sometimes it doesnt with out me doing anything. I dont know why.

Hertzole 09-30-2016 09:22

Re: [TF2] Custom Weapons 3 (Beta 1)
 
Quote:

Originally Posted by KaidemonLP (Post 2456549)
First add this to your weapon config:

"viewmodel"
{
"modelname" ""
}
"worldmodel"
{
"modelname" ""
}

Be sure it it not inside "attributes".
Then Find the name of the model you want to use. I personaly use this site https://steamcommunity.com/sharedfil.../?id=395367659
Then open GCFscape or other vpk file openers and search for the model.
Right click the mdl file and click on propeties. Copy the directory example:
root\models\weapons\c_models\c_pickaxe\c_pick axe.mdl (its better to use c_ models)
then remove the root\ and change all the \ to /
paste it into the "" after modelname of both viewmodel and worldmodel. Shoud look similar to this

"Test"
{
"classes"
{
"soldier" "1"
}
"baseclass" "shotgun"
"baseindex" "441"
"nobots" "1"
"quality" "6"
"logname" "test"
"description" "test"
"viewmodel"
{
"modelname" "models/weapons/c_models/c_xms_cold_shoulder/c_xms_cold_shoulder.mdl"
}
"worldmodel"
{
"modelname" "models/weapons/c_models/c_xms_cold_shoulder/c_xms_cold_shoulder.mdl"
}
"attributes"
{

}
}

This makes a soldier shotgun with the spycicle model.
You cant change the animations so use the base index from a weapon that uses the animations you want. For that i use this:https://wiki.alliedmods.net/Team_for...nition_indexes

Hope this helped you

I tried doing this but it doesn't work. My viewmodels just disappear and I can't move anymore. I even tried to just copy and paste your example but no luck. :(


All times are GMT -4. The time now is 01:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.