• Problems That Don't Need Their Own Thread v5
    4,111 replies, posted
I requested TraceAttackToTriggers a while ago.
I'm trying to make a player model, but I'm stuck in the weight painting limbo, the arms look stretched out of the mesh, and the more I try to fix it the more it breaks, is there something I'm missing?
[QUOTE=KleinerHl;51992145]I'm trying to make a player model, but I'm stuck in the weight painting limbo, the arms look stretched out of the mesh, and the more I try to fix it the more it breaks, is there something I'm missing? [URL="http://i.cubeupload.com/W6x3f3.png"]Here's[/URL] a picture[/QUOTE] Looks fine to me :v:
[QUOTE=KleinerHl;51992145]I'm trying to make a player model, but I'm stuck in the weight painting limbo, the arms look stretched out of the mesh, and the more I try to fix it the more it breaks, is there something I'm missing? [URL="http://i.cubeupload.com/W6x3f3.png"]Here's[/URL] a picture[/QUOTE] Better fit for modeling section. However, make are you normalize weights and thoroughly test in your 3d software of choice. In Blender, I like to use gradients.
[QUOTE=TFA;51992611]Better fit for modeling section. However, make are you normalize weights and thoroughly test in your 3d software of choice. In Blender, I like to use gradients.[/QUOTE] I got the arms figured out, thanks! Only thing left is that the dude's tits sag for some reason
[QUOTE=code_gs;51992121]I requested TraceAttackToTriggers a while ago.[/QUOTE] I don't think that would even help with what I need though. I need the distance between the trace position and the trigger, not really the trigger the trace would end up hitting.
Trigger:GetPos():Distance(tr.HitPos)?
[QUOTE=code_gs;51992942]Trigger:GetPos():Distance(tr.HitPos)?[/QUOTE] Sorry, I should've clarified. I need the distance between where the trace starts, and where it hits the collision box of the trigger, I already know it'll hit the trigger. Edit: The code I posted above will work for what I need, just seems a bit hacky to have to mess with the solidity.
[url]http://wiki.garrysmod.com/page/Structures/TraceResult[/url] It has a field for trace start position.
[QUOTE=Robotboy655;51993042][url]http://wiki.garrysmod.com/page/Structures/TraceResult[/url] It has a field for trace start position.[/QUOTE] I know? The issue was traces don't hit triggers unless you make them solid, which I felt to be a bit hacky. Was wondering if there was another way like a binding to IEngineTrace->EnumerateEntities that had the second argument as true.
Does anyone know a better way to restrict joining of your server to member of a certain steam group? The string.find seems to return some values (sometimes) if the player is in the group, this isn't really functional. I know that it has to search through multipl pages but not sure what's the best approach. [code] hook.Add( "CheckPassword", "access_whitelist", function( steamID64 ) http.Fetch( "http://steamcommunity.com/groups/mygroup/memberslistxml/?xml=1",function( body, len, headers, code ) if string.find (body, tostring(steamID64)) == "" then return false, "no join you" end end ) end ) [/code]
[QUOTE=LordNoodles;51993717]Does anyone know a better way to restrict joining of your server to member of a certain steam group? The string.find seems to return some values (sometimes) if the player is in the group, this isn't really functional. I know that it has to search through multipl pages but not sure what's the best approach. [code] hook.Add( "CheckPassword", "access_whitelist", function( steamID64 ) http.Fetch( "http://steamcommunity.com/groups/mygroup/memberslistxml/?xml=1",function( body, len, headers, code ) if string.find (body, tostring(steamID64)) == "" then return false, "no join you" end end ) end ) [/code][/QUOTE] That will never work. You must return on the same frame as the hook is called or nothing will happen.
[QUOTE=Robotboy655;51993727]That will never work. You must return on the same frame as the hook is called or nothing will happen.[/QUOTE] Is there anyway I could do this before the player loads in?
[QUOTE=LordNoodles;51993759]Is there anyway I could do this before the player loads in?[/QUOTE] Perhaps download the complete list of allowed users beforehand, comparing against it once it's been cached?
[QUOTE=LordNoodles;51993759]Is there anyway I could do this before the player loads in?[/QUOTE] If you're looking to continue with that approach you can either have it constantly check after X amount of time and update the results to a global table, or grab the results once and stick with those until the server restarts. Then you can always compare it in the CheckPassword hook. EDIT: Could be mistaken, but there may be a way to have those results in JSON instead, so it'd be as easy as util.JSONToTable()
Is [url=http://wiki.garrysmod.com/page/Structures/CamData]CamData[/url] fully documented? I want to have it render an orthographic view similar to the ortho field of [url=http://wiki.garrysmod.com/page/Structures/RenderCamData]RenderCamData[/url], is there any way to do that in CalcView? Edit: [QUOTE=Willox;51994614]Try this and post back if it works. [code] CamData = { ..., ortho = { left = x, right = x, top = x, bottom = x } } [/code][/QUOTE] Will try this again, however I think I tried this a few months ago and it didn't work. I may be confusing it with offcenter though. Edit: [url=http://wiki.garrysmod.com/index.php?title=Structures/CamData&curid=269&diff=27048&oldid=17065]according to Robotboy655[/url] it works, I actually didn't get a chance to test yet.
[QUOTE=MrRalgoman;51982743]The blur density isn't the same and there isn't a parameter for it with either function...[/QUOTE] [URL="https://github.com/garrynewman/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/lua/derma/derma_utils.lua#L7-L34"]Here's the code for that function. Make it as dense as you want[/URL]
is there table of all cvars (probably for anticheat)? :v:
[QUOTE=Denzeriko;51994908]is there table of all cvars (probably for anticheat)? :v:[/QUOTE] What exactly do you need this for? I don't know if there's an accessible full list, but as a last resort you can detour [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/cvars/OnConVarChanged]cvars.OnConVarChanged[/url] to be notified when any convar is changed.
[QUOTE=NeatNit;51994961]What exactly do you need this for? I don't know if there's an accessible full list, but as a last resort you can detour [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/cvars/OnConVarChanged]cvars.OnConVarChanged[/url] to be notified when any convar is changed.[/QUOTE] i want to check foreign commands like aimbot_on, without using own table with string.find ('aim','esp','etc')
How do you translate world coordinates into pixels? I'm trying to draw a mesh across the user's screen, and I'm aware EyePos will give me the centre, but how do I get each corner or some arbitrary screen coord?
WorldToScreen?
[QUOTE=Revenge282;51995060]WorldToScreen?[/QUOTE] Not a function (WorldToLocal* is completely different), but I wish.
[QUOTE=code_gs;51995067]Not a function (WorldToLocal* is completely different), but I wish.[/QUOTE] Fifteen seconds of wiki, [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Vector/ToScreen]Vector:ToScreen[/url]
[QUOTE=Revenge282;51995070]Fifteen seconds of wiki, [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Vector/ToScreen]Vector:ToScreen[/url][/QUOTE] That's the exact opposite. I am looking to translate a screen position to the world, not vise-versa.
[QUOTE=LordNoodles;51993759]Is there anyway I could do this before the player loads in?[/QUOTE] You can kick them with [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/game/KickID]game.KickID[/url] but it will be delayed
[QUOTE=code_gs;51995082]That's the exact opposite. I am looking to translate a screen position to the world, not vise-versa.[/QUOTE] [url]http://wiki.garrysmod.com/page/gui/ScreenToVector[/url]
[QUOTE=MeepDarknessM;51995422][url]http://wiki.garrysmod.com/page/gui/ScreenToVector[/url][/QUOTE] That's a directional vector. [editline]22nd March 2017[/editline] [QUOTE=Shenesis;51995119]Check this post: [url]http://facepunch.com/showthread.php?t=891702&p=32941555&viewfull=1#post32941555[/url][/QUOTE] Thanks!
[QUOTE=code_gs;51995988]That's a directional vector.[/QUOTE] What position are you trying to get? I know you've solved it but I really want to understand this. Here are the possible things you might be trying to get, and how I think they should be found: 1. The direction that a certain point on the screen is pointing at. This is gui.ScreenToVector and you said you didn't want that. 2. The point the user sees on the specified pixel. This can be acquired with a traceline starting from the camera position and ending an arbitrary, large distance away in the direction of the vector. startpos = EyePos(), endpos = EyePos() + (gui.ScreenToVector(x, y) * 100000). HitPos of the trace result is the position. 3. A position in front of the screen a predefined distance away. This is just EyePos() + (gui.ScreenToVector(x, y) * 100) for a distance of 100 units with a spherical result, or something slightly more complicated involving vector math for a flat result. If you really need #3 with a flat result, you still just need EyePos and gui.ScreenToVector, but just need to mess around with Vector:Dot (I think) between the EyeVector and ScreenToVector. My vector knowledge is rusty but it's definitely doable. I guess I'm just curious, which one was it? Or something not listed above?
Separating something from a table and printing it out?. In this example, i only want to print out the value of "code" in the table, but i cannot seem to figure out how to. Thanks in advance. [code] generated = { code = string.random(5), prizeFunction = args[1], amount = args[2], usesLeft = tonumber(args[3]) } [/code]
Sorry, you need to Log In to post a reply to this thread.