Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2024, 03:54:18 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Costum weapons and its icon
Pages: [1]
Author Topic: Costum weapons and its icon  (Read 4498 times)
xbooster
Poster

Posts: 14


« on: October 31, 2011, 10:00:27 AM »

I am making costum weapons for my server and i got question about icons. TTT will read icons from
\garrysmod\materials\VGUI\ttt\ 
right? It seems that i dont have ttt folder under my vgui directory, so my guess is that i should create it manually but if i create it manually will it still work then or server should had to generate this directory for me?

I found my stock TTT icons under
/garrysmod/gamemodes/terrortown/content/materials/vgui/ttt

mybe i should add these icons there and under fast downloads i should make directory for /gamemodes/terrortown/content/materials/vgui/ttt where i gonna add my icons for fastdownload...
Im so confused lol
« Last Edit: October 31, 2011, 10:07:34 AM by xbooster »
xbooster
Poster

Posts: 14


« Reply #1 on: October 31, 2011, 10:18:17 AM »

I think that i get it now,
if SERVER then
  resource.AddFile("materials/VGUI/ttt/icon_myserver_ak47.vmt")
end

here it tells where file will be loaded for client and where it should be downloaded for client but for costum weapon it is:

if CLIENT then
 
SWEP.Icon = "VGUI/ttt/icon_myserver_ak47"

 
 SWEP.EquipMenuData = {
     type = "Weapon",
     desc = "Example custom weapon."
};
end

so it knows where to read icon in server side? right?

I guess that code in script "SWEP.Icon = "VGUI/ttt/icon_myserver_ak47" isnt really needed if i make it "SWEP.AutoSpawnable = true" coz theres no use of icon if it auto spawns on map?

Is there also anyone with nice Lua knowlege so they can take a look at my scripts so i can ensure that they will work?
« Last Edit: October 31, 2011, 10:38:21 AM by xbooster »
Tommynator
Poster

Posts: 173

Tommynator is a traitor!


« Reply #2 on: October 31, 2011, 11:33:04 AM »

Even if it autospawns on the map you'll need it when you identify a corpse.
xbooster
Poster

Posts: 14


« Reply #3 on: October 31, 2011, 12:06:47 PM »

Got it working now :P
« Last Edit: October 31, 2011, 01:43:30 PM by xbooster »
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Costum weapons and its icon « 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.009 seconds with 18 queries.