Use surface.GetTextSize to get the width and height of the text beforehand, after that draw the rounded box with that information.
[QUOTE=>>;39531969]What's the difference between table.Count(tbl) and #tbl?[/QUOTE] table.Count loops through the table to count it, this way it also allows non-numerical keys to be counted. You can find details on this in the Lua pil.
[QUOTE=R@Rdeathmatch;39472337]You diden't understand my question. [u]Example[/u] I create a rules.txt file, inside the file are 30 rules. Then I create a MOTD and I want to include the rules.txt file so all the rules from the files will show up on the MOTD.[/QUOTE] He wa...
Is it possible to make custom convars that can be set even before the lua has started to initialize? So for use as startup parameters?
Use the larger and less than operators: > and < There aint no function for it afaik because it's too damn easy.
[QUOTE=hellguy;39416877]I got this code, it tells you who killed you and if he was innocent or traitor. [CODE]if ( SERVER ) then hook.Add( "PlayerDeath", "CHIIPPPSS" , function( Pl, Ent, Killer ) umsg.Start( "PlayerDeathCustom", Pl ) umsg.Entity( K...
[QUOTE=Banana Lord.;39389538] Thanks for ninjaing me, but regarding the SELECT statement, it looks like he's doing it to prevent 3 SQL errors if the user isn't in the database (which they could technically all be combined into one query, and an ON DUPLICATE KEY UPDATE)[/QUOTE...
[QUOTE=NintendoEKS;39386188]I'm having a bit of trouble saving users information to a database upon the player disconnecting. The save function works like a charm, how ever when used in the hook GM:PlayerDisconnected, the user is removed from the server before it has a chance...
The first thing you tried but then with surface.SetMaterial rather than SetTexture.
I've not been very active in the recent Gmod updates, but did Garry ever add the ability to send files to players while in-game, like sourcenet was capable of doing? I remember him saying he would like it if players would be able to join servers faster.
-snip- Nevermind that, just read this, it will explain why it isn't working in the additional notes: [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index5f71.html[/url]
Someone here doesn't happen to know how to repeat a texture using surface.DrawTexturedRectUV rather than stretch it? Haven't worked with this function for ages and so far it's taken me too long to do what I've been trying to do.
You can use :GetClass() on it, the Weapon class is based of the Entity class like players and vehicles.
NinjaS is right, additionally if you AddFile a .vmt ONLY the vtf of the basetexture will be auto added to the list, no bumpmaps or stuff like that.
Make sure it isn't run on the client. [editline]5th December 2012[/editline] Where it doesn't exist
It needs to be named "gmsv_tmysql4_win32.dll" in "lua/bin/"
What you want isnt possible (yet, garru please) without gatekeeper.
They're in icon16/ now, and they are PNG's
-snip- nvm I shouldn't be unpacking varargs anyway.
You are going to run into a lot more issues with Blackbox Lite than just those bits of code. It's my version of Blueprint 2 for gmod12. Having said its based of a framework by kuro, go figure how much broke in this update.
Almost all those fonts have been removed
-snip- Wow I had that tab open for a long long time.
Since I still have no idea how to properly change the GWEN skin my panels use, I've gone the hacky way: [lua]local old = Material("gwenskin/GModDefault.png"); local new = Material("gwenskin/MyGWENSkin.png"); old:SetTexture("$basetexture", new:GetTexture("$basetexture"))...
[QUOTE=Hyper Iguana;38153455]Are you editing a gamemode or making one from scratch yourself? if editing: find where they redefined IsAdmin and change it yourself if making new gamemode: [lua] local Player = FindMetaTable("Player") function Player:IsAdmin() ...
What else, other than being in the "admin" usergroup, makes someone an admin according to IsAdmin?: [img]http://i.imgur.com/9j2LR.png[/img] I haven't overriden Player.IsAdmin, so I don't think (think) it's any of my code interfering. [editline]23rd October 2012[/editlin...
Can anyone tell me how to change the GWEN skin to a custom one for 1 or all vgui elements?
[url]http://code.google.com/p/blackawps-glua-modules/source/browse/trunk/gm_tmysql4/Release/[/url] Works, though you will have to slightly modify your existing code
Also put a second argument in the file.Exists that is "DATA". [editline]9th October 2012[/editline] Wait I just saw what chessnut said, derp ninja
I bet you it's a nil value [editline]7th October 2012[/editline] Show the part where you set TEAM
You are probably not even calling the function, and are actually speeding up the player when they go under 40 health
[url]http://wiki.garrysmod.com/page/Classes/NPC[/url] Use NPC:SetLastPosition(vector) to set the position to go to (do a trace forward on the ground or in the direction you want to walk in) and NPC:SetSchedule(SCHED_FORCED_GO_RUN) to make the play run or without _RUN to ma...
Okay so I figured out that I was creating my HTML panel too soon, I made it the size of the screen, but in the first call of HUDPaint and HUDDrawScoreBoard the screensize in ScrW and ScrH is apparently 256 :/ Additionally, when I change the size at any time later the actual bo...