• Problems That Don't Need Their Own Thread v2.0
    5,020 replies, posted
The -console parameter won't work because the main menu's html panel loads in-front of it.
can anyone tell me why this dosent print anything even though the table is filled with entities [code] local foundents = ents.FindInSphere( tr.HitPos, 500 ) for k,v in pairs(foundents) do if v.IsValid() then print(v) end end [/code]
[QUOTE=Lizart;46710506]can anyone tell me why this dosent print anything even though the table is filled with entities [code] local foundents = ents.FindInSphere( tr.HitPos, 500 ) for k,v in pairs(foundents) do if v.IsValid() then print(v) end end [/code][/QUOTE] You're calling v.IsValid with no parameters when it expects the first parameter to be the entity. Both lines of code below are ways of achieving this. [code] v.IsValid(v) v:IsValid() [/code]
im really stupid - i have a bunch of entities (money printers which should be dropped to world, guns which should be given to the player/maybe dropped) in my gamemode, how do i hook up my shop menu to spawn these items? i've looked into other gamemodes and can't figure it out, is there some really simple "spawn entity from gamemode here" function im missing
Dunno where else to put this, but errm.. this is broken. PrintTable(GetGlobalFloat( "RoundEndTime" ))... HitBox<TAB>=<TAB>0 HitNonWorld<TAB>=<TAB>false HitGroup<TAB>=<TAB>0 HitPos<TAB>=<TAB>1664.031250 449.963409 74.809967 FractionLeftSolid<TAB>=<TAB>0.028805190697312 StartSolid<TAB>=<TAB>true Hit<TAB>=<TAB>true HitWorld<TAB>=<TAB>true SurfaceProps<TAB>=<TAB>30 Normal<TAB>=<TAB>-0.080426 0.982476 -0.168145 HitSky<TAB>=<TAB>false MatType<TAB>=<TAB>67 PhysicsBone<TAB>=<TAB>0 HitTexture<TAB>=<TAB>CONCRETE/CONCRETEWALL013A HitNormal<TAB>=<TAB>1.000000 0.000000 0.000000 Entity<TAB>=<TAB>Entity [0][worldspawn] Fraction<TAB>=<TAB>0.79986482858658 StartPos<TAB>=<TAB>1679.906738 256.031250 108.000237 HitNoDraw<TAB>=<TAB>false
[QUOTE=Blasteh;46711263]Dunno where else to put this, but errm.. this is broken. PrintTable(GetGlobalFloat( "RoundEndTime" ))... HitBox<TAB>=<TAB>0 HitNonWorld<TAB>=<TAB>false HitGroup<TAB>=<TAB>0 HitPos<TAB>=<TAB>1664.031250 449.963409 74.809967 FractionLeftSolid<TAB>=<TAB>0.028805190697312 StartSolid<TAB>=<TAB>true Hit<TAB>=<TAB>true HitWorld<TAB>=<TAB>true SurfaceProps<TAB>=<TAB>30 Normal<TAB>=<TAB>-0.080426 0.982476 -0.168145 HitSky<TAB>=<TAB>false MatType<TAB>=<TAB>67 PhysicsBone<TAB>=<TAB>0 HitTexture<TAB>=<TAB>CONCRETE/CONCRETEWALL013A HitNormal<TAB>=<TAB>1.000000 0.000000 0.000000 Entity<TAB>=<TAB>Entity [0][worldspawn] Fraction<TAB>=<TAB>0.79986482858658 StartPos<TAB>=<TAB>1679.906738 256.031250 108.000237 HitNoDraw<TAB>=<TAB>false[/QUOTE] Client or serverside?
[QUOTE=Lord of Boxes;46708403]So, I typed "-dxlevel 9" into the launch options for the game (Since I was experincing invisble playermodels, specifically after entering Scars) , but when I entered the game after this, the game went into the most downscaled resolution and crashed naturally, I went back to the properties, and got rid of that textline, and everything went back to normal, exept for the fact that I have to hold down the "`" key to get to the dev console, and while playing, pressing it simply crashes the game. do any of you guys know how to get rid of this problem Its making Gmod unplayable[/QUOTE] Pretty sure it's 90, not 9.
[QUOTE=Willox;46711279]Client or serverside?[/QUOTE] This is what it returns on the server.. The round timer on the clients are broken too, so guessing it's both? :s edit: fixed itself after map change
[lua]Panel: [name:Panel][class:Panel][660,342,50,50] why does this returns on panel:OnMousePressed(mc)[/lua] print(mc)?? thx in advanced
you're doing panel.OnMousePressed, not panel:OnMousePressed if you use a period instead of a colon when declaring functions, any time it gets called with a colon instead of a period the first argument is the object the function belongs to
thx
Is there a hook for when the ESC menu is present? I'm trying to see if making a custom ESC menu is possible.
not a hook, but there's [url=http://wiki.garrysmod.com/page/gui/IsGameUIVisible]this[/url] I made a [url=http://facepunch.com/showthread.php?t=1152853]library[/url] for that once, before we had some of the functions we do now the way it worked was by setting a var to false in HUDPaint, which doesn't get called if the main menu is open, and then setting it to true in PostRenderVGUI, which gets called whether the main menu is open or not if that var was ever true after HUDPaint would be called, I would close the default menu and toggle my lua menu
[QUOTE=mib999;46712454]Is there a hook for when the ESC menu is present? I'm trying to see if making a custom ESC menu is possible.[/QUOTE] I THINK that's what Map In A Box was working on here: [url]http://facepunch.com/showthread.php?p=46568434#post46568434[/url]
[QUOTE=PortalGod;46712514]not a hook, but there's [url=http://wiki.garrysmod.com/page/gui/IsGameUIVisible]this[/url] I made a [url=http://facepunch.com/showthread.php?t=1152853]library[/url] for that once, before we had some of the functions we do now the way it worked was by setting a var to false in HUDPaint, which doesn't get called if the main menu is open, and then setting it to true in PostRenderVGUI, which gets called whether the main menu is open or not if that var was ever true after HUDPaint would be called, I would close the default menu and toggle my lua menu[/QUOTE] Thanks buddy, this helps me a bunch. c: [B]Edit:[/B] Another question, am I able to make the width of a "DHorizontalScroller" the same width of a panel, I don't know if I'm phrasing it correctly, but I'd like these buttons to span across the whole DFrame. [thumb]http://puu.sh/dv0yS/f7a49d5f72.jpg[/thumb] I'm going to sleep, it's probably something easy but I'm clueless.
How can I rotate a textured rect or the texture on it? EDIT: Also how do I hide the worldmodel of a weapon?
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawTexturedRectRotated]surface.DrawTexturedRectRotated[/url]?
[QUOTE=Smt;46711176]im really stupid - i have a bunch of entities (money printers which should be dropped to world, guns which should be given to the player/maybe dropped) in my gamemode, how do i hook up my shop menu to spawn these items? i've looked into other gamemodes and can't figure it out, is there some really simple "spawn entity from gamemode here" function im missing[/QUOTE] bumpy, can anyone help me on my stupidness? (&#9685;&#8255;&#9685;&#10047;)
[QUOTE=Smt;46715133]bumpy, can anyone help me on my stupidness? (&#9685;&#8255;&#9685;&#10047;)[/QUOTE] ents.Create?
[QUOTE=Kogitsune;46714391][IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/surface/DrawTexturedRectRotated"]surface.DrawTexturedRectRotated[/URL]?[/QUOTE] How do you do the Wiki link with the icon? [sp]Problem that doesn't need its own thread[/sp]
[QUOTE=Revenge282;46716374]How do you do the Wiki link with the icon? [sp]Problem that doesn't need its own thread[/sp][/QUOTE] [img]https://lh6.googleusercontent.com/-4H-7E2QNGJs/VI6WGl-Zs3I/AAAAAAAADYY/EyDfLwxz5rM/s0/2014-12-15_09-04-14.png[/img]
I'm registering my own DButton VGUI element and for some reason can't get polygons nor my rectangles to draw properly. Any ideas or suggestions? [lua] function _Panel:Paint(w, h) local x, y = self:GetPos(); if !self.Edges then self.x_max, self.y_max = self:GetWide(), self:GetTall(); print(x, y, self.x_max, self.y_max); self.Edges = { {x = x, y = y}, {x = x+(self.x_max-(self.x_max/8)), y = y, }, {x = x+self.x_max, y = y+(self.y_max/4)}, {x = x+self.x_max, y = y+self.y_max}, {x = x, y = y+self.y_max} }; self.NumFade = 25; return false; end surface.DisableClipping( true ); surface.SetDrawColor( 255, 0, 0, 255 ); draw.NoTexture(); surface.DrawPoly(self.Edges); for i = 1, self.NumFade do surface.SetDrawColor( 255, 0, 0, 255-(i*(255/self.NumFade)) ); surface.DrawRect( (x-(i*ScreenScale(5))), y, ScreenScale(5), self.y_max ); end return true; end [/lua] It was drawing like this previously: [QUOTE][IMG]http://cloud-4.steampowered.com/ugc/47616634712441313/CC3EF9F1B557CF777BA6FAF49107A813A87034C5/[/IMG][/QUOTE] However, now it's not drawing at all.
[QUOTE=ms333;46716078]ents.Create?[/QUOTE] im sure i tried that but it just didn't work, maybe i'm just more retarded than i though but ill try it again edit: i think the part im having trouble with is networking (assuming thats what i'm meant to do) from the client's menu to the server to spawn the ent, is there like a nice tutorial somewhere for making a simple shop system or something?
how would I go about creating a circle that expands outwards? im trying to create an EMP grande effect of som sort
can someone help me in here? :( sorry if its not allowed to post another thread in here but.. yeah.. i'm so tired of searching and searching and trying etc, and can't get it to work etc.. i really need help :( [url]http://facepunch.com/showthread.php?t=1441911[/url]
What functions should i use to attach prop models to a bone? (Never done this before)
Does anybody know of a good way to fix hitboxes for TTT? players are lag compensated but i keep getting people complaining of being unable to headshot people, and the only way i can reliably headshot people is by shooting them in the neck, otherwise the player either takes the normal damage or takes no damage at all
So I was putting together a little help menu [img]http://i.imgur.com/mn32ZmD.png[/img] The idea is to have buttons over that white DPanel on the left, which when pressed change that help text to something else, i.e update page/a list of challenges/etc stuff like that I know I could easily do text:SetText("new text here") when you click the DButton, which was my original intention, but is that really the method people use for doing these sort of menus or is there another way I could go about this?
I'm a non-developer trying to make a gamemode with developers who don't do anything; where can I find resources to help me with scraping together working code for Gmod?
I have a quick question, does anyone have a clue when http requests are queued, sent, and received? A quick example is with MySQLOO uses the Think hook to process requests, requiring players to be available.
Sorry, you need to Log In to post a reply to this thread.