• Problems That Don't Need Their Own Thread v2.0
    5,020 replies, posted
[QUOTE=LieutExcalibu;46832178]Do you guys know if it evens possible to download a gma file to your dedicated server without uploading it from your own PC because that just kills my internet...[/QUOTE] [url]http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers[/url]
[QUOTE=TrinityX;46832258][url]http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers[/url][/QUOTE] no no I am aware of that because the file is big...it's a big map.
[QUOTE=LieutExcalibu;46832320]no no I am aware of that because the file is big...it's a big map.[/QUOTE] Just leave it overnight or something. If the map is very big ( over 100MB ) then you might want to reconsider using it, just like you, some users will avoid joining servers with long waiting time to get all the downloads.
Is it possible to ignorez for only one entity? I want to draw at the center of an entity and be able to see it through the entity, but if it's covered by anything else it won't render. This is what I currently have, and the ignorez is required in this snippet to be able to see the text at all. [code]function ENT:Draw() self:DrawModel() cam.IgnoreZ( true ) cam.Start3D2D( self:LocalToWorld(self:OBBCenter()), Angle(0, LocalPlayer():GetAngles().y-90, 90), 0.2 ) draw.SimpleTextOutlined( "Test", "DermaLarge", 0, 50, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0, 0, 0) ) cam.End3D2D() cam.IgnoreZ( false ) end[/code] [editline]2nd January 2015[/editline] I would have thought doing the calls after DrawModel would make it appear on the top of the entity, but it doesn't
[QUOTE=isnipeu;46835062]Is it possible to ignorez for only one entity? I want to draw at the center of an entity and be able to see it through the entity, but if it's covered by anything else it won't render. This is what I currently have, and the ignorez is required in this snippet to be able to see the text at all. [code]function ENT:Draw() self:DrawModel() cam.IgnoreZ( true ) cam.Start3D2D( self:LocalToWorld(self:OBBCenter()), Angle(0, LocalPlayer():GetAngles().y-90, 90), 0.2 ) draw.SimpleTextOutlined( "Test", "DermaLarge", 0, 50, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0, 0, 0) ) cam.End3D2D() cam.IgnoreZ( false ) end[/code] [editline]2nd January 2015[/editline] I would have thought doing the calls after DrawModel would make it appear on the top of the entity, but it doesn't[/QUOTE] I don't think that is possible. Maybe stencils, but otherwise I don't think so.
Is there any good up to date stencils tutorial? I looked around but pretty much everything I found doesn't work properly with the current gmod version.
[QUOTE=isnipeu;46835392]Is there any good up to date stencils tutorial? I looked around but pretty much everything I found doesn't work properly with the current gmod version.[/QUOTE] LinkTwilight, creator of those amazing traps, posted a dropbox link to one of his earlier addons called the Hell Hole. I downloaded it to look into how he does it and it still works too which is awesome. [url]https://dl.dropboxusercontent.com/u/8269322/Lua%20Scripts/Hell%20Hole.zip[/url] His video [video=youtube;bZNJlJsflDI]http://www.youtube.com/watch?v=bZNJlJsflDI[/video] [url]http://facepunch.com/showthread.php?t=1260809&p=43005349&viewfull=1#post43005349[/url]
Hmm, probably a very nooby question, but... I can't run any function from the server!!! I need to include some files to run them (Data files) to initialize my NPC's. I need to run them from the server to spawn them, however, the functions only run if I save any of the gamemode's files, Damn! I asked serveral other programmers (Good ones) on my friends list, and even they didn't know. Basically I loop over the file, running it from the client does just work properly, they inmediately load and show up as dialogues, but the server can't. I tried running them outside of every GM hook, tried running it in GM:Initialize, GM:InitPostEntity, and in some other functions, but it just won't include them! [code]for _,v in pairs( file.Find("rp_base/gamemode/npc/*.lua", "LUA") ) do include( 'npc/' .. v ) print("Server: " .. v ) end[/code] The print is used for debugging. I see no NPC's, nor I see "Server: Matt.lua", please help me!
[QUOTE=Techdaan;46836203] [code]for _,v in pairs( file.Find("rp_base/gamemode/npc/*.lua", "LUA") ) do include( 'npc/' .. v ) print("Server: " .. v ) end[/code] [/QUOTE] Uh...Isn't the function called require, and not include? Or is that your own or something? // Edit: Oh, I'm sorry. I forgot garry likes to add all kinds of unnecessary shit to lua, including "include".
My game has a tendency to randomly crash while playing on TTT. I'm not sure if this is related to the server I'm playing on or the gamemode in general, and it seems to have no specific cause; it can happen during a round or when it ends. Whenever. Notably, it only sometimes drops an mdmp, and I don't even know if it's related. You can find the info from the mdmp [URL="http://dumps.metastruct.uk.to/dumper.py?dump=hl2_140713_crash_2014_12_31T21_16_41C0.mdmp"]here[/URL]. Even more notably, when I join the server I crashed on again, it takes a particularly long time to join for no good reason. I'm not sure if there's a way to avoid this or if it occurs when joining another server instead. I've already tried verifying my files, disabling all addons, nuking my lua folder, removing terrortown and letting it redownload, etc. Nothing fixed it. My next try is to disable some games and try joining with the bare minimum (HL2, CS:S).
[T]http://puu.sh/dWzyx/3886c2703b.jpg[/T] Is there any easy way to reskin the derma tab buttons?
Does DarkRP have a function to return the jobs in order to create an F4 menu? I want to create a Jobs app for my phone and I need to grab all the jobs
[lua]Player:getjobtable( )[/lua] Returns the table with information about the job. For example weapon, command, the same table that was used in DarkRP.createJob
I mean like all the jobs on the server like when you change your job. Thanks for that function though, I can use it for a current job tab
team.GetAllTeams( ) :v:
I'm feeling so stupid. I need to make custom footstep sounds. I've converted sounds into .wav format and have putted it like here: garrysmod/addons/<addon_name_here>/sound/player/footsteps. But in the game I have default hl2's one. cl_customsounds = 1, "override" "1" in "addon.txt", but there is no results. What can i do? Maybe there is something wrong with sound convert? It has no cue start and end, if it really matter.
Is there a way to make self.Owner:ViewPunch() less laggy if that's even a thing
[QUOTE=ROFLBURGER;46839675]Is there a way to make self.Owner:ViewPunch() less laggy if that's even a thing[/QUOTE] Sounds like you might not be using it properly. It should be called from predicted hooks both client and serverside.
[QUOTE=Willox;46840104][QUOTE=ROFLBURGER;46839675]Is there a way to make self.Owner:ViewPunch() less laggy if that's even a thing[/QUOTE] Sounds like you might not be using it properly. It should be called from predicted hooks both client and serverside.[/QUOTE] Do you mean client [B]or[/B] serverside? I have found clientside code to never call in SWEP:PrimaryAttack() and self.Owner:ViewPunch() still works wonderfully. Is there something wrong there? Should PrimaryAttack() be running SHARED? If I simply do [code]function SWEP:PrimaryAttack() print( "Realm" ) end[/code] Server prints, Client doesn't.
[QUOTE=Willox;46840104]Sounds like you might not be using it properly. It should be called from predicted hooks both client and serverside.[/QUOTE] On both? I thought it was useless clientside lol. Now I have no clue what a predicted hook is, I'm using it as recoil for my SWEPS could i just use IsFirstTimePredicted() ?
-snip- Fixed after hours of messing around with clientside, and serverside files. Not really sure what fixed it but it just decided to work after I reset the server.
[QUOTE=ROFLBURGER;46840156]On both? I thought it was useless clientside lol. Now I have no clue what a predicted hook is, I'm using it as recoil for my SWEPS could i just use IsFirstTimePredicted() ?[/QUOTE] [url]http://wiki.garrysmod.com/page/Prediction[/url] If you don't make your weapons predict properly, players with high latency or packetloss are gonna have a bad time. [editline]2nd January 2015[/editline] [QUOTE=WalkingZombie;46840150]Do you mean client [B]or[/B] serverside? I have found clientside code to never call in SWEP:PrimaryAttack() and self.Owner:ViewPunch() still works wonderfully. Is there something wrong there? Should PrimaryAttack() be running SHARED? If I simply do [code]function SWEP:PrimaryAttack() print( "Realm" ) end[/code] Server prints, Client doesn't.[/QUOTE] Don't test in singleplayer.
[QUOTE=stupid-;46837648][T]http://puu.sh/dWzyx/3886c2703b.jpg[/T] Is there any easy way to reskin the derma tab buttons?[/QUOTE] You can make a helper function for drawing the tab, then iterate through the tabs of the DPropertySheet (element.Items, then v.Tab is the tab element) and set their Paint function to your helper function.
Making a gamemode derived from Base, when i give my player a M9K weapon the SWEP complains that self.Owner is a nil value. And ideas what could be going wrong?
Off-Topic: Same avatar :3
So I'm creating a car dealer, how should I store my cars?
[QUOTE=ColgateMaster;46842167]So I'm creating a car dealer, how should I store my cars?[/QUOTE] In a table, e.g. Cars = {} and for that you could do: [code] Car = {} Car.Name = "something" Car.Price = 99999 Car.Model = "error.mdl" Car.Script = "howshudiknow.txt" Cars[Car.ID] = Car [/code]
Can't figure out how to fix this issue.... I have a leveling system and you can purchase upgrades etc So you can add upgrades by placing a lua file named whatever in the upgrades folder. Inside the lua file is the set-up to configure your own upgrade here's an example of some of the configurable table: [code]Upgrade = {} Upgrade.Name = "Example Upgrade 1" Upgrade.LevelRequired = 1 Upgrade.AdminOnly = false [/code] [code] Upgrade = {} Upgrade.Name = "Example Upgrade 2" Upgrade.LevelRequired = 5 Upgrade.AdminOnly = false [/code] my issue is that when i have 2 or more files the latest files Upgrade.Name will over write all other Upgrade.Name's. So i'll have 2 labels that say "Example Upgrade 2" rather than "Example Upgrade 1" "Example Upgrade 2" Heres the client code (creating the labels): [code] local files = file.Find("lua/upgrades/*.lua", "GAME") local count = #files if count == 0 then local NoFiles = vgui.Create("DLabel", UpgradePanel) NoFiles:SetText("No Upgrades Are Available.") NoFiles:SetTextColor(Color(64, 64, 64) ) NoFiles:SizeToContents() NoFiles:SetPos(Frame:GetWide() /2.5, Frame:GetTall() /3.5) else local UpgradeLayout = vgui.Create("DIconLayout", Frame) UpgradeLayout:SetSize( Frame:GetWide(), Frame:GetTall() / 1.5 ) UpgradeLayout:SetPos( Frame:GetWide() * 0.05, Frame:GetTall() * 0.2 ) UpgradeLayout:SetSpaceY(Frame:GetTall() / 10) UpgradeLayout:SetSpaceX(Frame:GetWide() / 10) for i = 1, #files do local UpgradeItem = UpgradeLayout:Add("DLabel") UpgradeItem:SetText(Upgrade.Name) UpgradeItem:SetTextColor(Color(0, 0, 0)) UpgradeItem:SizeToContents() end end [/code] Any help?
-snip-
Did anyone ever figure out why clicking a text field that uses the Panel.Dock makes it go down? [img]http://i.imgur.com/GHTkhbr.png[/img]
Sorry, you need to Log In to post a reply to this thread.