Well, I put this in init..
[CODE]if SERVER then
resource.AddSingleFile( "content/materials/coin.vtf" )
end[/CODE]
its inside of my gamemode (I have a file named: Content and a file inside of that called materials)
When I join it dosen't download and, it dosent load up when I use
[CODE] -- This is inside of a HUDPaint and paints onto the screen but the image dosent
if not IsValid(coin) then
coinimage = vgui.Create("DImage")
coinimage:SetSize(25, 25)
coinimage:SetPos(115, ScrH() - 83)
coinimage:SetImage("content/materials/coin.vtf", "vgui/avatar_default") -- The last image location is if the image dosent load then it sets it to a [?] on the screen! and dosent load the image?
end[/CODE]
Do I have to use png because it has to be! vtf don't work well? and I have converted the png to vtf...
please help!
In the path when u request the vtf or add it to resource you dont need the content bit eg "materials/coin.vtf"
Well that didn't do anything, and now its an error...
when I join the server it dosen't download the file? why?
[editline]6th August 2016[/editline]
[QUOTE=rtm516;50838595]In the path when u request the vtf or add it to resource you dont need the content bit eg "materials/coin.vtf"[/QUOTE]
[editline]6th August 2016[/editline]
[QUOTE=rtm516;50838595]In the path when u request the vtf or add it to resource you dont need the content bit eg "materials/coin.vtf"[/QUOTE]
Is there a way to download it no matterwhat?
resource.AddSingleFile( "content/materials/coin.vtf" )
Read [url]http://wiki.garrysmod.com/page/resource/AddSingleFile[/url] on how to use the function.
coinimage:SetImage("content/materials/coin.vtf", "vgui/avatar_default")
Read [url]http://wiki.garrysmod.com/page/DImage/SetImage[/url] on how to use the function.
[QUOTE=Robotboy655;50838642]resource.AddSingleFile( "content/materials/coin.vtf" )
Read [url]http://wiki.garrysmod.com/page/resource/AddSingleFile[/url] on how to use the function.
coinimage:SetImage("content/materials/coin.vtf", "vgui/avatar_default")
Read [url]http://wiki.garrysmod.com/page/DImage/SetImage[/url] on how to use the function.[/QUOTE]
Dosen't load, nor does it download when the player joins?
Shouldn't it just be coin.vtf instead of content/materials/coin.vtf?
[QUOTE=MPan1;50838686]Shouldn't it just be coin.vtf instead of content/materials/coin.vtf?[/QUOTE]
Thanks but non of it is downloading, and non of the ideas are working?
[editline]6th August 2016[/editline]
Ok so now another senario, it does download. But it dosent load?
[editline]6th August 2016[/editline]
[CODE]coinimage:SetImage("content/materials/coin.vtf", "vgui/avatar_default")[/CODE]
this like here, is the one line that is bugging me!
It sets the image to the far end image [?]
why isn't working? !!
Sorry, you need to Log In to post a reply to this thread.