• Problems That Don't Need Their Own Thread v5
    4,111 replies, posted
[QUOTE=Potatofactory;52592236]A simple google search should land you here [url]https://facepunch.com/showthread.php?t=1372766&p=44149143&viewfull=1#post44149143[/url][/QUOTE] i was able to reverse-engineer a solution from that, thanks a bunch
Can anyone tell me how I'd enable my server's clients to use commands that require sv_cheats to be 1, even though sv_cheats is set to 0? Specifically mat_reloadallmaterials?
[QUOTE=VIoxtar;52593094]Can anyone tell me how I'd enable my server's clients to use commands that require sv_cheats to be 1, even though sv_cheats is set to 0? Specifically mat_reloadallmaterials?[/QUOTE] illegal hacks You could try mat_reloadmaterial, I think that works without cheats
Sigh, it seems that in every script I end up having to resort to unconventional methods to get what I want Thanks though
I'm trying to draw text on top of a SpawnIcon in it's paint function, but the problem is it keeps getting drawn behind the SpawnIcon. [IMG]https://gyazo.com/79e75446ecc4609c4b6a6d459276c13f.png[/IMG] Are there any ways to make it draw OVER the SpawnIcon? [code] propIcon.Paint = function() if propIcon.Hovered then draw.SimpleTextOutlined("$"..v.pPrice, "sickFontSmall", 4, propIcon:GetTall() - 12, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, color_black) end end [/code]
[QUOTE=Lil_Roach;52593539]I'm trying to draw text on top of a SpawnIcon in it's paint function, but the problem is it keeps getting drawn behind the SpawnIcon. [/QUOTE] I'm not certain on this, but try messing around with the elements [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PANEL/PaintOver]PANEL:PaintOver[/url] function: [url]https://github.com/Facepunch/garrysmod/blob/a3e1fc8c34b6de557eb3d8977af3a33b70fb1900/garrysmod/lua/vgui/spawnicon.lua#L55[/url]
[QUOTE=kpjVideo;52593615]I'm not certain on this, but try messing around with the elements [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/PANEL/PaintOver"]PANEL:PaintOver[/URL] function: [URL]https://github.com/Facepunch/garrysmod/blob/a3e1fc8c34b6de557eb3d8977af3a33b70fb1900/garrysmod/lua/vgui/spawnicon.lua#L55[/URL][/QUOTE] PaintOver did the trick, thanks! Seems like common sense now that I think about it, stupid me.
I'm using textures that GMad doesn't like me trying to include in a workshop file for one of my maps. Is there a way around this? The textures are using capital letters, and there's way too many files to realistically go around changing them. Other people might have conflicting files as well.
[QUOTE=Giginigi;52595998]I'm using textures that GMad doesn't like me trying to include in a workshop file for one of my maps. Is there a way around this? The textures are using capital letters, and there's way too many files to realistically go around changing them. Other people might have conflicting files as well.[/QUOTE] You can make it optional content to the actual map on another workshop item. But how is it not letting you upload it? I mean, is it giving some sort of error? Because if it's normal textures it should just let you do it. Unless you've got any unallowed file by the workshop.
[QUOTE=geferon;52596413]You can make it optional content to the actual map on another workshop item. But how is it not letting you upload it? I mean, is it giving some sort of error? Because if it's normal textures it should just let you do it. Unless you've got any unallowed file by the workshop.[/QUOTE] Well, like I said, when I have these files within the folder tree (materials, maps, etc) the only problems it has is the fact that the textures use capital letters. I'm using Xhizor's textures for this case, and it really won't use them.
[QUOTE=Giginigi;52596437]Well, like I said, when I have these files within the folder tree (materials, maps, etc) the only problems it has is the fact that the textures use capital letters. I'm using Xhizor's textures for this case, and it really won't use them.[/QUOTE] Maybe because the engine is trying to use them via lowercase? I think you should make a script that makes them all lowercase. For convenience i guess.
Hello, I'm trying to return a query value but it doesn't work, i use mysqloo and this is my code : [code] local queries = { getplyinfo = [[SELECT steamid FROM users WHERE steamid = ?]] } function Swarzox_Guard.GetPlyInfo(steamid) local q = Swarzox_Guard.db:prepare(queries.getplyinfo) q:setString(1, steamid) function q:onSuccess(data) return data --this part doesn't work end function q:onError(err) print("Swarzox_Guard : erreur GetPlyInfo : " .. err) end q:start() end PrintTable(Swarzox_Guard.GetPlyInfo("STEAM_0:0:206980430")) --it returns nil [/code]
You have to wait for the callback function to finish: you can't return from a callback like that. In the meantime, your server will keep running and more functions will be called, then the callback will be called asynchronously.
[QUOTE=code_gs;52597351]You have to wait for the callback function to finish: you can't return from a callback like that. In the meantime, your server will keep running and more functions will be called, then the callback will be called asynchronously.[/QUOTE] Is the only way around this to call another function in the success or are coroutines better?
[QUOTE=Swarzox;52597312]Hello, I'm trying to return a query value but it doesn't work, i use mysqloo and this is my code : [code] local queries = { getplyinfo = [[SELECT steamid FROM users WHERE steamid = ?]] } function Swarzox_Guard.GetPlyInfo(steamid) local q = Swarzox_Guard.db:prepare(queries.getplyinfo) q:setString(1, steamid) function q:onSuccess(data) return data --this part doesn't work end function q:onError(err) print("Swarzox_Guard : erreur GetPlyInfo : " .. err) end q:start() end PrintTable(Swarzox_Guard.GetPlyInfo("STEAM_0:0:206980430")) --it returns nil [/code][/QUOTE] You can't do that due to the delay of mysql. You need to use a callback function.
[QUOTE=kpjVideo;52597522]Is the only way around this to call another function in the success or are coroutines better?[/QUOTE] Both have their place, I use coroutines if I'm expecting to use the return value from the query and the values already in the function. [editline]21st August 2017[/editline] [QUOTE=Swarzox;52597312]Hello, I'm trying to return a query value but it doesn't work, i use mysqloo and this is my code : [code] local queries = { getplyinfo = [[SELECT steamid FROM users WHERE steamid = ?]] } function Swarzox_Guard.GetPlyInfo(steamid) local q = Swarzox_Guard.db:prepare(queries.getplyinfo) q:setString(1, steamid) function q:onSuccess(data) return data --this part doesn't work end function q:onError(err) print("Swarzox_Guard : erreur GetPlyInfo : " .. err) end q:start() end PrintTable(Swarzox_Guard.GetPlyInfo("STEAM_0:0:206980430")) --it returns nil [/code][/QUOTE] You're returning in the `onSuccess` function, so you're returning that value to whatever called that function, not the outer function. As said before you couldn't do this anyway as the `onSuccess` function itself is called after your function has already finished.
I'm attempting to upload an update to one of my Workshop addons. When I use gmpublish (using cmd in Administrator Mode), my arguments are accepted, and the addon begins compressing, but I get the following error thereafter; [img]http://rhap.city/i/89FRU.png[/img] I can't really find any documentation on what this might mean or how to fix it, so I'm wondering if any of you know.
Perhaps the folder you're writing to doesn't let gmad have write permissions?
[QUOTE=code_gs;52598131]Perhaps the folder you're writing to doesn't let gmad have write permissions?[/QUOTE] I'm not so sure about that; it appears to be occuring in any directory I try, including My Documents.
[QUOTE=geferon;52596817]Maybe because the engine is trying to use them via lowercase? I think you should make a script that makes them all lowercase. For convenience i guess.[/QUOTE] I can't make scripts. How would you even script. I can't script at all. I'm a complete nonce.
With the new darkrp categories (new to me , just got back into gmod), im trying to evaluate the players current category and then determime the color. So i can color an agenda border. Any help would be appreciated. Ive rattled my brain enough tonight for it. Cheets
[QUOTE=WitheredPyre;52598227]I'm not so sure about that; it appears to be occuring in any directory I try, including My Documents.[/QUOTE] Tried running gmad as administrator? (by running cmd as administrator if you launch it from cmd)
Hi all! got a new error on my Stranded server. All works just fine, yet I'm getting a new "error" I suppose you can call it. Came out of the blue, no new addons, perhaps its from a Gmod update? nothing else has changed and I've never seen this before. When a player spawns in I get this unknown function line...[B]Unknown Function: InitTimer Player [/B] (Not code, but wrapped it here anyway. its what shows on server-side console) [CODE] VAC secure mode is activated. Player Matcheezle is joining the server. Client "Matcheezle" connected (x.x.x.x:27005). Unknown Function: InitTimer Player [1][Matcheezle] Player Matcheezle has spawned in the server. Matcheezle granted god mode upon Themself ServerLog: [ULX] Matcheezle granted god mode upon Themself[/CODE] This happens with all players who spawn in. Any ideas on what to check? I did some searches in player spawn functions and what not, can't seem to see what this line is referring to. Should I ignore it since it doesn't seem to affect gameplay? Thanks in advance :cool:
[QUOTE=matcheezle;52600546]Hi all! got a new error on my Stranded server. All works just fine, yet I'm getting a new "error" I suppose you can call it. Came out of the blue, no new addons, perhaps its from a Gmod update? nothing else has changed and I've never seen this before. When a player spawns in I get this unknown function line...[B]Unknown Function: InitTimer Player [/B] (Not code, but wrapped it here anyway. its what shows on server-side console) [CODE] VAC secure mode is activated. Player Matcheezle is joining the server. Client "Matcheezle" connected (- snip -). Unknown Function: InitTimer Player [1][Matcheezle] Player Matcheezle has spawned in the server. Matcheezle granted god mode upon Themself ServerLog: [ULX] Matcheezle granted god mode upon Themself[/CODE] This happens with all players who spawn in. Any ideas on what to check? I did some searches in player spawn functions and what not, can't seem to see what this line is referring to. Should I ignore it since it doesn't seem to affect gameplay? Thanks in advance :cool:[/QUOTE] You probably don't want to be posting your IP online for everybody to see. But for your error we need more information; what addons are you using?
[QUOTE=txike;52600557]You probably don't want to be posting your IP online for everybody to see. But for your error we need more information; what addons are you using?[/QUOTE] Ok, addons are mostly player models. Some weapons and basic toolgun addons I get no actual errors server-side or client-side. very weird that this just happened out of nowhere here are my addons [CODE]WS: Processing 28 addons... Processing addon 28: [Official] Precision Tool (104482086)... Addon up to date, mounted! Processing addon 27: SmartSnap (104815552)... Addon up to date, mounted! Processing addon 26: Fading door tool (115753588)... Addon up to date, mounted! Processing addon 25: M9K Small Arms pack (128093075)... Addon up to date, mounted! Processing addon 24: M9K Specialties (144982052)... Addon up to date, mounted! Processing addon 23: PermaProps (220336312)... Addon up to date, mounted! Processing addon 22: Advanced Duplicator 2 (773402917)... Addon up to date, mounted! Processing addon 21: NPC Tools 2 (804265504)... Addon up to date, mounted! Processing addon 20: Pointshop 2 Content (439856500)... Addon up to date, mounted! Processing addon 19: Wiremod (160250458)... Addon up to date, mounted! Processing addon 18: Keypad Tool and Cracker with Wire Support (108424005)... Addon up to date, mounted! Processing addon 17: Widgets Disabler (more CPU power!) (793317003)... Addon up to date, mounted! Processing addon 16: Stranded Model Pack (152508864)... Addon up to date, mounted! Processing addon 15: Tent Army V2 by Neiremberg (933819302)... Addon up to date, mounted! Processing addon 14: White Heart Playermodel/NPC (659665057)... Addon up to date, mounted! Processing addon 13: Mr. Meeseeks playermodel & NPC (550768935)... Addon up to date, mounted! Processing addon 12: Rick playermodel, NPCs, and ragdoll (557711922)... Addon up to date, mounted! Processing addon 11: Big Smoke Playermodel (810792923)... Addon up to date, mounted! Processing addon 10: Kermit The Frog Player Model & NPC (485879458)... Addon up to date, mounted! Processing addon 9: Left Shark playermodel (391383735)... Addon up to date, mounted! Processing addon 8: Compa Playermodel & NPC (451142486)... Addon up to date, mounted! Processing addon 7: RES EVIL Merchant Playermodel (163745264)... Addon up to date, mounted! Processing addon 6: Mario Maker: Builder Mario Playermodel (727378184)... Addon up to date, mounted! Processing addon 5: Omega Content FantacyRP 2 (898962912)... Addon up to date, mounted! Processing addon 4: House Models Pack (851659462)... Addon up to date, mounted! Processing addon 3: Snoop Dogg Playermodel (348376962)... Addon up to date, mounted! Processing addon 2: Jack Skellington Player and NPC (180601311)... Addon up to date, mounted! Processing addon 1: Iffy Playermodel/NPC [Updated] (655202696)... Addon up to date, mounted! WS: Finished! Adding Filesystem Addon 'c:\gmod\garrysmod\addons\advdupe2' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\custom' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\customcommands_onecategory' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\drops_&_crates_7.2.2' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\guitar_swep' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\join_disconnect' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\libk' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\pac3-master' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\pointshop2' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\ulib' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\ulx' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\ulx_force_respawn' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\ulx_give_weapon' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\urm' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\utime' Adding Filesystem Addon 'c:\gmod\garrysmod\addons\workshop_dupe_permissions'[/CODE]
I have 0 experience with stencils but I believe this is what I need for what I'm trying to do. For anyone who has played Fallout 3 or later Fallout games before, you'll know what the VATS targeting system looks like. Fallout 4 is on my mind when I think of how it highlights the target's body. I want to do something like this, and I have no clue how. So that's my problem, how do I outline or highlight a NPC or Player on screen, clientside?
You should use halos, although for selection groups, that would be way hard to just explain simply how to do it
[QUOTE=gonzalolog;52601414]You should use halos, although for selection groups, that would be way hard to just explain simply how to do it[/QUOTE] Halos do outlines. This is more like what I'm hoping to do: [t]http://i.imgur.com/G5WmK9G.jpg[/t] [editline]22nd August 2017[/editline] Or even if I can create that glow, but show it somewhere else [editline]22nd August 2017[/editline] correct me if I'm wrong. Maybe halos create a full body glow behind the object involved? And maybe I can move that?
[QUOTE=DarkDragonLov;52601426]Halos do outlines. This is more like what I'm hoping to do: [t]http://i.imgur.com/G5WmK9G.jpg[/t] [editline]22nd August 2017[/editline] Or even if I can create that glow, but show it somewhere else [editline]22nd August 2017[/editline] correct me if I'm wrong. Maybe halos create a full body glow behind the object involved? And maybe I can move that?[/QUOTE] Nope, bad idea honestly. For what you're trying to accomplish you should both use Halos and stencils. Stencils for the green selection thing, and Halos for the outline.
[QUOTE=geferon;52601447]Nope, bad idea honestly. For what you're trying to accomplish you should both use Halos and stencils. Stencils for the green selection thing, and Halos for the outline.[/QUOTE] Alright. But I have no experience with stencils. I think I found a basic tutorial but I don't see anything on how to work with a live 3D model outside of ones I generate myself. [editline]22nd August 2017[/editline] and I still want to show it somewhere else, not on the actual character. It's for a sort of visor.
Sorry, you need to Log In to post a reply to this thread.