Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 06:07:30 PM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: [Problem] my custom wep icons wont load
Pages: [1]
Author Topic: [Problem] my custom wep icons wont load  (Read 4736 times)
xbooster
Poster

Posts: 14


« on: November 01, 2011, 10:58:21 AM »

My weapon script is located at:
/orangebox/garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_tmp

In my weapon script i have
if SERVER then
  AddCSLuaFile( "shared.lua" )
 resource.AddFile("materials/VGUI/ttt/icon_myserver_tmp.vmt")
end

if CLIENT then
  SWEP.PrintName = "AK47"
  SWEP.Slot      = 2
  SWEP.Icon = "VGUI/ttt/icon_mycoolwep_tmp"
end


i got my vmt file at:
/orangebox/garrysmod/gamemodes/terrortown/content/materials/vgui/ttt/icon_mycoolwep_tmp.vmt
which includes

"UnlitGeneric"
{
"$basetexture" "VGUI/ttt/icon_mycoolwep_tmp"
"$vertexcolor" 1
"$vertexalpha" 1
"$translucent" 1
}

i have added my vtf file which location is:
/orangebox/garrysmod/materials/vgui/ttt/icon_mycoolwep_tmp.vtf
i have imported it by using VTFEdit.
Server should read that weapon icon from that directory but it doesn't, in-game i see pink, black icons it seems that it wont load my icon...
« Last Edit: November 01, 2011, 01:48:42 PM by xbooster »
Tommynator
Poster

Posts: 173

Tommynator is a traitor!


« Reply #1 on: November 01, 2011, 12:16:46 PM »


resource.AddFile("materials/vgui/ttt/icon_mycoolwep_tmp.$
xbooster
Poster

Posts: 14


« Reply #2 on: November 01, 2011, 12:37:51 PM »

I tried to copy it from linux nano editor to windows so it got changed by itself, real line is
resource.AddFile("materials/VGUI/ttt/icon_myserver_tmp.vmt")

Which still doesnt work
« Last Edit: November 01, 2011, 12:40:09 PM by xbooster »
BipolarDiZ
Poster

Posts: 101


|:NxS:| Staff! :D


« Reply #3 on: November 01, 2011, 05:36:13 PM »

Try making an add resource file seperate from the weapons. Navigate to lua/autorun/server and make a lua file like icons.lua and put all the add resources in there.

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: November 01, 2011, 06:58:19 PM »

Your resource.AddFile call refers to "icon_myserver_tmp", while the actual file is called "icon_mycoolwep_tmp".
xbooster
Poster

Posts: 14


« Reply #5 on: November 01, 2011, 10:58:29 PM »

Well it is icon_mycoolwep_tmp in script, it was called here myserv because i toke it from my other test script real fast to paste it here coz after copying from linux it got changed so it still doesnt seems to work :/
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: [Problem] my custom wep icons wont load « 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.