33 Results
Use surface.GetTextSize to get the width and height of the text beforehand, after that draw the rounded box with that information.
TheJjokerR Developing Reply
[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.
TheJjokerR Developing Reply
[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...
TheJjokerR Developing Reply
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?
TheJjokerR Developing Reply
Use the larger and less than operators: > and < There aint no function for it afaik because it's too damn easy.
TheJjokerR Developing Reply
[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...
TheJjokerR Developing Reply
[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...
TheJjokerR Developing Reply
[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...
TheJjokerR Developing Reply
The first thing you tried but then with surface.SetMaterial rather than SetTexture.
TheJjokerR Developing Reply
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.
TheJjokerR Developing Reply
-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]
TheJjokerR Developing Reply
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.
TheJjokerR Developing Reply
You can use :GetClass() on it, the Weapon class is based of the Entity class like players and vehicles.
TheJjokerR Developing Reply
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.
TheJjokerR Developing Reply
Make sure it isn't run on the client. [editline]5th December 2012[/editline] Where it doesn't exist
TheJjokerR Developing Reply
It needs to be named "gmsv_tmysql4_win32.dll" in "lua/bin/"
TheJjokerR Developing Reply
What you want isnt possible (yet, garru please) without gatekeeper.
TheJjokerR Developing Reply
They're in icon16/ now, and they are PNG's
TheJjokerR Developing Reply
-snip- nvm I shouldn't be unpacking varargs anyway.
TheJjokerR Developing Reply
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.
TheJjokerR Developing Reply
Almost all those fonts have been removed
TheJjokerR Developing Reply
-snip- Wow I had that tab open for a long long time.
TheJjokerR Developing Reply
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"))...
TheJjokerR Developing Reply
[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() ...
TheJjokerR Developing Reply
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...
TheJjokerR Developing Reply
Can anyone tell me how to change the GWEN skin to a custom one for 1 or all vgui elements?
TheJjokerR Developing Reply
[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
TheJjokerR Developing Reply
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
TheJjokerR Developing Reply
I bet you it's a nil value [editline]7th October 2012[/editline] Show the part where you set TEAM
TheJjokerR Developing Reply
You are probably not even calling the function, and are actually speeding up the player when they go under 40 health
TheJjokerR Developing Reply
[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...
TheJjokerR Developing Reply
When I create a HTML panel too soon after loading the gamemode, the size of the HTML content will turn to 256x256. Even though the panel is actually the size of the entire screen, the javascript and css in the panel will think it's 256x256. How do I fix this? Refreshing the...
TheJjokerR Developing Reply
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...
TheJjokerR Developing Reply