• Problems That Don't Need Their Own Thread v2.0
    5,020 replies, posted
[QUOTE=LUModder;46324593]How can I make prop_dynamic's solid, when I spawn them with my function, they're nonsolid.[/QUOTE] [url]https://developer.valvesoftware.com/wiki/Prop_dynamic[/url] prop_dynamic is a point entity, meaning their purpose is likened to that of a spawn-point entity but they can also be used as a sort of logic processor to help other things move/animate. Spawn it as a different type of entity. ( I don't think setting the collision type would change anything because it is a point entity but you could try that.. )
still cant get this to work :suicide: is it something with ttt specifically maybe? [code] if self.CanFire == true then self:EmitSound(Sound("weapons/plasma/cloak.wav"),80,100) if CLIENT then self.Owner:GetHands():SetMaterial("models/shadertest/predator.mdl") self.Owner:GetViewModel(0):SetMaterial("models/shadertest/predator.mdl") end self.Owner:SetMaterial("models/shadertest/predator.mdl") self.CanFire = false end [/code] the only thing that doesnt work is setting the hand material EDIT: Fuck the C model, using the V model now, works fine.
Is there a way to change the shooting position of the player and keep the camera position the same?
I'm currently working on an admin menu to practice my LUA coding, and for the sv_cheats button, it says RunConsoleCommand: Command is blocked! (sv_cheats) The one line that'll actually help is this: RunConsoleCommand( "sv_cheats", "1" ) Excuse my noob lua skills
[QUOTE=Stargazer808;46325549]Is there a way to change the shooting position of the player and keep the camera position the same?[/QUOTE] Just change the bullet origin. I was working on a system to make bullets come from the barrel, but the issue was that clientside didn't see the same muzzle pos as serverside. [editline]25th October 2014[/editline] [QUOTE=AJ10017;46325188]still cant get this to work :suicide: is it something with ttt specifically maybe? [code] if self.CanFire == true then self:EmitSound(Sound("weapons/plasma/cloak.wav"),80,100) if CLIENT then self.Owner:GetHands():SetMaterial("models/shadertest/predator.mdl") self.Owner:GetViewModel(0):SetMaterial("models/shadertest/predator.mdl") end self.Owner:SetMaterial("models/shadertest/predator.mdl") self.CanFire = false end [/code] the only thing that doesnt work is setting the hand material EDIT: Fuck the C model, using the V model now, works fine.[/QUOTE] You could get the hands model, then use the new set sub material functions.
[QUOTE=dre5567;46325635]I'm currently working on an admin menu to practice my LUA coding, and for the sv_cheats button, it says RunConsoleCommand: Command is blocked! (sv_cheats) The one line that'll actually help is this: RunConsoleCommand( "sv_cheats", "1" ) Excuse my noob lua skills[/QUOTE] Lua can't access major commands like sv_cheats 1 [editline]24th October 2014[/editline] Also does anyone know why I might be getting 24 pistol ammo every time I spawn my weapons from the spawn menu? It has nothing to do with ammo types because I'm not using custom ones at it still happens.
I think it is SWEP.DefaultClip that gives ammo when you pick up a weapon ( or spawn it ).
[QUOTE=Acecool;46325700]I think it is SWEP.DefaultClip that gives ammo when you pick up a weapon ( or spawn it ).[/QUOTE] I use SWEP.defaultclip but it gives the correct ammo type and number while giving pistol ammo which is always 24. [editline]24th October 2014[/editline] Swep.Primary.Defaultclip I mrean
So I have this code [code] ---Hot Frame--- local HotFrame = vgui.Create( "DFrame" ) HotFrame:SetPos( ScrW()/3.8,ScrH()/1.12 ) HotFrame:SetSize( 600, 70 ) HotFrame:SetTitle( "" ) HotFrame:SetVisible( true ) HotFrame:SetDraggable( true ) HotFrame:ShowCloseButton( false ) HotFrame:MakePopup() HotFrame:SetKeyBoardInputEnabled() HotFrame:SetMouseInputEnabled() HotFrame.Paint = function() --draw.RoundedBox( 4, 0, 0, HotFrame:GetWide(), HotFrame:GetTall(), Color( 50, 50, 50, 150 ) ) end local selection = vgui.Create( "DIconLayout") selection:SetParent( HotFrame ) selection:SetSize( 70, 60 ) selection:SetPos( 5, 5 ) selection:SetSpaceY( 5 ) selection:SetSpaceX( 5 ) selection:SetLayoutDir(RIGHT) for i = 1, 5 do local selectionitem = selection:Add( "DPanel" ) selectionitem:SetSize( 70, 60 ) function selectionitem:Paint(w, h) draw.RoundedBox( 4, 0, 0, w, h, Color( 200, 200, 200, 150 ) ) end end --------------- [/code] Which makes this at the bottom of my screen [IMG]http://puu.sh/cpLYg/f50bbcfbf1.jpg[/IMG] And I need this to create panels to the right and not down. So I find this [URL="http://wiki.garrysmod.com/page/DIconLayout/SetLayoutDir"]SetLayoutDir[/URL] And try [code] selection:SetLayoutDir(RIGHT) [/code] But I don't get what I want, and SetLayoutDir doesn't have any documentation. Any help?
Look at the Dock/docking functions. Or set the position of x to ScrW( ) - self:GetWide( )
Anyone know a rough estimate of how many SENT's can be in memory at one time without any issues occurring?
[QUOTE=Acecool;46324380]Pre/PostPlayerDraw is called for players that it draws.. If something needs to be done when you draw the player, those hooks would be appropriate. [/QUOTE] Thanks man, hadn't thought about that. Should be more affective than using util.TraceLine for every player. I think GetNoDraw [B]should[/B] return true or false depending if it's drawn or not though. [t]https://dl.dropboxusercontent.com/u/17839069/C_210.png[/t] This is why I don't want to use traces, such a waste of resources. :l [B]EDIT:[/B] This script is going up on ScriptFodder :) Notice how the buildings are clipped so you can look inside them.
How to replace DToolTip to DToopTipCustom?
[QUOTE=Acecool;46324380]Useful Information.[/QUOTE] Thanks a lot! I already had notepad++ installed and I picked up the syntax highlighter too. Also, I didn't write the script that uses 'player' instead of 'ply'. That's a default garry's mod lua script. The console traced the error to that location. Little problem though. The game tells me ent_fire is a blocked command, and changing the nonpc:Fire still gives me the same error.
Is SetSubMaterial not actually in the non-dev braunch of gmod?
[QUOTE=NiandraLades;46328261]Is SetSubMaterial not actually in the non-dev braunch of gmod?[/QUOTE] It's only in Dev branch, yes.
Right, okay If I'm working on a gamemode that would benefit from it's use, should I swap to the dev branch or wait til it's implemented here?
[QUOTE=NiandraLades;46328294]Right, okay If I'm working on a gamemode that would benefit from it's use, should I swap to the dev branch or wait til it's implemented here?[/QUOTE] It's your choice really. I myself always use Dev branch. Keep in mind if you start using Dev branch, you will not be able to join any servers except the ones that are also on the dev branch ( means none ), and you can't really release addons that use dev branch only features.
[QUOTE=Acecool;46326466]Look at the Dock/docking functions. Or set the position of x to ScrW( ) - self:GetWide( )[/QUOTE] Not sure if you were responding to me, but what is happening is my code is generating panels starting from the SetPos downward. Like this [IMG]http://puu.sh/cqgjF/f7f3ca8572.png[/IMG]
//
[QUOTE=BlackMadd;46328918]Not sure if you were responding to me, but what is happening is my code is generating panels starting from the SetPos downward. Like this [IMG]http://puu.sh/cqgjF/f7f3ca8572.png[/IMG][/QUOTE] Setting :Dock( LEFT ) on all of those panels might fix it automatically.
[QUOTE=BlackMadd;46328918]Not sure if you were responding to me, but what is happening is my code is generating panels starting from the SetPos downward. Like this [IMG]http://puu.sh/cqgjF/f7f3ca8572.png[/IMG][/QUOTE] In the for loop you need to set each panels position to a variable that takes into account the panels before it. I just did this on a map vote I am working on, I called it Buffer. [code] local XBuffer = 15 for i = 1,5 do Panel:SetPos(XBuffer, 10) XBuffer = XBuffer + Panel:GetWide() + 15 end [/code]
[QUOTE=Acecool;46325700]I think it is SWEP.DefaultClip that gives ammo when you pick up a weapon ( or spawn it ).[/QUOTE] Ok yeah figured out the problem. I didn't have [code]SWEP.Secondary.Ammo = "none" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false[/code] in my base so it gave extra pistol ammo because thats what weapon_base does.
I am wondering if it is possible to apply materials to specific weapons (v_ and w_) without doing it globally. Would I need to hex? It seems nearly impossible to decompile and recompile models to change skin path, without getting issues.
[QUOTE=Lost Alien;46330713]I am wondering if it is possible to apply materials to specific weapons (v_ and w_) without doing it globally. Would I need to hex? It seems nearly impossible to decompile and recompile models to change skin path, without getting issues.[/QUOTE] [URL="http://wiki.garrysmod.com/page/Entity/SetSubMaterial"]SetSubMaterial[/URL], for now it's only in the Dev branch though.
[QUOTE=ROFLBURGER;46325708]I use SWEP.defaultclip but it gives the correct ammo type and number while giving pistol ammo which is always 24. [editline]24th October 2014[/editline] Swep.Primary.Defaultclip I mrean[/QUOTE] SWEP.Secondary.Defaultclip = 0
This isn't really a problem, more of a technical question. Would it be feasible to construct a HUD from a DHtml panel or should I expect problems?
[QUOTE=DarthTealc;46333324]In [URL="https://github.com/JetBoom/fretta13/"]Fretta13 [/URL]gamemodes everyone's player model seems to be blue. I want to make it the colour they've selected in sandbox but I can't figure out where it's being set in Fretta13. The best I can find is GetTeamColor in cl_init but that seems to only apply to the player's name in the chatbox. Has anyone had this problem and fixed it? Any tips?[/QUOTE] Fretta overrides the cl_playercolor convar in [url]https://github.com/JetBoom/fretta13/blob/master/gamemodes/fretta13/gamemode/player_colours.lua[/url] btw did your gamemode just got 1 team? i think fretta uses the TeamColor, used in team.SetUp for the colorize.
Which Garryware are you using? I just found one version and that derive from base rather than fretta.
[QUOTE=Sereni;46333375]This isn't really a problem, more of a technical question. Would it be feasible to construct a HUD from a DHtml panel or should I expect problems?[/QUOTE] Uhh someone more skilled in those needs to prove me wrong, but I believe it would be a bad approach. HTML panels are a tad slow because they connect to a webserver out of Gmod and probably wouldnt be the best canvas to create a hud on. Using DImages is cool though
Sorry, you need to Log In to post a reply to this thread.