What's the command that shows clientside frametime performance stuff?
It looked like it was built into source as a debug command and showed like graphs which showed why a frame would take so long to render.
vprof?
[editline]9th June 2015[/editline]
[url]https://github.com/wiox/gmcl_vprof[/url]
A friend and I are trying to revive an outdated gamemode called Naval Warfare.
One of our major problems is that none of the shit that happens on the server saves.
- ULX doesnt save to the data folder
- Player progression/etc doesn't save
- dupe/tool/etc data doesn't save
We are running on a Linux server and NONE of the folders have capitals in them so, that is not the issue.
I removed most of the errors that involve outdated syntax (effects.halo.Add/etc) and our server doesn't produce errors. I have no idea what to do but, what my friend suggested to do is rebuild and/or make a new database.
Any suggestions?
[QUOTE=MattJeanes;47917261]What's the command that shows clientside frametime performance stuff?
It looked like it was built into source as a debug command and showed like graphs which showed why a frame would take so long to render.[/QUOTE]
+showbudget?
[IMG]http://i.imgur.com/g5nbhAt.jpg[/IMG]
For some reason whenever I shoot the entity I'm working on, the stencils bugs out like this. I'm unsure how to fix it though, any ideas?
I've been working on a modelchooser, as a plugin to a gamemode.
Normally, it's been fine, and loads. However, I changed it a few weeks ago, and when uploaded it started throwing the error..
[code]
[ERROR] expected near "end"
path/to/modelchooser/cl_init.lua:0
[/code]
If anyone needs to see the code, feel free to PM me. However, I don't think that the code is the issue. I have gone over it multiple times, and it should work. As I said before, it's very strange.
Note: I have just added and end to the very end of the file, seeing if this will help. However, I haven't had a chance to push it, restart the server and test.
It's less of a problem with the code, and more that I really don't know what the error is.
So I need help with [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Category:DCategoryList"]DCategoryList[/URL]. I am trying to add an element within the categories in the list, but the contents of those categories are not visible. I have spent about 10 straight hours on figuring out why [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Category:DCollapsibleCategory"]DCollapsibleCategory[/URL] elements do this, and I can't figure anything except it might have to do with the [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Panel/Dock"]Panel:Dock[/URL] function (called internally by [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Category:DCollapsibleCategory"]DCollapsibleCategory:SetContents[/URL]). Calling [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Panel/Dock"]Panel:Dock[/URL](TOP) on the element within the category after [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Category:DCollapsibleCategory"]DCollapsibleCategory:SetContents[/URL] is called makes it appear, albeit at the smallest size possible.
[lua]local PANEL = {}PANEL.W = ScrW()*.5
PANEL.H = ScrH()*.75
function PANEL:Init()
self:SetSize(self.W,self.H)
self:SetTitle('Inventory')
self:Center()
self:MakePopup()
local catlist = vgui.Create('DCategoryList',self)
catlist:Dock(FILL)
local sec = catlist:Add('Test')
local gridt = vgui.Create('DButton',sec)
gridt:SetText('Test')
sec:SetContents(gridt)
end
vgui.Register('inventory',PANEL,'DFrame')[/lua]
Please help, this has been a literal 12 hour affair, and I have looked at everything in GMod that uses either DCategoryList or DCollapsiblePanel.
[T]http://puu.sh/ijn5e/3aa75971b7.png[/T]
How exactly would I create my own animations for Garry's Mod? I want to add proper animations and I'd like to see how to get started.
[QUOTE=wauterboi;47921689]How exactly would I create my own animations for Garry's Mod? I want to add proper animations and I'd like to see how to get started.[/QUOTE]
If you mean player animations - there's no clean/proper way of doing it. Otherwise the modelling forums is this way: [url]http://facepunch.com/forumdisplay.php?f=40[/url]
[code]function file.Read( filename, path )
if ( path == true ) then path = "GAME" end
if ( path == nil || path == false ) then path = "DATA" end
local f = file.Open( filename, "rb", path )
if ( !f ) then return end
local str = f:Read( f:Size() )
f:Close()
if ( !str ) then str = "" end
return str
end
[/code]
I want to write a convenience func for returning what files that aren't in the "data" or "garrysmod" folder of the game's files read. I know how to use file.CreateDir and file.Write to do this by creating stuff in the data and garrysmod folder, but I want to be able to do something involving different directories... need a little help.
What's the method for connecting players to other servers? I've done it before but I can't remember it
[code]
RunConsoleCommand("connect", "ip")
[/code]
Just drops me to the main menu
[QUOTE=NiandraLades;47926642]What's the method for connecting players to other servers? I've done it before but I can't remember it
[code]
RunConsoleCommand("connect", "ip")
[/code]
Just drops me to the main menu[/QUOTE]
[url]http://wiki.garrysmod.com/page/Global/JoinServer[/url]
Use it like this:
[code]JoinServer( "ip" )[/code]
[QUOTE=A Fghtr Pilot;47926708][url]http://wiki.garrysmod.com/page/Global/JoinServer[/url]
Use it like this:
[code]JoinServer( "ip" )[/code][/QUOTE]
it's menu stated. You can't use it clientside or serverside.
[QUOTE=kpjVideo;47907677]This is copy+pasta'd from a thread I made but I figured someone here might know:
Hello, I'm having an issue with an animation for a weapon ported from csgo.
The animation (to inspect the weapon) has around a 6 second delay so I've tried to solve that using this:
[code]
function SWEP:Think()
--Key is just temp for testing ofc
if self.Owner:KeyPressed(IN_JUMP) then
self.Weapon:SendWeaponAnim( ACT_VM_IDLE ) --play anim
self.Owner:GetViewModel():SetPlaybackRate( 7 ) --set the speed high
timer.Simple( 0.4, function() self.Owner:GetViewModel():SetPlaybackRate( 2 ) end ) --set speed back after 2.4 seconds to slow back down skipping the 6 seconds
end
end
[/code]
Hopefully someone will understand what I'm trying to accomplish :P[/QUOTE]
You should NEVER use timers in SWEP codes. Just do something with CurTime().
[editline]10th June 2015[/editline]
[QUOTE=Tomelyr;47926733]it's menu stated. You can't use it clientside or serverside.[/QUOTE]
Ugh, forgot. :suicide:
[QUOTE=A Fghtr Pilot;47926739]You should NEVER use timers in SWEP codes. Just do something with CurTime().[/QUOTE]
Why not? As long as you do validity checks it will work fine.
I have a screen that renders a view from a camera to a render target using render.RenderView() about twice a second. I learned the hard way that Garry's Mod is not very fond of render.RenderView() being used from inside of an entity draw hook, so I moved it to HUDPaint and wrapped it in cam.Start2D(). This worked great, except flashlights and dynamic lights would flicker at the rate the camera view was being updated. I fixed the flashlight flickering by changing the hook to PreRender, but I couldn't find a single hook where dynamic lights were unaffected.
Has anyone else experienced this or know a solution?
[QUOTE=G4MB!T;47927541]Why not? As long as you do validity checks it will work fine.[/QUOTE]
I think [quote]You should NEVER use timers in SWEP codes[/quote] was meant to mean [quote]You should NEVER use timers in [I][URL="http://wiki.garrysmod.com/page/Prediction"]predicted functions[/URL][/I][/quote]
-snip-
Can you draw a child panel behind the parent panel in VGUI?
I am trying to make the parent clickable over the child element, but I am not having so much luck...
[lua]self:SetZPos(10) self.icon:SetZPos(-5)[/lua]
self.icon being the child of the two.
[QUOTE=Shenesis;47929493][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/SetMouseInputEnabled]Panel:SetMouseInputEnabled[/url] on the child element[/QUOTE]
I figured that out earlier. Thanks though!
when i try to get a higher res picture in gmod using the poster command
[QUOTE]] poster 4
Allocating 126.6 MB for poster
RELOAD [screenshots\]
ShaderAPIDX8::CreateD3DTexture: D3DERR_INVALIDCALL[/QUOTE]
last line is meant to be in red, when i take the picture after letting it load and come up with these, nothing changes get normal sized pictures and no multiple pictures have been taken, someone said dont use bloom and even then it still didnt work, any idea?
Go in DX9 mode.
[QUOTE=ExtReMLapin;47931015]Go in DX9 mode.[/QUOTE]
Might sound dumb but im not sure how to do that, do I have to type something into the launch options or something?
Well, i'm not an engineer but it seems the command poster is calling a function to the DX8 api so it seems you're running DirectX 8 , try this in the launch options
-dxlevel 91
if it doesn't work
-dxlevel 90
95, not 91 or 90
[QUOTE=Robotboy655;47931295]95, not 91 or 90[/QUOTE]
Uh ... ok but why is it called 95 and not 93 ? DX 9 feature stop at 9_3 not at 9_5 .
Edit :
oh ok, because valve
[QUOTE]To test lower-quality DirectX levels on a more advanced graphics card, use the mat_dxlevel CVAR. Set it to 60, 70, 80, 81, 90, 95 or 98 to set the corresponding DirectX version; it is not possible to run at a higher level than the graphics hardware is capable of.[/QUOTE]
[QUOTE=A Fghtr Pilot;47926739]You should NEVER use timers in SWEP codes. Just do something with CurTime().
[/QUOTE]
Everything I've tried so far hasn't worked out :(
I'm trying to make a entity that draws a decal to the world just the infodecal entity work in hammer, so you can move the entity around and change the material on demand, but I have to idea how to find the correct surface(s) and the correct position on that surface with out a shitload of traces to work it out. its only for a singleplayer developer tool but id rather avoid that many traces when ever you move the entity
[editline]11th June 2015[/editline]
Actually that might work; only redo the traces once a second until it stops moving
[editline]11th June 2015[/editline]
Also, how to I make render.DrawQuadEasy not show on top of the world at all times? I want to use it as a decal preview but it draws even when the world should be covering it
[QUOTE=NiandraLades;47926642]What's the method for connecting players to other servers? I've done it before but I can't remember it
[code]
RunConsoleCommand("connect", "ip")
[/code]
Just drops me to the main menu[/QUOTE]
I recall that you have to use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/ConCommand]Player:ConCommand[/url] clientside for it to work. The problem with using RunConsoleCommand, IIRC, is it puts quotes around the command and argument(s) when executing them.
Sorry, you need to Log In to post a reply to this thread.