I'm attempting to make a SWEP that uses VElements to put a laser dot in the center of the screen. When I aim down the ironsights on the weapon, the dot appears out of place to the left of the weapon, and I'd like to make it so that when I aim down the sights, it hides the dot. How would I go about doing this?
[QUOTE=Blazer232;49467828]I'm attempting to make a SWEP that uses VElements to put a laser dot in the center of the screen. When I aim down the ironsights on the weapon, the dot appears out of place to the left of the weapon, and I'd like to make it so that when I aim down the sights, it hides the dot. How would I go about doing this?[/QUOTE]
What is VElements?
[editline]6th January 2016[/editline]
[QUOTE=Cheese_3;49467393]Im using Mr.Gash's Deathrun gamemode, How do i change the max BHop speed from 500 to 1500[/QUOTE]
You'll have to increase the max speed/move speed. BHopping speed is a Source engine thing.
Simple question, how would I make a horizontal list? So, rather than have a dscrollpanel that scrolls vertically (when I use a dlistlayout) how would I make that horizontal?
[QUOTE=code_gs;49468504]What is VElements?[/QUOTE]
allows for the addition of models to the view model without having to put them in using a modeling program.
This code won't work for some reason
[code]
for _,repo in pairs(CommitGrab.Repos) do
http.Fetch("https://api.github.com/repos/"..repo.."/commits",
function(body)
CommitGrab.Data[repo] = util.JSONToTable(body)
CommitGrab.LatestCommit[repo] = CommitGrab.Data[repo][1]
end,
function(err)
MsgC(Color(100,200,100),"[CommitGrab] ",color_white,"Error getting data: "..err.."(repo: "..repo..")")
end)
end
[/code]
It's not making a table in the table or even throwing http error.
[QUOTE=code_gs;49468504]What is VElements?
[editline]6th January 2016[/editline]
You'll have to increase the max speed/move speed. BHopping speed is a Source engine thing.[/QUOTE]
I have changed the max speed to 1500, changed the run speed to 1500 but they still can't get over 500-600
Also in addition to my other problem, does anyone know how to do FFT for voice?
[QUOTE=Blazer232;49472618]allows for the addition of models to the view model without having to put them in using a modeling program.[/QUOTE]
Is this from some addon?
[QUOTE=code_gs;49473086]Is this from some addon?[/QUOTE] I believe he is talking about the Swep Construction Kit that was created by Clavus. Link:[URL="https://steamcommunity.com/sharedfiles/filedetails/?id=109724869"]https://steamcommunity.com/sharedfiles/filedetails/?id=109724869[/URL]
yes, swep construction kit allows the user to attach models to the client's view model. you can then copy/paste the code it gives you into the shared.lua file for the swep and it will appear on the view model.
Being plagued with CUtlLinkedList overflow! (exhausted index range) (65535)
I've made sure on all of my particles finish is being called correctly, this only seems to be triggered on certain maps with 60+ players.
I've tried Matts fix here: [url]https://facepunch.com/showthread.php?t=1350845[/url] however It's just causing errors
[lua]Tried to use invalid object (type CLuaEmitter) (Object was NULL or not of the right type)[/lua]
It was apparently also fixed in a gmod update? The only thing we use is custom models and trails (util.SpriteTrail)
[QUOTE=Mrkrabz;49478416]Being plagued with CUtlLinkedList overflow! (exhausted index range) (65535)
I've made sure on all of my particles finish is being called correctly, this only seems to be triggered on certain maps with 60+ players.
I've tried Matts fix here: [url]https://facepunch.com/showthread.php?t=1350845[/url] however It's just causing errors
[lua]Tried to use invalid object (type CLuaEmitter) (Object was NULL or not of the right type)[/lua]
It was apparently also fixed in a gmod update? The only thing we use is custom models and trails (util.SpriteTrail)[/QUOTE]
It happens when you create too many entities in general. Try removing some addons and seeing what could be creating things in excess.
[QUOTE=LUModder;49472658]This code won't work for some reason
-code-
It's not making a table in the table or even throwing http error.[/QUOTE]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/http/Fetch]http.Fetch[/url] says that the first function should have 4 variables, yours has one. I don't remember what happens in lua if you pass a function too many arguments, so this might not be an issue.
Try printing 'success' and 'failure' in each function to verify that it's actually calling one of them.
[editline]7th January 2016[/editline]
I just tested, and as zerf says it works fine if you pass more arguments than the function accepts. The only other thing I can think of is that CommitGrab.Repos is empty. Try printing before the fetch in the loop to verify that the table is populated.
[QUOTE=code_gs;49479507]It happens when you create too many entities in general. Try removing some addons and seeing what could be creating things in excess.[/QUOTE]
The entity count is only around 1000 at max, we don't run any addons but pointshop.
[QUOTE=roastchicken;49479751][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/http/Fetch]http.Fetch[/url] says that the first function should have 4 variables, yours has one. I don't remember what happens in lua if you pass a function too many arguments, so this might not be an issue.
Try printing 'success' and 'failure' in each function to verify that it's actually calling one of them.[/QUOTE]
it's fine
I bought [URL="https://scriptfodder.com/scripts/view/1167"]LimbHUDLite [/URL]and it works great but in console it seems to be spamming [URL="https://i.gyazo.com/de6a46c1fd1ab67578ab291c53b67aea.png"]this message[/URL]. The addon creator insists that his addon is not the cause of this spam.
How can i stop this spam ?
That doesn't look like an error? Probably best to contact the author
Anyway, here's a simple question - how can I get an entity's center as a vector without using OBBCenter or any of that OBB stuff? Actually, nevermind
[QUOTE=MPan1;49481205]That doesn't look like an error? Probably best to contact the author
Anyway, here's a simple question - how can I get an entity's center as a vector without using OBBCenter or any of that OBB stuff? Actually, nevermind[/QUOTE]
The addon creator insists that his addon is not the cause of this spam.
[QUOTE=Cheese_3;49481012]I bought [URL="https://scriptfodder.com/scripts/view/1167"]LimbHUDLite [/URL]and it works great but in console it seems to be spamming [URL="https://i.gyazo.com/de6a46c1fd1ab67578ab291c53b67aea.png"]this message[/URL]. The addon creator insists that his addon is not the cause of this spam.
How can i stop this spam ?[/QUOTE]My best idea is just search through the code and look for anything that uses the function printtable (I think that's what it is) and looking at why it might be getting looped for whatever reason, also, no clue why the author would deny it is his code (unless you made modifications) since his addon clearly records damage in different parts of the body, most likely as a table, which appears to be exactly what is being printed in console.
Edit: Actually I guess maybe its not the addon, I just google netlog wrote to table and there was a lot of stuff about it happening (specifically on darkrp) so my guess is that table is just written to a lot and darkrp prints stuff like that to console? I don't really know might wanna look more into itt yourself and look it up.
How can I get the 'direction' a user is clicking on a DModelPanel? I tried doing
[CODE]
local direction = DModelPanel:GetCamPos() + gui.ScreenToVector( gui.MousePos() )
[/CODE]
But this just returns a vector equal to the camera's position plus a little due to the mouse part, but I need it to be further away, not pressed up to the camera as it is, I'm kind of looking for a version of [URL="http://wiki.garrysmod.com/page/Player/GetAimVector"]GetAimVector[/URL] that works for DModelPanels, if that makes sense.
[QUOTE=MPan1;49482246]How can I get the 'direction' a user is clicking on a DModelPanel? I tried doing
[CODE]
local direction = DModelPanel:GetCamPos() + gui.ScreenToVector( gui.MousePos() )
[/CODE]
But this just returns a vector equal to the camera's position plus a little due to the mouse part, but I need it to be further away, not pressed up to the camera as it is, I'm kind of looking for a version of [URL="http://wiki.garrysmod.com/page/Player/GetAimVector"]GetAimVector[/URL] that works for DModelPanels, if that makes sense.[/QUOTE]
Because the function gui.ScreenToVector returns a normal, and you haven't multiplied it by anything.
[QUOTE=Z0mb1n3;49482274]Because the function gui.ScreenToVector returns a normal, and you haven't multiplied it by anything.[/QUOTE]
What should I be multiplying it by? Is there a certain value or should I just be estimating?
[QUOTE=MPan1;49482396]What should I be multiplying it by? Is there a certain value or should I just be estimating?[/QUOTE]
Well that's entirely up to you. It's the same as ply:GetAimVector() — you do ply:EyePos() + ply:GetAimVector() * (distance you want it to travel)
[QUOTE=Z0mb1n3;49482577]Well that's entirely up to you. It's the same as ply:GetAimVector() — you do ply:EyePos() + ply:GetAimVector() * (distance you want it to travel)[/QUOTE]
Is it always going to be accurate though? I thought multiplying it would screw it up and make it slightly off point or something
[QUOTE=MPan1;49482632]Is it always going to be accurate though? I thought multiplying it would screw it up and make it slightly off point or something[/QUOTE]
Only multiply the number returned by gui.ScreenToVector, nothing else. A direction vector/normal is clamped between 0 and 1 in all coordinates (x, y, z), so multiplying it simply moves it further in that direction. The higher the multiplied factor, the further along the normal the returned position will be.
Is there a way to unclamp a players view when in a vehicle? So that the camera can go wherever? I have a custom CalcView but it seems to be still clamped by the vehicle.
[QUOTE=Ronon Dex;49483908]Is there a way to unclamp a players view when in a vehicle? So that the camera can go wherever? I have a custom CalcView but it seems to be still clamped by the vehicle.[/QUOTE]
You probably already know about it but it could be this hook?
[url]https://wiki.garrysmod.com/page/GM/CalcVehicleView[/url]
Anyone know how to hide the scroll bar on the side of an HTML vgui panel?
[code]local motd = vgui.Create("HTML", MainMenu )
motd.SetParent( MainMenu )
motd:SetPos(ScrW(), ScrH() / 6)
motd:MoveTo( ScrW() / 4, ScrH() / 6, 1.1, -1, 4)
motd:SetVisible(true)
motd:SetSize(ScrW() / 1.5, ScrH() / 1.6)
motd:OpenURL(motdw) ---------- Change the URL only to modify the website that comes up when start. / MOTD tab[/code]
[QUOTE=ArtikNinetail;49486041]Anyone know how to hide the scroll bar on the side of an HTML vgui panel?
[code]local motd = vgui.Create("HTML", MainMenu )
motd.SetParent( MainMenu )
motd:SetPos(ScrW(), ScrH() / 6)
motd:MoveTo( ScrW() / 4, ScrH() / 6, 1.1, -1, 4)
motd:SetVisible(true)
motd:SetSize(ScrW() / 1.5, ScrH() / 1.6)
motd:OpenURL(motdw) ---------- Change the URL only to modify the website that comes up when start. / MOTD tab[/code][/QUOTE]
What about [URL="https://wiki.garrysmod.com/page/DHTML/SetScrollbars"]DHTML:SetScrollbars[/URL]?
[QUOTE=Goodroid;49486553]What about [URL="https://wiki.garrysmod.com/page/DHTML/SetScrollbars"]DHTML:SetScrollbars[/URL]?[/QUOTE]
When I attempted to do that it crashed the code every time. Not sure why. And from that page it says "(Appears to be ineffective?)"
[code]
[ERROR] RunString:72: attempt to call method 'SetScrollbars' (a nil value)
1. unknown - RunString:72
2. unknown - lua/includes/modules/concommand.lua:54
[/code]
Sorry, you need to Log In to post a reply to this thread.