Welcome, Guest. Please login or register.
Did you miss your activation email?
September 20, 2024, 04:34:51 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Changing Gun Model
Pages: [1]
Author Topic: Changing Gun Model  (Read 5859 times)
PurpleHaze
Poster

Posts: 10


« on: August 30, 2010, 08:32:13 PM »

Ok, Im trying to change crowbar model. I changed it to this in improvised

SWEP.ViewModel         = Model("models/jaanus/v_drill.mdl")
SWEP.WorldModel        = Model("models/jaanus/w_drill.mdl")


But its normally

SWEP.ViewModel			= "models/weapons/v_crowbar.mdl"
SWEP.WorldModel = "models/weapons/w_crowbar.mdl"


The model is still a crowbar. How is that possible if i changed the w and v Model.
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #1 on: August 30, 2010, 08:35:35 PM »

SWEP.ViewModel         = "models/jaanus/v_drill.mdl"
SWEP.WorldModel        = "models/jaanus/w_drill.mdl"
PurpleHaze
Poster

Posts: 10


« Reply #2 on: August 30, 2010, 08:40:04 PM »

I already tried that but it didn't work.
Sam
Poster

Posts: 22



« Reply #3 on: August 30, 2010, 08:41:17 PM »

Check to make sure there aren't any other model paths set that may be causing the issue. Also, check to make sure you didn't make a simple mistake such as saving to the wrong folder, it happens.

http://www.steamcommunity.com/id/samm5506
PurpleHaze
Poster

Posts: 10


« Reply #4 on: August 30, 2010, 08:45:12 PM »

garrysmod\garrysmod\gamemodes\terrortown\entities\weapons\weapon_zm_improvised Its saved to there.

I just edited the file.

It  was a coded gun but i just wanted models so i deleted the lua and sound because i dont know how to change sound on weapons with TTT if anyone knows could they tell me how? Thanks
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #5 on: August 30, 2010, 10:16:16 PM »

If you're testing this in your local gmod, so not on a server, then the scripts in the garrysmod.gcf will override your own. You will have to make it a separate weapon for it work. You can do this just by copying weapon_zm_improvised to a different folder name.
PurpleHaze
Poster

Posts: 10


« Reply #6 on: August 30, 2010, 11:34:54 PM »

So rename it?
« Last Edit: August 30, 2010, 11:39:26 PM by PurpleHaze »
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #7 on: August 31, 2010, 08:09:53 AM »

Yes.
PurpleHaze
Poster

Posts: 10


« Reply #8 on: August 31, 2010, 12:24:10 PM »

What would i rename it to? Renaming it wouldn't do anything?

I renamed it to weapon_zm_crowbars still a crowbar.
« Last Edit: August 31, 2010, 12:30:13 PM by PurpleHaze »
Sam
Poster

Posts: 22



« Reply #9 on: August 31, 2010, 12:38:10 PM »

What would i rename it to? Renaming it wouldn't do anything?

I renamed it to weapon_zm_crowbars still a crowbar.

Renaming it will allow you to create a new weapon. To replace the crowbar, you're going to have to either overwrite it or change the gamemode code to give players your new weapon instead of the crowbar.

To test that the weapon you added works, type in console
sv_cheats 1
give weapon_zm_crowbars

http://www.steamcommunity.com/id/samm5506
PurpleHaze
Poster

Posts: 10


« Reply #10 on: August 31, 2010, 01:17:15 PM »

It dosn't give me the crowbar. But it just dosn't work that cheat for me i try it on evreything.
PurpleHaze
Poster

Posts: 10


« Reply #11 on: September 01, 2010, 10:30:59 AM »

bump                        ,
PAL-18
Poster

Posts: 36



« Reply #12 on: October 26, 2010, 04:32:39 AM »

Sorry to bump this, but i have a question regarding this.

When changing the weapon model, is the new model automatically precached or do additional files need to be modified for precaching to work?
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #13 on: October 26, 2010, 07:18:06 AM »

For SWEPs gmod will automatically precache the models set in WorldModel and ViewModel. You can always wrap the model path in the Model function, like: Model("path/to/model.mdl"), that function will precache it too.
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Changing Gun Model « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.01 seconds with 18 queries.