Can traces hit clientside entities, if so with what mask and/or filter, and if not, what are the alternatives (spawning a serverside entity seems a little pointless just to remove it after the trace)? Any special kind of traces?
[QUOTE=MPan1;48715828]Can traces hit clientside entities, if so with what mask and/or filter, and if not, what are the alternatives (spawning a serverside entity seems a little pointless just to remove it after the trace)? Any special kind of traces?[/QUOTE]
I imagine the trace would have to be performed clientside then, and maybe use MASK_ALL or something?
EDIT:
Nope, doesn't work.
[editline]18th September 2015[/editline]
K problem of my own: How do I format a number so that if the number is smaller than 10, it starts with a 0? 01, 02, 03, etc.
[QUOTE=Z0mb1n3;48716589]K problem of my own: How do I format a number so that if the number is smaller than 10, it starts with a 0? 01, 02, 03, etc.[/QUOTE]
[code]
string.format("%02d", somenumber)
[/code]
I want to make cars not targetable with tool gun for not-admin usergroups. Gamemode is DarkRP.
Anyone knows how to do that?
[QUOTE=P4sca1;48717428]I want to make cars not targetable with tool gun for not-admin usergroups. Gamemode is DarkRP.
Anyone knows how to do that?[/QUOTE]
Add the entity to the FPP toolgun blacklist. I'm not sure what entity it is though...
how can i fit hud in to a screen? position of what i draw changes between resolutions
[QUOTE=DaRkWoRlD1337;48717524]how can i fit hud in to a screen? position of what i draw changes between resolutions[/QUOTE]
Here you go:
[url]http://wiki.garrysmod.com/page/Global/ScrH[/url]
[url]http://wiki.garrysmod.com/page/Global/ScrW[/url]
[QUOTE=HDG_MrDeeJayy;48717499]Add the entity to the FPP toolgun blacklist. I'm not sure what entity it is though...[/QUOTE]
I added prop_vehicle_jeep top the toolgun blacklist. It is working fine now, thanks for your help! :)
How should I go back drawing text over func_button? HUDPaint hook?
[editline]20th September 2015[/editline]
Second thoughts, I can just use a trace/hover over but 2d3d text above would be nicer
[editline]20th September 2015[/editline]
Using trace.Entity:GetClass() returns class C_BaseEntity instead of func_button which you get serverside - hope that'll be okay for buttons
trying to upload an addon to the workshop, getting this error
[code]couldn't load icon - is it a jpeg?[/code]
tried with jpg, png and jpeg, it's 512x512
[QUOTE=Scarface3353;48725271]trying to upload an addon to the workshop, getting this error
[code]couldn't load icon - is it a jpeg?[/code]
tried with jpg, png and jpeg, it's 512x512[/QUOTE]
put the jpg on the paint and save it as jpg again. should work.
Any way to rotate the angle at which you are spectating something? Example, you are killed and rather than freely being able to rotate your view around your body, the camera slowly angles itself pointing straight down?
I tried setting the player's eye angles, but that did nothing.
EDIT:
Nevermind, it's working now.
Someone made a support ticket saying the ScriptEnforcer code wasn't working and it's because his hostip command is empty. Does anyone know why? Is it Singleplayer or something?
[QUOTE=YaYaBinks3;48731496]Someone made a support ticket saying the ScriptEnforcer code wasn't working and it's because his hostip command is empty. Does anyone know why? Is it Singleplayer or something?[/QUOTE]
hostip is empty in singleplayer.
[QUOTE=YaYaBinks3;48731496]Someone made a support ticket saying the ScriptEnforcer code wasn't working and it's because his hostip command is empty. Does anyone know why? Is it Singleplayer or something?[/QUOTE]
The hostip command is usually empty. There's not really any need to set it to anything, as it just runs on whatever IP the server is.
If he's hosting the game by clicking "Start Singleplayer" and changing the player limit, correct me if I'm wrong but that's a no-no.
Hello. I've been working on a binary module that will eventually allow me to modify the default console from the menu state.
To accomplish this, I've grabbed [URL="https://developer.valvesoftware.com/wiki/IGameConsole"]a header[/URL] and some code from the Valve Developer Wiki and used it in my project.
What I currently have will allow me to clear the console via a Lua function (not a console command), but first I wanted to test the code.
Unfortunately, I can't seem to get it to work.
Here's my code: [URL="https://github.com/zerfgog/gm_console"]https://github.com/zerfgog/gm_console[/URL]
And here's the error (this line prints every time I try to run the module): [URL="https://github.com/zerfgog/gm_console/blob/master/src/main.cpp#L20"]https://github.com/zerfgog/gm_console/blob/master/src/main.cpp#L20[/URL]
[URL="https://dl.dropboxusercontent.com/u/55311295/ShareX/2015/09/gmsv_console_win32.dll"]Here's a build[/URL] if anyone wants to try it without compiling.
Thanks.
How can I check if an entity is a nextbot?
[QUOTE=Z0mb1n3;48735131]How can I check if an entity is a nextbot?[/QUOTE]
ent.Type == "nextbot"
[QUOTE=zerf;48735278]ent.Type == "nextbot"[/QUOTE]
It's literally just a value on the entity's table?
Okay.
Can I get an example of how to use this: [url]http://wiki.garrysmod.com/page/Global/RenderDoF[/url]
I would try with trial and error to understand it but it crashes your game if you get it wrong and it be faster to just see what inputs it actually needs.
Here is what I tried to do that crahsed:
[lua]
RenderDoF( LocalPlayer():GetPos(), LocalPlayer():GetAngles(),LocalPlayer():GetPos()+Vector(0,1000,0), 90, 1, 1, true, 90 )
[/lua]
[QUOTE=bran92don;48736487]Can I get an example of how to use this: [url]http://wiki.garrysmod.com/page/Global/RenderDoF[/url]
I would try with trial and error to understand it but it crashes your game if you get it wrong and it be faster to just see what inputs it actually needs.
Here is what I tried to do that crahsed:
[lua]
RenderDoF( LocalPlayer():GetPos(), LocalPlayer():GetAngles(),LocalPlayer():GetPos()+Vector(0,1000,0), 90, 1, 1, true, 90 )
[/lua][/QUOTE]
Well for starters, you're using a boolean instead of a table for the second to last argument. That'll probably do it. Pass it 'nil', that might work.
[QUOTE=Z0mb1n3;48736713]Well for starters, you're using a boolean instead of a table for the second to last argument. That'll probably do it. Pass it 'nil', that might work.[/QUOTE]
That didn't work either game crash still.
[QUOTE=bran92don;48736487]Can I get an example of how to use this: [url]http://wiki.garrysmod.com/page/Global/RenderDoF[/url]
I would try with trial and error to understand it but it crashes your game if you get it wrong and it be faster to just see what inputs it actually needs.
Here is what I tried to do that crahsed:
[lua]
RenderDoF( LocalPlayer():GetPos(), LocalPlayer():GetAngles(),LocalPlayer():GetPos()+Vector(0,1000,0), 90, 1, 1, true, 90 )
[/lua][/QUOTE]
You're using 8 arguments whereas the Wiki shows 9, maybe you skipped one and are now using different arguments than what you should
you could try to see how garry used it to understand it better
[url]https://github.com/garrynewman/garrysmod/blob/ead2b4d7f05681e577935fef657d4a4d962091e6/garrysmod/lua/autorun/client/demo_recording.lua#L27-L125[/url]
[QUOTE=zerf;48734174]Hello. I've been working on a binary module that will eventually allow me to modify the default console from the menu state.
To accomplish this, I've grabbed [URL="https://developer.valvesoftware.com/wiki/IGameConsole"]a header[/URL] and some code from the Valve Developer Wiki and used it in my project.
What I currently have will allow me to clear the console via a Lua function (not a console command), but first I wanted to test the code.
Unfortunately, I can't seem to get it to work.
Here's my code: [URL="https://github.com/zerfgog/gm_console"]https://github.com/zerfgog/gm_console[/URL]
And here's the error (this line prints every time I try to run the module): [URL="https://github.com/zerfgog/gm_console/blob/master/src/main.cpp#L20"]https://github.com/zerfgog/gm_console/blob/master/src/main.cpp#L20[/URL]
[URL="https://dl.dropboxusercontent.com/u/55311295/ShareX/2015/09/gmsv_console_win32.dll"]Here's a build[/URL] if anyone wants to try it without compiling.
Thanks.[/QUOTE]
I don't see any signs of gmod using that header. If I had to guess I'd say [url=https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/vgui2/vgui_controls/consoledialog.cpp]this[/url] would be what gmod uses?
[editline]22nd September 2015[/editline]
[url]https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/public/vgui_controls/consoledialog.h[/url]
This might be relevant as well. Not sure how to go about accessing it though. Haven't looked into it too hard.
How can I paint the Column on a DListView Panel?
I have a derma panel created by a concommand. Variables are recorded via button presses of the panel. What is the simplest way to store/remember those variables to persist even when the panel is removed or reopened? (My understanding is that when you reopen it literally reruns all the commands including the ones that declared the variables on vgui creation.
I'm checking to see if there is a simpler way but it seems I would need to remove all my initial variable references to outside of the frame at the top of the script so they just exist upon loading of the script itself. Then the values shouldn't be affected when the panel is open or close...is my understanding correct?
[QUOTE=Blakestr;48739961]I have a derma panel created by a concommand. Variables are recorded via button presses of the panel. What is the simplest way to store/remember those variables to persist even when the panel is removed or reopened? (My understanding is that when you reopen it literally reruns all the commands including the ones that declared the variables on vgui creation.
I'm checking to see if there is a simpler way but it seems I would need to remove all my initial variable references to outside of the frame at the top of the script so they just exist upon loading of the script itself. Then the values shouldn't be affected when the panel is open or close...is my understanding correct?[/QUOTE]
Yes. If you initialize the variable outside of the panel creation (the scope of the panel), then any time the panel changes those variables, their new value can still be accessed anywhere in the file after the lines where you created the variables.
This may be a very simple question, but I can't seem to figure this out:
Does the following code use awesomium?
Source: [url]http://wiki.garrysmod.com/page/Panel/SetHTML[/url]
[code]
local HTML = vgui.Create( "HTML", DPanel )
HTML:SetHTML( "<p>Put HTML code here</p>" )
HTML:SetSize( 390, 400 )
[/code]
[QUOTE=EthanTheGreat;48740061]Does the following code use awesomium?[/QUOTE]
What else do you think it would use?
Sorry, you need to Log In to post a reply to this thread.