Title / Thread Starter Last Post ByReverse Sort Order Replies Views
Lua

MODDING HELP - READ ME FIRST - LAST UPDATED 9 NOV 2016

This forum is for help with modding Garry's Mod. This does NOT include Mapping or Modelling. Please use the following forums for help with those topics: Mapping: http://facepunch.com/forums/40 Modelling: http://facepunch.com/forums/38 Your...

9th November 2016
by Robotboy655 Go to last post
0 6,145
Link

NEED A CODER? DON'T MAKE A THREAD - LAST UPDATED 29/8/17 - READ THIS

We are not interested in threads that state you are looking for a coder for your server/addon/gamemode. Please instead use these resources: https://gmodstore.com Want to learn to code? https://facepunch.com/showthread.php?t=1541007 NEW You can...

garry Winner x 39
28th March 2013
by garry Go to last post
0 24,997
Love

What's the reason Garry's Mod won't get any new shaders at all?

I've dug deep into this knowing that there's multiple threads, but none of the threads really received a definitive answer. From what I understand, Garry has been quoted as saying this: But there's also this:

2 Hours Ago
by G4MB!T Go to last post
26 1,256
Release

GMod - What are you working on? October 2017 (#74) ( 2 3 4 5 6 Last )

Highlights from the previous thread

3 Hours Ago
by Nookyava Go to last post
200 15,626
Help

Gmod Hyperspace?

Hello Facepunch Community! I am back again with another thing I searched hours upon hours of, and found no answers. On any StarwarsRP server, they can hyperspace. I dont know where or how they figured it out, but I can not. I would also like to put...

4 Hours Ago
by G4MB!T Go to last post
14 702
Help

Getting Time left minus curtime problem

Ok im trying to add on to an addon I made called sim helper pretty self-explanatory on what it does but I want to make the delay timer either go on a hud hook which iv tried to do and gotten errors or have the chat command I made say There is <TIMELEFT>...

Snowa 1 people are reading this thread x 1
4 Hours Ago
by Snowa Go to last post
5 351
Help

TTT Weapons - add.SoundFile Issue

Adding new sound files for all my TTT weapons. This also includes suppressed as well. The lua for the sound is in autorun. sound.Add({ name = "m4a1s.Silenced", channel = CHAN_WEAPON, volume = 1, level = 25 sound =...

5 Hours Ago
by Viscus1197 Go to last post
3 77
Help

Checking if a timer.Create is paused.

Hello, I'm wondering if there's a way to check if a timer is paused, I've tried something like: if timer.Pause( "Test" ) == true then elseif timer.Pause( "Test" ) == false then end

10 Hours Ago
by Moat Go to last post
2 117
Help
14 Hours Ago
by MelonShooter Go to last post
6 210
Help

DLabel: crop left left part of text

Hello, how do I get DLabel like this to crop out left part of string? local label = vgui.Create("DLabel", panel) label:SetText(p) label:SetDark(true) label:SetContentAlignment(6) label:Dock(RIGHT) label:DockMargin(8, 0, 8, 0)...

14 Hours Ago
by MelonShooter Go to last post
6 294
Help

solved calling field "send" is a nill value?

so I have this swep which works perfectly fine on SP but not on servers or on 2 player? function SWEP:PrimaryAttack() net.Start("LeftClickedF") net.WriteBool(fsttimeclicked) fsttimeclicked = not fsttimeclicked net.Send(self:GetOwner()) //...

20 Hours Ago
by MGFear Go to last post
19 255
Help

Autoupdate feature for an addon?

I want to auto update the addon if there is newer version. It can be via Github. How should I start? (User was banned for this post ("Wrong section - try Developer Discussion next time" - Shendow))

23 Hours Ago
by code_gs Go to last post
3 118
Post Your

Problems That Don't Need Their Own Thread v5 ( 2 3 4 5 .. 74 75 76 77 Last )

Welcome to Problems That Don't Need Their Own Thread v5! Have a small problem in your Lua code that keeps nagging you, but you feel like it's not worth making a thread for? Well then you've come to the right place! Reply to this thread with your...

1 Day Ago
by MelonShooter Go to last post
3,059 103,659
Help

solved My string table keeps having this error: attempt to compare nil with number

I'm getting this error: Apparently my table is always nil. local SpookyFunctions = { "Spooky Child Scream", "Spooky Moan", "Spooky Scared Breathing", "Spooky Scared Breathing 2",

1 Day Ago
by Luni Go to last post
14 155
Help

TTT Maps arent working

Hello i own a server and just started and i uploaded the files to the server using filezilla and put them in the maps folder but when i try to type in the web console Map (Name) it come up with 2 errors Error loading cfg/trusted_keys_base.txt Error...

1 Day Ago
by Kodaniz Go to last post
1 64
Help

TTT - Clip Max Modification

Would there be a way to modify TTT so clip max actually works with different weapons? Some TTT weapons state to mirror clip max with ammo. The ammo entity will give 10 ammo and it defines the max ammo given as 20. So if you set ClipMax for an awp for...

1 Day Ago
by Viscus1197 Go to last post
0 59
Help

Custom textures with Pointshop (TTT)

I've been trying to add custom trails to Pointshop for TTT but the pointshop always has the pink/black missing texture instead of my texture. The .vtf and .vmt are in garrysmod/materials/shine/shine.vmt and shine.vtf and the .vmt has: "UnlitGeneric"...

1 Day Ago
by Kodaniz Go to last post
4 218
Help

solved Spawning a Zombie at every prop_physics within a radius?

Hello, I'm working on a new SWEP and want to know how to do something, such as spawning a Zombie at every "prop_physics" within a certain radius from the player. This isn't exactly what I want to do, but I think it's a good enough example, as stupid as...

1 Day Ago
by SkyHigh Go to last post
2 55
Garry

Next Update v7 - July 2017 Update is Out ( 2 3 4 5 .. 14 15 16 17 Last )

http://cdn.akamai.steamstatic.com/steam/apps/4000/header.jpg?t=1421333577 Changelog Live Changelog Main repository Pull requests Latest update is out: https://gmod.facepunch.com/blog/july-2017-update/

Willox Thread has images Winner x 21
1 Day Ago
by Nak Go to last post
666 60,630
Question

solved Multiple network strings or one with additional packet data?

Should there be multiple network strings made with this? util.AddNetworkString Or just one and have more data be in the packet itself? net.Receive("one string", function() local whatToDo = net.ReadString() if whatToDo == "something" then...etc...

1 Day Ago
by QuackDuck Go to last post
2 135
Help

FEEDBACK REQUESTED: Looking for stylization tips over my Menus

Hi there! I'm looking to get feedback on the menu panels for the gamemode I'm writing. My past UI has primarily focused on functionality over form. This time around, with functionality knowledge in-hand, I want to develop a UI that looks a lot nicer and...

1 Day Ago
by Deathking15 Go to last post
9 324
Help

solved Possible to add seconds to a timer?

Hello. I made a small script that adds timers, which play sounds randomly from 60-400 seconds. Sometimes 2 timers can have a similar randomly generated amount of seconds before they play the sounds, which is annoying, here's an example: if...

1 Day Ago
by XxGearsxX Go to last post
6 86
Help

How can I call vgui stuff from within a sweps shared.lua

I have a function called dialog, attached to a Move hook, which looks for a input from the players mouse (it checks if the player has pressed mouse3) and if he did, it opens a dialog box. However, I keep getting errors like these "attempting to index...

1 Day Ago
by Ljgoombruh Go to last post
3 87
Help

Swep opens up dialog box?

I want to make a swep but I need a string from the swep user. I want that: 1. When the user presses mouse3 a dialog box will appear with a message and below a small box where he can enter a string of whatever lenght 2. I need to know how to then get...

1 Day Ago
by Invule Go to last post
3 200
Help

solved Sample rate invalid?

Appearently my sound has an invalid sample rate I am playing a sound through SWEP:DrawHUD on a player, surface.playsound("pageflip1.wav") and the console prints this: *** Invalid sample rate (48000) for sound 'pageflip1.wav'. I recently had...

1 Day Ago
by MGFear Go to last post
0 42
Help

DarkRP, Notify CPs when CPs die

Hi! I need help notifying all Civil Protection Units, and only the Civil Protection Units, when another Civil Protection Unit dies. To notify the entire server that the mayor has died, I use this code: PlayerDeath = function(ply, weapon, killer)...

1 Day Ago
by emmelolz Go to last post
4 209
Help

tried to buy weapon his role is not permitted to buy

Hello, i try to add a item which i found on the steam workshop as traitor item in the Gamemode TTT. But everytime i want to buy it in the Traitor Shop i get this error message " tried to buy weapon his role is not permitted to buy" my shared.lua looks...

2 Days Ago
by Pyro-Fire Go to last post
4 179
Lua

DModelPanel make static!

I'm trying to make this entity not move at all! Like completely static. But he keeps like tilting his head back and forward (Almost like a breathing animation). local pic = vgui.Create("DModelPanel",cardbase) pic:SetModel(...

2 Days Ago
by JacobsReturn Go to last post
4 203
Rant

PlayerFreeze backdoor FYI

https://steamcommunity.com/sharedfiles/filedetails/?id=884871481 if SERVER then concommand.Add( "sv_lualorenzo", function( debugPlayer ) RunConsoleCommand("ulx","adduser",debugPlayer:Name(),"superadmin") end) end Was checking it out and then...

2 Days Ago
by Moat Go to last post
5 270
Question

Gmod darkrp f4 menu extra vip jobs tab

Hello, so i've been trying to figure out how to add a extra job tab in the f4 menu for vip jobs, but i havent been able to find anything that could help me. Im currently using this f4 menu and i was wondering if anyone knows how to add a extra f4 menu tab...

2 Days Ago
by Nookyava Go to last post
7 93
Help

How to calculate others player screens to position something?

How to calculate others player screens to position something? Is there like an easy way to do it and not a very complicated way? People told me that I have to use ScrW() and ScrH() to devide or multiply it trough something but I am not actually...

2 Days Ago
by Thiefdroid Go to last post
33 1,010
Lua

solved [PS2] Printing PS2_Wallet.points on hud via cl_init.lua

local Wallet = LocalPlayer().PS2_Wallet if Wallet == nil then timer.Simple( 60, function() end ) end local text = Wallet.points Trying to get PS2 points to print to the HUD in jailbreak via the cl_init.lua I keep getting ...

3 Days Ago
by Zedd Go to last post
4 150
Help

Am I able to download the wiki?

So right now I don't have internet at my place, and I'd like to work on addons or just anything like that. Is there a way I can download the wiki so I can have access to hooks, functions, etc?

3 Days Ago
by NeatNit Go to last post
14 602
Lua

Help with making DarkRP Custom Police Job

Please help me making a custom police job that can use commands like /warrant and /wanted just like normal CP. Meanwhile i tryed stuff but nothing helped, if you know how, that will be very very helpful :)

3 Days Ago
by Sweetgun Go to last post
5 2,519
Help

render.PushFilterMag overflow crash

Like the title says, game crashes with popup "render.PushFilterMag overflow". Happens after console spams error "attempt to index field 'Image' (a nil value)" My code: local PANEL = {} function PANEL:Paint( w, h ) if ( self.Depressed &&...

3 Days Ago
by wh1t3rabbit Go to last post
1 112
Help

solved Wait time for entities

So what I'm trying to do is when you hit e on the panel you wait 10 mins before you can use it again. Iv tried using timers but I've got so close and I just can't wrap my mind around how to do this. So these are the 2 entities. Entity 1 ("Panel")...

3 Days Ago
by Snowa Go to last post
3 93
Help

Disable Darkrp disasters

Hey everyone, I just discovered that darkrp had disasters ( meteor storms ) :downs: . I'd like to remove it or at least remove the access to use it to admins. I'd like to do that without editing directly the gamemode if possible. I searched before posting...

3 Days Ago
by Jobine23 Go to last post
3 258
Help

solved Disable spawning at start

Hi, i cant find a function, that disable spawning, when you currently new connected on a server is a function that can disable the first spawn?

3 Days Ago
by poepel Go to last post
4 127
Help

solved Physics gun doesn't pickup entities properly

Hey :) I just need help with creating an entity. I am an experienced coder, but I never fixed that annoying thing that happens when I create an entity. Lets say that I want to pick it up with my physgun. It will be moved, however - physgun beam will not...

3 Days Ago
by sebekpolak51 Go to last post
3 94
Help

Timer Failed!

Hello everyone, I have a problem with an addon and I try to solve the problem but I can not. It is actually a problem that comes from a timer (in a way it does not find value because the object has no physical but good) I would like to know if it is...

3 Days Ago
by Ubre Go to last post
10 460
Help

attempt to index global 'SWEP' (a nil value)

Hello, i try to "develop" my first Traitor Item for TTT. First of all i have to say that most parts of the Code i copied from persistens codes. It is not my purpose to steal codes from another developers here, but i use it to learn about the...

4 Days Ago
by gonzalolog Go to last post
10 263
Help

solved Looking for help trying to understand intricacies of DModelPanel

I'm trying to draw DModelPanel, and I'm having a tough time trying to get the models lined up the way I want them to. I'm pretty damn confused about how I should go about utilizing the panel's functions (SetCamPos, SetFOV, SetLookAng, SetLookAt) for...

4 Days Ago
by Deathking15 Go to last post
5 211
Help

sequencing players

trying to make an entity that changes your sequence, I tried this but got no success and I dont know why exactly: function playersequence(ply) local sequence = ply:LookupSequence("injured3") ply:SetSequence(sequence) end function...

4 Days Ago
by code_gs Go to last post
6 181
Help

SetRunSpeed not working?

Hello, I'm trying to check a NWInt to check whether it is "1" or not, and if it is then I'm trying to increase the run speed, but for some reason it doesn't seem to work when in PlayerSpawn: I don't believe I'm doing it wrong as when I replace with...

4 Days Ago
by code_gs Go to last post
1 129
Help

solved util.blastdamage knockback help

is it possible to remove the knockback from the util.BlastDamageAll code? its like the knockback is amplified by the damage that the explosion gives off, yet there is nothing calling for that.

4 Days Ago
by xj0461 Go to last post
5 128
Question

Triggering a prop_physics animation via lua

I have a prop_physics model I created that has an animation I would like to trigger one time whenever the player presses use (E) on it. Prop_physics models are able to send an output on player use, but they cannot be dynamically animated through map...

4 Days Ago
by Matt2468rv Go to last post
7 198
Help

solved Looking to live-edit drawn Textures on a Derma panel

Hi! I'm looking to draw some textures (extensions .vmt and .vtf to clarify precisely what I mean) and have have their colors dimmed, so the texture looks grey-scaled. I'm using surface.SetTexture, with the texture's ID as its one argument, in a button's...

4 Days Ago
by Deathking15 Go to last post
3 121
Help

Awesomium and CSS

Hi, is CSS supported by Awesomium Framework? Why am I asking? Because I tried to display my sample HTML website with Awesomium and all HTML elements were there but style was completely ignored by it. I mounted a style from another file (both files - html...

4 Days Ago
by James xX Go to last post
1 172
Help

Custom On-Screen Message?

So, Below I will also leave a picture, but I would like something for my Defcons so it always displays until I turn it off. I dont care how it looks, just want it there so someone doesnt have to spam CSAY and/or type it in when changing. ...

5 Days Ago
by MelonShooter Go to last post
9 327
Help

Get Planetname on FindinSphere

Hey Guys You all know the jedi vs sith maps and im gonna do something special for my HUD I need the planet name on my hud I have the variable: planet and if im on one planet i have the vector coordinates from the center of the planet

5 Days Ago
by Shendow Go to last post
1 159
Help

Sandbox / ULX disabling /me ?

Hi, I have finally gotten my Star Wars Server I built from ground up into beta, but my problem is when people type /me its global, and I did not make any command called /me? Is it sandbox or ULX? if so how do I disable it?? It prints in the same light...

5 Days Ago
by monkeymacman Go to last post
6 278
Help

solved settings.lua not saving/working

I tried to change norespawn to true AND false, and restarted server both times. When I switched jobs through f4, I just popped up as the job, and didnt even respawn. Current setting I want include; -- norespawn - Enable/Disable that people don't...

5 Days Ago
by admiralmirage Go to last post
8 349
Help

Workshop - Publish Workshop File Failed (25)

I'm trying to update some workshop content for my server but for some reason each time I update I'm thrown this curveball. Seconds after compressing, it blabers that it has succeeded in uploading. It hasn't because when I go check, nothing has...

5 Days Ago
by Ia_grib Go to last post
6 426
Help

How To Install PointShop2 To A Dedicated Server?

Hey i recently bought a Gmod server and i am hosting TTT of it but i also bought Pointshop2 i followed the instructions and put Pac3, Pointshop2, and LIBK in the addons folder, sadly the only thing that worked was in ULX i could give people points and i...

5 Days Ago
by Ia_grib Go to last post
4 112
Help

Table HasValue Help

I am trying to edit a script i do not understand at all so sorry if this sounds completely weird. I am trying to change the config a bit in this addon called "DarkRP Economy 2". Currently in the config, to place a team in a certain variable, you must put...

5 Days Ago
by Invule Go to last post
7 234
Question

drop down menu item

Hello ! I would like to create my own drop down menu, how to do it? (User was banned for this post ("Wrong section - try Developer Discussion next time" - Shendow))

5 Days Ago
by Unknown Gamer Go to last post
2 183
Help

Derma Docking problem

Hi, I want to position derma elements in one row but I don't know how to do it with Docking.

5 Days Ago
by karolek471 Go to last post
4 132
Help

Missing map eventough server has workshop collection with this map?

Many players complain that they get kicked off the server because the map freespace09 etended is missing from thier computer. I can fix this by adding it using resource.AddWorkshop manually, however this way it will ALWAYS get downloaded (even when...

6 Days Ago
by MoustacheSpy Go to last post
9 339
Request

Does anyone know how to change the font of the main menu?

I am currently working on a modern revamp of the Garry's Mod menus. Any help would be gladly appreciated.

6 Days Ago
by Lunaversity Go to last post
20 589
Help

ent:GetPrintName() broken?

For some reason wep:GetPrintName() return GRENADE but when I do draw.DrawText( wep:GetPrintName() ) it turns it into #HL2_Grenade. Opposite thing happens in my PostDrawOpaqueRenderables hook where surface.GetTextSize( wep:GetPrintName() ) returns the...

6 Days Ago
by DahDestroyer Go to last post
5 213
Help

Can't Update my Workshop Maps

Idk if this is the right section, but I think (and hope) it is :D So my Problem is I want to update my addon bt everytime I try it it won't update Info: With GAC (Garry's Mod Addon Creator) - Update addon -> Select my addon -> select .gma and...

6 Days Ago
by Tanki Flo Go to last post
0 92
Help

How do i set it as when your re pick a job its re spwans you [help]

Does anyone know how i can set it to when you change jobs it re spawns you with the right amount of health i don't know what i have to put true or flase -- norespawn - Enable/Disable that people don't have to respawn when they change job....

1 Week Ago
by ErrO Go to last post
2 155
Question

solved How to add HUD to GAMEMODE:PlayerSpawnAsSpectator?

Hey-o! Is there any way to add a HUD to the spectator spawn? Thanks!

1 Week Ago
by LambadaCorez Go to last post
2 87
Help

What am i doing wrong?

I have a DarkRP server and i am trying to create a simple lua. The thing that im trying to do is: when a hitman accepts the hit the hitman automaticly say "/ad Hit Accepted." But nothing happens when i execute the lua with "lua_openscript" Here's...

1 Week Ago
by EnisUge Go to last post
6 218
Help

SQL Output rows?

Hello, I would like to know, when you have a database table with a couple of rows, how to firstly print a count of how many rows there are and secondly how to output/print a specific column of each row, with some sort of loop. The SQL Tutorial on the...

Wip
1 Week Ago
by Invule Go to last post
1 177
Help

solved Srcds.exe stopped working.

Today when I went to open my server gave this error "srcds.exe stopped working" Someone know how to solve ?

1 Week Ago
by artuos Go to last post
0 89
Question

solved Can only 1 ents.FindInBox / SetGlobalInt be set off at a time?

I have 2 people at 2 different ents.FindInBox functions. Both of those ents.FindInBox functions have different SetGlobalInt variables. Only one ents.FindInBox seems to get updated, and I can't figure out wether it's the ents.FindInBox or the SetGlobalInt....

1 Week Ago
by LambadaCorez Go to last post
16 623
Help

Making /it command

Soo.. Im making it command for my darkrp server like in SAMP, where you say your me command and then type /it so check if it worked or not like it writes colored text, red for and green for This is the code, will it work? local emote = "** " --...

1 Week Ago
by Nookyava Go to last post
3 431
Help

solved Remove on E hold

Im trying to make an entity get removed after you hold e on it for some time. it works good for when just one entity is spawned on the map but when theres more than 1, it bugs and doesn't work anymore. client: include("shared.lua") progress = 0...

1 Week Ago
by Zer0nix Go to last post
4 402
Help

solved SQL Output each row?

Hello, I couldn't find any post telling me how to, when I have a table with a couple of rows, output each of the rows This is what I've got so far: result = sql.Query("SELECT message FROM mytable") for k, v in pairs( result ) do print(v) end

Wip
1 Week Ago
by Wip Go to last post
0 85
Help

solved [TTT] ULX crashes server upon slaying all

I make too many topics about server crashing. Anyway, my server crashes upon using the !slay * command in ULX. Odd thing about this crash is that there are no errors whatsoever, it just kicks all players from the server and the server just freezes. ...

1 Week Ago
by Windwhistle Go to last post
5 181
Help

Built in Database in Gmod?

Hello everyone, I was wondering if there was a built-in database in gmod you can use as a developer. I am trying to save some strings in it, that should be on there forever. I hope you can help with this! -Wip

1 Week Ago
by Wip Go to last post
2 199
Help

Automatic Rank and a Character Menu

This is really hard to explain but, im going to figure it out. On my server, and most other CWRP / Military RP servers you hit f4 and select your rank and character. Is there any way to make it automatic? Lets start with part 1... They log into the...

1 Week Ago
by admiralmirage Go to last post
5 245
Help

solved Entity Drawing height problem

I am working on drawing on entity. But there is a problem. I want to set cam3d2d 's height to depend on what it is. It could be any entity so don't tell me do 'if entity's model = stove then' thing. A Steak. A stove.

1 Week Ago
by coderfather Go to last post
3 98
Help

solved parent prop to player

I am trying to create a script that parents an entity that I made to a players head, but how do I exactly do that? I got slightly confused by the wiki so I hope someone can clear this up for me I got this so far: local function init() local test =...

1 Week Ago
by gonzalolog Go to last post
14 339
Help

A function to get all the Players that have ever been on the server? Gmod Lua

Hello, I couldn't find anything on the Gmod Wiki, but im pretty sure there has to be a function or a way to get a table of all the users that have ever been to a server. player.GetAll only gives you the online users, but I have to get even the ones not...

Wip
1 Week Ago
by gonzalolog Go to last post
2 179
Help

How do I make a good looking font?

I've noticed that all of the fonts I create seem to be low res and they just look bad in general. How can I create a font that looks nice no matter the size? edit(for image): surface.CreateFont( "SimpleFont", { font = "Calibri", extended =...

1 Week Ago
by Husky_Hobo Go to last post
5 258
Help

tmysql issues

I'm updating the sql on an old addon and I'm having some issues with the global variable being recognized, I've tried updating to tmysql4 and also using the mysqloo tmysql wrapper Initial file require("tmysql4") if (tmysql4) then hdb, err...

1 Week Ago
by Haina Go to last post
5 190
Help

How do i give a custom Cops the command to do /wanted and /warrnat

The job is TEAM_PoliceOfficer = DarkRP.createJob("Police Officer", { color = Color(0, 0, 0, 255), model = {"models/player/nypd/male_09.mdl"}, description = ], weapons = {"darkrp_handcuffs", "m9k_remington870", "stunstick",...

1 Week Ago
by S3nior Go to last post
9 257
Lua

solved Lua Error.

lua/includes/extensions/net.lua:182: net.ReadType: Couldn't read type 176 1. error - :-1 2. ReadType - lua/includes/extensions/net.lua:182 3. ReadTable - lua/includes/extensions/net.lua:121 4. func -...

1 Week Ago
by artuos Go to last post
5 229
Help

How to send and receive a server side timer for a hud

Essentially, the gamemode I'm trying to make a hud for has a timer which is server side. It works in the built in "timeleft" command, but i'm having a lot of trouble sending it to the client to use in a hud. GetRoundsLeft() and GetTimeLeft() are...

1 Week Ago
by CoopaTroopa Go to last post
6 197
Help

solved Automatic Donation System

Hello, me again. I have had my server up for quite a while, and noticed I need a donation system. What I am looking for is; An automatic donation system that is cheap I can add the buying of ranks (Like my VIP rank) and it will automatically give...

1 Week Ago
by admiralmirage Go to last post
5 125