• Problems That Don't Need Their Own Thread v5
    4,111 replies, posted
Is there a way to get the tire entities of a vehicle?
Is SpawnIcon re-render broken?
[QUOTE=Benn20002;52437975]Is there a way to get the tire entities of a vehicle?[/QUOTE] What kind of vehicle? What are you trying to do with the tires? prop_vehicle (like HL2 jeep) aren't made up of multiple entities, it's a single entity instance.
[QUOTE=Benn20002;52437975]Is there a way to get the tire entities of a vehicle?[/QUOTE] [QUOTE=SFArial;52438027]prop_vehicle (like HL2 jeep) aren't made up of multiple entities, it's a single entity instance.[/QUOTE] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Vehicle/GetWheel]Vehicle:GetWheel[/url]
[QUOTE=code_gs;52421214]You can use this to disable pickup of those weapons: [url]http://wiki.garrysmod.com/page/GM/PlayerCanPickupWeapon[/url][/QUOTE] This also make Player:Give() useless :(:
Hi guys :) I want to create a thing that can deviate an attack/bullet but I don't really know how to handle it, for now I've done that: [CODE] local function deviatingBullet(target, dmginfo,dir,trace) if target:GetActiveWeapon():GetClass() == "usl_lightsaber" then local newTrace = trace newTrace.HitNormal = target:GetEyeTrace() newTrace.StartPos = target:GetActiveWeapon():GetPos() target:DispatchTraceAttack(dmginfo,newTrace) dmginfo:SetDamage( 0 ) end end hook.Add("PlayerTraceAttack","usl_deviate_lightsaber",deviatingBullet) [/CODE] But it creates a stack overflow error ... Do you have any idea ?
I'm trying to use the hook PhysgunPickup however it doesn't work, the hook never gets called. I assume this is because some other PhysgunPickup hook returns a value. I need to use the hook but would rather not make other addons not function, any way to do this?
[QUOTE=IcarusCoding;52438542]I'm trying to use the hook PhysgunPickup however it doesn't work, the hook never gets called. I assume this is because some other PhysgunPickup hook returns a value. I need to use the hook but would rather not make other addons not function, any way to do this?[/QUOTE] If you have ulib, you can prioritize your hook to get called before the other one. Or you could figure out why it returns something.
Hey, guys. How can I change angle of flashlight light on player's hand when he is turning on his flashlight. I want to change it, because I don't want light angled on the floor. [editline]7th July 2017[/editline] I understood that this problem need its own thread. Link: [url]https://facepunch.com/showthread.php?t=1570467[/url]
What can I use to help NPCs detect where to spawn? I made my own SENT that spawns NPCs within a radius, but the spawner says it's full when I can only find like 25% of the mobs, leading me to believe they spawned inside a wall or underground.
Is there anyway I can get a list of fully connected clients from the client? I'm trying to make a player list that updates automatically but [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/player/GetAll]player.GetAll[/url] returns unconnected players.
[QUOTE=Sean Bean;52440088]Is there anyway I can get a list of fully connected clients from the client? I'm trying to make a player list that updates automatically but [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/player/GetAll]player.GetAll[/url] returns unconnected players.[/QUOTE] [lua] local players = {} for k,v in pairs(player.GetAll()) do if v:Team() ~= 0 then table.insert(players, v) end end [/lua] I'm 99% sure that unconnected players are on Team 0, so the above should work.
[QUOTE=Sean Bean;52440088]Is there anyway I can get a list of fully connected clients from the client? I'm trying to make a player list that updates automatically but [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/player/GetAll]player.GetAll[/url] returns unconnected players.[/QUOTE] [url]https://wiki.garrysmod.com/page/Player/IsConnected[/url]
[QUOTE=code_gs;52440331][url]https://wiki.garrysmod.com/page/Player/IsConnected[/url][/QUOTE] [QUOTE=Sean Bean;52440088]Is there anyway I can get a list of fully connected clients [B]from the client[/B]?[/QUOTE] [editline]7th July 2017[/editline] [QUOTE=Rory;52440321][lua] local players = {} for k,v in pairs(player.GetAll()) do if v:Team() ~= 0 then table.insert(players, v) end end [/lua] I'm 99% sure that unconnected players are on Team 0, so the above should work.[/QUOTE] I just tried this out but it only seems to work about ~80% of the time.
Yes, network the result of IsConnected.
[QUOTE=ms333;52438607]If you have ulib, you can prioritize your hook to get called before the other one. Or you could figure out why it returns something.[/QUOTE] Anything thats universal?
Since ENT:OnGround() isn't working for my SENT, and doing a TraceHull downwards is resulting in no hits when my SENT is on the ground, are displacements just broken for tracing? What would be an alternate soluition? I've tried a variety of tracing methods and distances to no avail.
how do i read png file from the data folder [editline]7th July 2017[/editline] and use it as texture/material
[QUOTE=rebel1324;52441479]how do i read png file from the data folder [editline]7th July 2017[/editline] and use it as texture/material[/QUOTE] [lua]local mat = Material("data/myimage.png")[/lua]
[QUOTE=wauterboi;52440972]Since ENT:OnGround() isn't working for my SENT, and doing a TraceHull downwards is resulting in no hits when my SENT is on the ground, are displacements just broken for tracing? What would be an alternate soluition? I've tried a variety of tracing methods and distances to no avail.[/QUOTE] TraceHull should work. I was using it for custom player movement to detect collision, even against displacements. Are you sure your tracemask and tracefilter are correct?
Is there anyway to achieve the metropolice pistol hold type for player? Like you have both hand on the gun (not like revolver)
[QUOTE=wauterboi;52440972]Since ENT:OnGround() isn't working for my SENT, and doing a TraceHull downwards is resulting in no hits when my SENT is on the ground, are displacements just broken for tracing? What would be an alternate soluition? I've tried a variety of tracing methods and distances to no avail.[/QUOTE] [code]lua_run local e=Entity(1):GetEyeTrace().Entity local p=e:GetPos() print(util.TraceHull({start=p,endpos=p-vector_up,filter=e,mins=e:OBBMins(),maxs=e:OBBMaxs()}).Hit)[/code] Doing this for a prop sitting on a displacement works fine. Alternatively, you can use TraceEntity and it will set the bounds automatically. I have found after going through some Source Engine code that FL_ONGROUND isn't set automatically for anything but players. I'll document this on the wiki.
[img]http://media.moddb.com/cache/images/mods/1/12/11082/thumb_620x2000/dev_metropolice01.jpg[/img] like this You broke my merge :v:
[QUOTE=YoutoYokodera;52442181]Is there anyway to achieve the metropolice pistol hold type for player? Like you have both hand on the gun (not like revolver)[/QUOTE] That's part of the NPC anim set and thus is not available to player models. You might be able to convert the set to use player bones then use an m_anm recompile to add it.
[QUOTE=code_gs;52442188]That's part of the NPC anim set and thus is not available to player models. You might be able to convert the set to use player bones then use an m_anm recompile to add it.[/QUOTE] [url]http://steamcommunity.com/sharedfiles/filedetails/?id=831242294&searchtext=old+animation[/url] This work but the pistol anim doesn't have 8 way movement so your leg keep going forward when you go diagonal
[QUOTE=YoutoYokodera;52442194][url]http://steamcommunity.com/sharedfiles/filedetails/?id=831242294&searchtext=old+animation[/url][/QUOTE] Yes, that's an m_anm recompile.
[QUOTE=code_gs;52442197]Yes, that's an m_anm recompile.[/QUOTE] I can't fix the legs, aren't I?
[QUOTE=YoutoYokodera;52442199]I can't fix the legs, aren't I?[/QUOTE] You can fix it in Blender.
[QUOTE=code_gs;52442200]You can fix it in Blender.[/QUOTE] Ahh i'll just accept the gay new animation then, i dont know anything about modeling and such :p Ty btw
i have been trying to check if player is inside cordinates he wont take damage but players can still take damage how did i fail this time? [lua]local function PlayerSpawnProtection(victim, attacker) local BoxCorner = Vector(-2246.671387, -4722.780273, 2848.473389) local OppositeCorner = Vector(-3108.852295, -4651.897949, 2849.468506) local TopCorner = Vector(-2996.481201, -4631.507813, 3320.731201) local PlayersInArea = ents.FindInBox(BoxCorner,OppositeCorner,TopCorner) return not table.HasValue(PlayersInArea,victim) end hook.Add( "PlayerShouldTakeDamage", "PlayerSpawnProtection", PlayerSpawnProtection)[/lua]
Sorry, you need to Log In to post a reply to this thread.