• Problems That Don't Need Their Own Thread v5
    4,111 replies, posted
Haven't tried much for this because it's a quick question. Probably doesn't even need it's own thread. How do I check if the player is looking at a wall? What I've tried so far local lookingatwall = ( self.Owner:GetEyeTrace().HitNormal:Angle().p <= -90 )
Source uses abs(HitNormal.z) > 0.7 to determine if a player can walk up a slope - you can adjust that number to decide how steep you want to consider a surface being a wall. 1 (floor)/-1 (ceiling) is completely horizontal and 0 (wall) is completely vertical.
Thanks, got that working. Sorry for the short notice, but this has been a problem for a while local idstring = os.date("%y_%j_%H%M%S", os.time()) local fullstring = "test/" .. idstring .. "test.jpg" if !file.Exists(fullstring, "DATA") then file.Write(fullstring, "") end local f = file.Open( fullstring, "wb", "DATA" ) f:Write( data ) f:Close() Gives me attempt to index local 'f' (a nil value) On line (5 in example, 208 in file) wat
file.Write just uses file.Open internally so there's no need to do the empty operation. Does the test directory exist?
Oh. It needs to exist. That fixes everything. Doesn't file.Write automatically make directories?
No, you have to use file.CreateDir. Most of the file.* functions are just wrappers for file object functions and you can see their code sources here: https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/includes/extensions/file.lua
@code_gs On GitHub you sad that I should use sv_downloadurl to make fonts be downloaded on join. Well, console sad that it had found fonts files, but no fonts were mounted to game. Also, no files in garrysmod
Post your resource.AddFile file and sv_downloadurl.
resource.AddSingleFile("resource/fonts/digital7mono.ttf") resource.AddSingleFile("resource/fonts/helveticabold.ttf") resource.AddSingleFile("resource/fonts/helveticalight.ttf") resource.AddSingleFile("resource/fonts/helveticamedium.ttf") resource.AddSingleFile("resource/fonts/helveticaregular.ttf") "sv_downloadurl" = "http://www.*I would like to hide it if it's not important*.ru/download/" Fonts are in http://www.*I would like to hide it if it's not important* .ru/download/resource/fonts sv_allowdownload = 1 sv_allowupload = 1
Could you send me the link through PM on http://facepunch.com if you'd like to keep it private?
I am trying to debug some issues on my server does anyone know how to correctly use voice_printtalkers?Thanks
Anyone know how to play an animation from LUA? trying to make a character play "ACT_GMOD_IN_CHAT" ( the chat button animation ) when a boolean is true and when the boolean is off, have the animation return back to idle. any help would be greatly appreciated!
Can you take a picture of the of the fonts directory? Link is private
Doesn't sound like anything documented on the GMod wiki or on Valve's dev site. Care to add a little context? Sounds like an entity name, like from an addon or something. I know I didn't have to pitch in but just in case this goes unsolved because nobody knows what you are talking about. If someone does know, then I'll look like an idiot, but hey, at least I tried.
https://files.facepunch.com/forum/upload/104786/3aa6ab6a-68c4-4fb4-8b33-5a297b0f07aa/filezilla_2018-03-02_01-39-56.png https://files.facepunch.com/forum/upload/104786/5edc4cd5-6d95-4f08-8087-ac0931d58887/filezilla_2018-03-02_01-39-59.png
Hi i think some context might help so if what im looking for dosent work maybe you could give me an alternative. i currently have someone on my server who cannot speak. there microphone works on other servers but just not ours i was looking around for different things that could try to fix it or at least diagnose the issue. I found the command voice_printtalkers on a steam community post containing all of the console commands that are available on Garrys mod and thought that would be a good way to diagnose whether the persons issue is from their client or something to do with our server. i tried looking for an explanation for what it was or how to use but couldnt find anything anywhere. Thanks for the help
At first I regretted not studying for that calc 3 exam. https://www.dropbox.com/s/mtgijn2qpnvtb8h/2018-03-01_19-13-02.mp4?dl=0
I'm writing a tool where at some point while its out the tool needs to render a 3d box. Whats the best way to do this? Seems like using GM:PostDrawTranslucentRenderables and checking if the player has the toolgun out, has the correct tool set, and wants to draw isn't the best method.
dumb question perhaps... is there literally any difference between NPC_HEADCRAB_BLACK and NPC_HEADCRAB_POISON ? Does ones ai act slightly different in some way?
Pretty sure the poison one adds the ability to use the toxin which brings people to 1hp and then they get health over time where as the other ones are just normal headcrabs but with the black headcrab model
Nope, both _black and _poison are identical. I believe it's just a hack because the class name was changed during development but valve couldn't care to recompile some HL2 maps, which still use both variants.
Anyone have an idea on how to fix the texture on this model from flickering? https://www.dropbox.com/s/3tjb23d3xepov4e/2018-03-02_22-50-05.mp4?dl=0 function ENT:Draw() render.SuppressEngineLighting(true) render.SetMaterial(self.Material) render.DrawWireframeBox(self:GetPos(), self:GetAngles(), self:GetMins(), self:GetMaxs(), Color(255, 0, 0, 255), true) render.DrawBox(self:GetPos(), self:GetAngles(), self:GetMins(), self:GetMaxs(), Color(255, 255, 255, 255), true) render.SuppressEngineLighting(false) end
Is there a way to figure out what hitgroup was damaged in an EntityTakeDamage hook?
First argument:LastHitGroup Make sure to check if it's a player first.
or NPC... but thanks
So as a byproduct of disabling collisions between a player and an entity in ShouldCollide, the player is no longer able to shoot the entity as well (Physgun/weapons/other traces go through now). Any way I can disable collisions between a player and some entity while still letting him shoot it?
You mean Entity/IsNPC?
Nope. Your only alternative is to use a custom FireBullets function (which I've made if you want to add me on Steam).
*bumping*
Do they at least download to your client?
Sorry, you need to Log In to post a reply to this thread.