• Help with custom HUD textures
    3 replies, posted
[lua] QuadTable.texture = surface.GetTextureID("????????") QuadTable.color = Color( 255, 255, 255, 245 ) QuadTable.x = 0 QuadTable.y = ScrH() - 200 QuadTable.w = 200 QuadTable.h = 200 draw.TexturedQuad( QuadTable )[/lua] And I have the texture in gamemodes/Assassin/content/materials/TheArcade/9(2).vtf Where do I put my texture so the clients will get it, and what do I call in surface.GetTextureID()? AND do I need to do something special to get the client to download the file?
surface.GetTextureID is relative to the material directory, so put it in there. And yes, to make a client download a file you use the [url=http://wiki.garrysmod.com/?title=Resource.AddFile]resource.AddFile[/url] function; for example: [code]resource.AddFile("Assassin/TheArcade/9(2).vtf")[/code]
But would I do resource.AddFile("content/materials/TheArcade/9(2)") or Assassin/content... or materials/TheArcade... or TheArcade/9(2)... or gamemodes/Assassin... and then would I do surface.GetTextureID("Assassin/content/materials/TheArcade/9(2)" or gamemodes/Assassin... or content/materials... or materials/TheArcade... or TheArcade/9(2)
Since it's in the gamemode content, I believe it would be like this: [code]resource.AddFile("materials/TheArcade/9(2).vtf") resource.AddFile("materials/TheArcade/9(2).vmt") local tex = surface.GetTextureID("TheArcade/9(2)")[/code] Not as sure about the second one, but see if that'll work.
Sorry, you need to Log In to post a reply to this thread.