• Problems That Don't Need Their Own Thread v2.0
    5,020 replies, posted
Whats with crash logs being made into .mdmp now like why the fk can't you use .txt
[QUOTE=BigBadWilly;46524192]Whats with crash logs being made into .mdmp now like why the fk can't you use .txt[/QUOTE] Open with Notepad, you'll get the same effect... There's more to crash logs than just letters and numbers.
-SNIP- Look at my OP.
Is it possible to use custom cursors with PANEL:SetCursor()? I couldn't find the original function on the Github so I assume it would be more complicated than I thought... Also still having trouble with the Think function: facepunch.com/showthread.php?t=1411111&p=46521526&viewfull=1#post46521526
-snip readt wrong-
[QUOTE=Exho;46528689]Is it possible to use custom cursors with PANEL:SetCursor()? I couldn't find the original function on the Github so I assume it would be more complicated than I thought... Also still having trouble with the Think function: facepunch.com/showthread.php?t=1411111&p=46521526&viewfull=1#post46521526[/QUOTE] SetCursor is [url=http://wiki.garrysmod.com/page/Panel/SetCursor]an engine function[/url]. The valid ones are [code]user none arrow beam hourglass waitarrow crosshair up sizenwse sizenesw sizewe sizens sizeall no hand blank last[/code] If you want to paint a custom cursor, you'd need to do something like set the cursor to none and in PaintOver render your own cursor as a textured rect or something.
Unsure if asked anywhere else, But is there a way to get the Players Avatar so that I can use it in a draw hook rather then using AvatarImage vgui planel?
Is there anyway to make a prop_ragdoll, have the same player color, as a player? CreateRagdoll() works, and copies the players color. But I want to use a prop_ragdoll entity instead. But I can't figure out how to set its color, to the same as a player. SetColor() does nothing, does it have something todo with sub materials?
[QUOTE=sacred1337;46530990]Unsure if asked anywhere else, But is there a way to get the Players Avatar so that I can use it in a draw hook rather then using AvatarImage vgui planel?[/QUOTE] either draw it manually each time or draw it manually once to a render target
[QUOTE=Klaes4Zaugen;46518294]What are the names of the DarkRP scoreboard hooks so that I can use only my own scoreboard using hook.Remove("darkrpscoreboard")[/QUOTE] bump
[lua] if SERVER then util.AddNetworkString( "SetNWInt" ) net.Receive( "SetNWInt", function( len, ply ) -- ply == person who sent message print(ply) -- NIL! end ) end if CLIENT then net.Start( "SetNWInt" ) net.WriteInt( 10, 16 ) -- 16 bytes net.SendToServer() end [/lua] Am I doing something wrong here? Player is ALWAYS nil, this just started happening. Garry break something? Turns out, I had an addon that detoured net.Incoming(). :(
So, I'm trying to create a prop - finder, and ignoreZ doesn't work. Code: [CODE]hook.Add( "PreDrawHalos", "AddHalos", function() halo.Add( ents.FindByClass( "prop_physics*" ), Color( 0, 100, 100 ), 5, 5, 5, ignoreZ = true )[/CODE] What am I doing wrong here? inb4 "hackr!!" replies [highlight](User was banned for this post ("Meme reply" - Craptasket))[/highlight]
[QUOTE=dre5567;46537917]So, I'm trying to create a prop - finder, and ignoreZ doesn't work. Code: [CODE]hook.Add( "PreDrawHalos", "AddHalos", function() halo.Add( ents.FindByClass( "prop_physics*" ), Color( 0, 100, 100 ), 5, 5, 5, ignoreZ = true )[/CODE] What am I doing wrong here? inb4 "hackr!!" replies[/QUOTE] Take a look at this: [url]http://wiki.garrysmod.com/page/halo/Add[/url] [url]http://wiki.garrysmod.com/page/cam/IgnoreZ[/url] [url]http://wiki.garrysmod.com/page/cam[/url] #edit: Also halo is a dumb way of doing "esp" it will lag your shit out real quick.
[QUOTE=Invule;46538888]Take a look at this: [url]http://wiki.garrysmod.com/page/halo/Add[/url] [url]http://wiki.garrysmod.com/page/cam/IgnoreZ[/url] [url]http://wiki.garrysmod.com/page/cam[/url] #edit: Also halo is a dumb way of doing "esp" it will lag your shit out real quick.[/QUOTE] Thanks. Also, I know that halo is really shitty.
[QUOTE=dre5567;46539165]Thanks. Also, I know that halo is really shitty.[/QUOTE] Feel free to add me on steam if you need more help :)
[QUOTE=Klaes4Zaugen;46531921]bump[/QUOTE] [lua] hook.Remove("ScoreboardShow", "FAdmin_scoreboard") hook.Remove("ScoreboardHide", "FAdmin_scoreboard") [/lua]
[QUOTE=Invule;46538888]Take a look at this: [url]http://wiki.garrysmod.com/page/halo/Add[/url] [url]http://wiki.garrysmod.com/page/cam/IgnoreZ[/url] [url]http://wiki.garrysmod.com/page/cam[/url] #edit: Also halo is a dumb way of doing "esp" it will lag your shit out real quick.[/QUOTE] you dont need to use cam with IgnoreZ to enable IgnoreZ because halo.Add has an argument for ignorez, he was just using it wrong
[QUOTE=dre5567;46539165]Thanks. Also, I know that halo is really shitty.[/QUOTE] Set the player to a custom texture that has $ignorez set to true, thats how I do it. I use a wireframe texture. Page king is talking about wallhacks :/
How do you use variables in variables (I think thats how it is dunno) I need this to work combine two variables. ply is being defined [lua] local skill = net.ReadString(); ply.skill = skillLevel; [/lua] I want it like ply.dmglvl
I'm trying to update a gamemode, getting this error: [ERROR] lua/includes/modules/killicon.lua:69: 'CSKillIcons' isn't a valid font 1. SetFont - [C]:-1 2. GetSize - lua/includes/modules/killicon.lua:69 3. Draw - lua/includes/modules/killicon.lua:108 4. unknown - lua/vgui/dkillicon.lua:44 I can't find any documentation on how kill icons work, how to add them, where to put them, and what ones I can use by default.
Is there a simple way to render a cam.3d2d (or something similar) to a cylinder instead of a flat panel?
[QUOTE=Drak_Thing;46534837][lua] if SERVER then util.AddNetworkString( "SetNWInt" ) net.Receive( "SetNWInt", function( len, ply ) -- ply == person who sent message print(ply) -- NIL! end ) end if CLIENT then net.Start( "SetNWInt" ) net.WriteInt( 10, 16 ) -- 16 bytes net.SendToServer() end [/lua] Am I doing something wrong here? Player is ALWAYS nil, this just started happening. Garry break something? Turns out, I had an addon that detoured net.Incoming(). :([/QUOTE] The second argument for WriteInt/ReadInt is actually bits, not bytes. Read up on bit-counting here: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/networking/bit_counting.lua.html[/url] Now, if you have that code just in a file that gets executed when the client loads the file ( meaning they aren't fully in game ) then it will be NULL / nil. You'd need to send the message when the player is active, there are plenty of ways to determine when you can send a message to a player... You can either wait until the player has fully connected and is in game, or you can use OnEntityCreated which will be called when the player entity is valid ( still before the client is fully connected so you'll want to be careful not to send too much data or it can overflow the client while they're connecting ). If you want to wait until they're fully connected, a few hooks can do the job, take a look at my base under shared/hooks/ : [url]https://bitbucket.org/Acecool/acecooldev_base/src/master/gamemode/shared/hooks/playerfullyconnected/?at=master[/url] [QUOTE=Klaes4Zaugen;46543300]How do you use variables in variables (I think thats how it is dunno) I need this to work combine two variables. ply is being defined [lua] local skill = net.ReadString(); ply.skill = skillLevel; [/lua] I want it like ply.dmglvl[/QUOTE] Answered on Steam: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/tables/quick_intro_to_tables.lua.html[/url] 5:33 PM - Acecool: local skill = ply[ net.ReadString( ) ] ; 5:36 PM - Acecool: If you need it so you can access a var, then because everything in Lua is stored in tables you'd use it as a key 5:37 PM - Acecool: so ply.dmglvl is the same as ply[ "dmglvl" ] is the same as ply[ net.ReadString( ) ]; where net.WriteString( "dmglvl" ); was used [editline]22nd November 2014[/editline] [QUOTE=darkwolf0101;46543532]Is there a simple way to render a cam.3d2d (or something similar) to a cylinder instead of a flat panel?[/QUOTE] You can use a RenderTarget to create a material and apply it to the cylinder. [editline]22nd November 2014[/editline] [QUOTE=Blasteh;46543492]I'm trying to update a gamemode, getting this error: [ERROR] lua/includes/modules/killicon.lua:69: 'CSKillIcons' isn't a valid font 1. SetFont - [C]:-1 2. GetSize - lua/includes/modules/killicon.lua:69 3. Draw - lua/includes/modules/killicon.lua:108 4. unknown - lua/vgui/dkillicon.lua:44 I can't find any documentation on how kill icons work, how to add them, where to put them, and what ones I can use by default.[/QUOTE] It is saying the font that is trying to be used, doesn't exist... Make sure you surface.CreateFont CSKillIcons and set the font to be used as a valid font.
I know you're generally supposed to limit the amount of NWBool/NWInt stuff you use in your works as that sort of thing is expensive I'm kinda using it a lot in my gamemode based off The Ship, as there's quite a lot of stuff/values that need to be shared on both client/server. This is probably a really vague/dumb question to ask but, like, how many of these things is too much? I have less than ten but I'm still a bit worried
[QUOTE=NiandraLades;46545066]I know you're generally supposed to limit the amount of NWBool/NWInt stuff you use in your works as that sort of thing is expensive I'm kinda using it a lot in my gamemode based off The Ship, as there's quite a lot of stuff/values that need to be shared on both client/server. This is probably a really vague/dumb question to ask but, like, how many of these things is too much? I have less than ten but I'm still a bit worried[/QUOTE] Imo you shouldnt be using any. Just network the values between the server and client. Serverside [lua] util.AddNetworkString("sharestuff"); function stuff( ply ) local stuff = ply.level or 0; net.Start("sharestuff"); net.WriteInt(stuff, 32); net.Send(ply) end [/lua] Clientside [lua] net.Receive("sharestuff", function( len ) local stuff = net.ReadInt(32); LocalPlayer().level = stuff or 0; end) [/lua] This is not near as expensive as this only gets updated whenever it needs to (you have to call it manual). Hope you understand the concept
[QUOTE=NiandraLades;46545066]I know you're generally supposed to limit the amount of NWBool/NWInt stuff you use in your works as that sort of thing is expensive I'm kinda using it a lot in my gamemode based off The Ship, as there's quite a lot of stuff/values that need to be shared on both client/server. This is probably a really vague/dumb question to ask but, like, how many of these things is too much? I have less than ten but I'm still a bit worried[/QUOTE] When I release my networking system, you may want to consider using it. For now, though, I released the umsg to net-message converter ( slightly dirty because it just redirects; when I release the rest of the net I'll be rewriting that ). I'll also be converting all NWVar calls to use my networking system ( because they update whenever requested instead of only when the value changes ). When I used to use nw vars for my vehicle lighting system, it caused quite a bit of slowdowns. When I converted to use my net system, it gave around a 50% decrease in cost-to-execute. My net system should've been ready to release a few days ago but with my neck/back issues I haven't had much time to finish it. But I am working on it right now.
Is it possible to write a string to a .txt file that has '\n' new lines? The string pritns in console correctly with newlines but writing it to the .txt file just seems to destroy the newlines and thats it. Should I just file file.Append? [code] -- Write code Code = "--Layer: "..layer.."\n" Code = Code..v.."\n" file.Write( session..".txt", Code) -- Output is the code but without the \n line breaks I put in [/code]
[QUOTE=Exho;46549358]Is it possible to write a string to a .txt file that has '\n' new lines? The string pritns in console correctly with newlines but writing it to the .txt file just seems to destroy the newlines and thats it. Should I just file file.Append? [code] -- Write code Code = "--Layer: "..layer.."\n" Code = Code..v.."\n" file.Write( session..".txt", Code) -- Output is the code but without the \n line breaks I put in [/code][/QUOTE] Don't open the file in notepad and see if it works.
Hey guys im having a small problem of getting the players steamID, I keep getting tried to use a null Entity Error, my code: [CODE]function ply:ShortSteamID() local id = ply:SteamID() local id = tostring(id) local id = string.Replace(id, "STEAM_0:0:", "") local id = string.Replace(id, "STEAM_1:1:", "") local id = string.Replace(id, "STEAM_0:1:", "") local id = string.Replace(id, "STEAM_1:0:", "") return id end[/CODE] also tried it with: [CODE]function ply:ShortSteamID() local id = self:SteamID() local id = tostring(id) local id = string.Replace(id, "STEAM_0:0:", "") local id = string.Replace(id, "STEAM_1:1:", "") local id = string.Replace(id, "STEAM_0:1:", "") local id = string.Replace(id, "STEAM_1:0:", "") return id end[/CODE] the error: [url]http://imgur.com/77bydxv[/url] Anh help would be appreciated.
It tells you the entity isnt valid, so check if IsValid(ply)
[QUOTE=Exho;46549432]It tells you the entity isnt valid, so check if IsValid(ply)[/QUOTE] Ok So I mada function to tell me if it is invalid or valid: [CODE]function CheckValid(entity) if IsValid(entity) == true then print("entity Is Valid") else print("entity Is Invalid") end end[/CODE] and it returned invalid for ply, I have the ply = findMetaTable("Player") at the top why is it invalid?
Sorry, you need to Log In to post a reply to this thread.