• Problems That Don't Need Their Own Thread v3.0
    5,003 replies, posted
Okay, Just finished up a recode of Basewars, After my exams i plan to open a community which hosts some hopefully cool custom gamemodes Anyone got idea's on what i can make next ( Nothing RP Related as we have an rp gamemode under development :> ) If you have any idea's feel free to say them!
[QUOTE=AIX-Who;47520006]Okay, Just finished up a recode of Basewars, After my exams i plan to open a community which hosts some hopefully cool custom gamemodes Anyone got idea's on what i can make next ( Nothing RP Related as we have an rp gamemode under development :> ) If you have any idea's feel free to say them![/QUOTE] Planning on doing the same thing as me, huh? On topic, does anyone know any good places to get a VPS? I don't have a lot of money, and I'm planning on hosting multiple servers with custom gamemodes.
[QUOTE=Author.;47520141]Planning on doing the same thing as me, huh? On topic, does anyone know any good places to get a VPS? I don't have a lot of money, and I'm planning on hosting multiple servers with custom gamemodes.[/QUOTE] Hey! People keep saying we need new gamemodes so i'm trying! Check out NFO's VPS's, i found them decent. If not that then maybe try somewhere life Kimsufi or Soyoustart
I'm trying to make a SWEP that will change a player's model to a Bullsquid, and use animations from it. I'm using VJ's Bullsquid from the Black Mesa SNPC's. Unfortunately, the animations aren't working. To try to force it, I'm using self.Owner:SetSequence, but even that doesn't work. I don't get any script errors, it just doesn't work. I'm probably doing something really silly, so here's my code, in the context of primary: [lua]if SERVER then self.Owner:EmitSound("bullsquid/attack"..math.random(1,2)..".wav") local sequence = self.Owner:LookupSequence("range") print(sequence) self.Owner:SetSequence(sequence) end[/lua] It prints 14, but the animation doesn't play.
[QUOTE=r0uge;47512072]I want to replace the thing in TTT which lets you cycle between players as a spectator with left/right click. I know what to do, I just don't know where that code is found. I've searched the Git already. Help much apprectiated.[/QUOTE] My other question was never answered ^^^ Also, is it possible to change fonts of derma items such as the listings in a ComboBox? [editline]13th April 2015[/editline] [QUOTE=Author.;47520141]Planning on doing the same thing as me, huh? On topic, does anyone know any good places to get a VPS? I don't have a lot of money, and I'm planning on hosting multiple servers with custom gamemodes.[/QUOTE] Get a Cloud-range VPS from OVH. Best that money can buy - they are damn cheap for the performance, you can pick windows or linux, full root access, complete DDoS mitigation (unlike NFO). I've got many friends who are server owners, and they have all switched to OVH, including myself. No downtime ever also.
for your first question: [url]http://wiki.garrysmod.com/page/Player/SetObserverMode[/url]
[QUOTE=AnonTakesOver;47520922]for your first question: [url]http://wiki.garrysmod.com/page/Player/SetObserverMode[/url][/QUOTE] Snip solved
[QUOTE=r0uge;47520888] Get a Cloud-range VPS from OVH. Best that money can buy - they are damn cheap for the performance, you can pick windows or linux, full root access, complete DDoS mitigation (unlike NFO). I've got many friends who are server owners, and they have all switched to OVH, including myself. No downtime ever also.[/QUOTE] OVH is great, I use the $3 VPS to host an 8-slot Sandbox server and a small website, haven't had any issues with it.
Any hints for a good noclip-like mode except for colliding with stuff? Overriding the Move hooks doesn't play nice with physics and drive has a few quirks (mostly the snapping to the player when you hit something or exit drive). WALKMODE_FLY sorta works but it drifts from what I assume is a constant velocity in one direction.
FindInBox when used client side doesn't table the player even if they are in the specified area. Does anyone know of another way of seeing if the clientside player is inside a specific box besides using distance from entity? EDIT: I found a fix where you create a PhysicsInitBox and SetCollisionBounds for the entity and make the collision between the player no collide. Then make a StartTouch() and you can now detect when a player is in the box you created.
Can I manually assign an existing ConVar's value using lua without doing a concommand?
[QUOTE=r0uge;47522908]Can I manually assign an existing ConVar's value using lua without doing a concommand?[/QUOTE] -snip thought he meant without opening the console and typing the console command-
[QUOTE=DavidRalphsky;47520814]I'm trying to make a SWEP that will change a player's model to a Bullsquid, and use animations from it. I'm using VJ's Bullsquid from the Black Mesa SNPC's. Unfortunately, the animations aren't working. To try to force it, I'm using self.Owner:SetSequence, but even that doesn't work. I don't get any script errors, it just doesn't work. I'm probably doing something really silly, so here's my code, in the context of primary: [lua]if SERVER then self.Owner:EmitSound("bullsquid/attack"..math.random(1,2)..".wav") local sequence = self.Owner:LookupSequence("range") print(sequence) self.Owner:SetSequence(sequence) end[/lua] It prints 14, but the animation doesn't play.[/QUOTE] Because GM:CalcMainActivity() and GM:TranslateActivity() are taking over. If you aren't interested in recoding the animation system, you should instead consider creating a dynamic prop, setting it as the bullsquid model, and force it to move and play the animations you'd like.
Hey, has anyone had issues where DTextEntry is really awkward to enter text into? Like, I can paste stuff into it but apparently not write text edit: I'm assuming this is because I can move around and stuff if I try to type, how do I make it so you can't move while in a menu again?
Make sure it has focus DTextEntry:RequestFocus() from memory I think. And use Panel:MakePopup() for the second issue.
It needs to be a child of an EditablePanel at some point.
I used to remember a vgui element DMultiChoice, what happened to that? and if it's gone, what's the equivalent?
[QUOTE=James xX;47524989]I used to remember a vgui element DMultiChoice, what happened to that? and if it's gone, what's the equivalent?[/QUOTE] [URL="http://wiki.garrysmod.com/page/Category:DComboBox"]DComboBox[/URL]?
[QUOTE=Phoenixf129;47524999]DComboBox?[/QUOTE] Can you change the font of the items inside a combo box?
[QUOTE=r0uge;47525003]Can you change the font of the items inside a combo box?[/QUOTE] Well it's parent is DButton, so I'd assume DComboBox:SetFont("fontname") ? Never tried it.
How do I add weapons to my new Deathrun server? I already have CSS mounted but I want weapons to be available to be picked up by the runners and ONLY runners at the end of the map (Where the player gets to choose their preferred way of winning eg. bhop) So how do I add guns to the map? Do I need a weapons pack or something? Thanks
[QUOTE=Phoenixf129;47525006]Well it's parent is DButton, so I'd assume DComboBox:SetFont("fontname") ? Never tried it.[/QUOTE] I'll give it a try, I have a feeling I will have script errors in my near future however. [editline]14th April 2015[/editline] Ok, interesting. so what's happening is the font of the selected item in the Combo box is getting changed, but not any of the items from the dropdown menu. Anyone know how to change those (as well as the label before it)? Look at the third item: [url]http://redostri.ch/share/2015-04-14_12-34-46.png[/url] But it doesn't change in the drop down menu: [url]http://redostri.ch/share/Garry%27s_Mod_2015-04-14_12-35-36.png[/url]
Untested but try this: [lua] -- Does not look very nice but it probably works. local openMenu = comboBox.OpenMenu comboBox.OpenMenu = function(self, controlOpener) openMenu(self, controlOpener) for _,pnl in pairs(self.Menu:GetCanvas():GetChildren()) do pnl:SetFont("FONTNAMEHERE") end end [/lua]
[QUOTE=Bo98;47525170]Untested but try this: [lua] -- Does not look very nice but it probably works. local openMenu = comboBox.OpenMenu comboBox.OpenMenu = function(self, controlOpener) openMenu(self, controlOpener) for _,pnl in pairs(self.Menu:GetCanvas():GetChildren()) do pnl:SetFont("FONTNAMEHERE") end end [/lua][/QUOTE] Didn't work. No font change.
[QUOTE=r0uge;47525316]Didn't work. No font change.[/QUOTE] Try Bo98's code but in the 'for' statement make it [code]for k,v in pairs(self.Choices) do v:SetFont("font") end [/code] I'm sure that might work. EDIT: actually nevermind that won't work, because you can't set the font of pure text. I'm smart.
[QUOTE=nadimking;47525007]How do I add weapons to my new Deathrun server? I already have CSS mounted but I want weapons to be available to be picked up by the runners and ONLY runners at the end of the map (Where the player gets to choose their preferred way of winning eg. bhop) So how do I add guns to the map? Do I need a weapons pack or something? Thanks[/QUOTE] Get a weapons pack from the workshop and rename the folders so they match the ones on the map, i.e weapon_deagle
[QUOTE=r0uge;47525316]Didn't work. No font change.[/QUOTE] This should do it (untested) [lua] -- DComboBox -- \ self.Menu (DMenu, need hook on DComboBox:OpenMenu()) -- \ local DComboBox function DComboBox:OpenMenu( pControlOpener ) if ( pControlOpener ) then if ( pControlOpener == self.TextEntry ) then return end end -- Don't do anything if there aren't any options.. if ( #self.Choices == 0 ) then return end -- If the menu still exists and hasn't been deleted -- then just close it and don't open a new one. if ( IsValid( self.Menu ) ) then self.Menu:Remove() self.Menu = nil end self.Menu = DermaMenu() local sorted = {} for k, v in pairs( self.Choices ) do table.insert( sorted, { id = k, data = v } ) end for k, v in SortedPairsByMemberValue( sorted, "data" ) do self.Menu:AddOption( v.data, function() self:ChooseOption( v.data, v.id ) end ) end local x, y = self:LocalToScreen( 0, self:GetTall() ) self.Menu:SetMinimumWidth( self:GetWide() ) self.Menu:Open( x, y, false, self ) for k,v in pairs ( self.Menu:GetChildren()) do -- DMenuOptions v:SetFont() end end [/lua] Where DComboBox is your vgui element. Change the font on line 39
[QUOTE=r0uge;47525316]Didn't work. No font change.[/QUOTE] Works for me: [t]http://i.imgur.com/32Ug4tv.jpg[/t] (screenshot missing "local openMenu = " line as I set it global earlier in case I made an error)
[QUOTE=James xX;47525967]snip[/QUOTE] Ah, I probably should have mentioned it's a ComboBox derived from a DForm, not a DComboBox Also, how can I make a vehicle out of a model? Just want to be pointed in the right direction.
[QUOTE=r0uge;47526968]Ah, I probably should have mentioned it's a ComboBox derived from a DForm, not a DComboBox Also, how can I make a vehicle out of a model? Just want to be pointed in the right direction.[/QUOTE] Then get the DComboBox panels from the DForm panel. Example (again, untested): [lua] function GetDComboBoxFromDForm( DForm ) local Panels = {} for k,panel in pairs( DForm.Items ) do for _, child in pairs( panel:GetChildren() ) do if child.DropButton and child.GetOptionText then -- Probably unique to DComboBox table.insert( Panels, child ) end end end return Panels end [/lua]
Sorry, you need to Log In to post a reply to this thread.