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

MODDING HELP - READ ME FIRST - LAST UPDATED 7th November 2017

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,730
Link

NEED A CODER? DON'T MAKE A THREAD - LAST UPDATED 7th November 2017 - 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

garry Winner x 40
28th March 2013
by garry Go to last post
0 25,540
Garry

Next Update v7 - November 2017 Update is Out ( 2 3 4 5 .. 16 17 18 19 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/november-2017-update/

Willox Thread has images 8 people are reading this thread x 8 Winner x 22
59 Minutes Ago
by drizzydotvip Go to last post
739 69,348
Help

How to use RotateAroundAxis properly?

I am using cam3D2D on a entity and I need to rotate the 3d2d. I am trying to use RotateAroundAxis but its giving me errors, what am I doing wrong. local pos = self:GetPos() + self:GetAngles():Up() * 60 + self:GetAngles():Forward() * 15 local angle...

1 Hour Ago
by Pyro-Fire Go to last post
7 107
Lua

Make text disappear and appear after some time

Hi, i'm using this code to display random text for players. The question is, is it possible to make text disappear after 10 seconds and then appear with random text? local hints = { -- table of options "Random text 1", "Random text 2" }...

Sijay 1 people are reading this thread x 1
1 Hour Ago
by Invule Go to last post
6 181
Help

DarkRP, Check Pocket Items

Hi. Is there a way to check players pocket/inventory in DarkRP, to allow or disallow that player to buy certain items. I want to make it so that players can only buy a certain item if they have a permit in their inventory. Example: (Not working)...

emmelolz 2 people are reading this thread x 2
2 Hours Ago
by emmelolz Go to last post
7 160
Help

Ban Player on Death of Admin Weapon SWEP

Hi guys im in the works of creating a swep, The idea is when you are hit with it you are instantly perma banned with ulx. I have been trying for about 3 hours now to try and work a solution and can simply not get it. If anyone could give me a hand i...

2 Hours Ago
by Pyro-Fire Go to last post
4 163
Help

solved How to force thirdperson for a gamemode/completely disable firstperson?

Hi, I've searched quite a bit for a solution but I can't seem to find one. I'm trying to force thirdperson view for my gamemode, so that players are always in thirdperson and never in firstperson at all. I am new to GLua however I can't find anything on...

4 Hours Ago
by Civil Metro Go to last post
2 56
Help

CanExitVehicle hook not working

hook.Add("CanExitVehicle", "StopYouCriminalScum", function(veh, ply) if(veh:GetNWEntity("Prisoner") == ply) then return false end end)

6 Hours Ago
by Ubre Go to last post
2 89
Question

[Server Content] Downloading and activating custom font files

Hello, GMod Lua Community! I have a question with which i'm trying to deal about half of year. The sutiation. I'm used to use special fonts for my work in coding. So i have a few fonts - digital7mono and Helvetica Family. Format - ttf The Goal

6 Hours Ago
by FaceSparTV Go to last post
6 264
Post Your

Problems That Don't Need Their Own Thread v5 ( 2 3 4 5 .. 80 81 82 83 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...

6 Hours Ago
by code_gs Go to last post
3,297 114,626
Art

GMod - What are you working on? November 2017 (#75) ( 2 3 Last )

Highlights from the previous thread

7 Hours Ago
by iDeku Go to last post
117 11,017
Help

DarkRP, Increase pocket size with entities.

Hi. I'm simply wondering if there is a way to increase the DarkRP pocket size using entities. Say a suitcase, bag or something else. If there is a way to increase, how would I go about doing this?

emmelolz 2 people are reading this thread x 2
7 Hours Ago
by emmelolz Go to last post
0 90
Lua

[DarkRP] Disabling hunger for certain jobs

Hi, is it possible to disable hunger mod for certain jobs?

8 Hours Ago
by mcNuggets1 Go to last post
1 56
Help

Healthbar effect.

Hello, Im currently busy with a PUBG HUD, but I need a effect added to it. I am looking for the following (bleep) effect: https://www.youtube.com/watch?v=e8lytmLjJ0s&feature=youtu.be&t=9m13s Whenever a player is under a certain ammount of health...

13 Hours Ago
by Tripperful Go to last post
13 451
Help

solved teamGetClass returning nil?

I am trying to get the players darkrp class and its returning nil instead of TEAM_WHATEVER. Here is my code :) function ENT:Use(activator, caller) if team.GetClass(caller:Team()) == "TEAM_HOBO" then print("DEBUG SHIT") end end

16 Hours Ago
by ZeroToHero Go to last post
7 123
Help

Display DVScrollbar even with no item in DScrollPanel ?

Hi everyone, I wonder if it's possible to display the DVScrollbar in a DScrollPanel even with no items in the scrollPanel ? Thanks in advance ! PS : What a wonderfull forum, helped me a lot !

19 Hours Ago
by MPan1 Go to last post
6 179
Help

Custom gamemode's physics are messed up.

I was working on a gamemode, but suddenly the physics got suddenly mess up. There is no gravity and things are very resistant to move. They still spin normal though. It is weird because it even affects props spawned by the map.

PumpkiNot 1 people are reading this thread x 1
1 Day Ago
by gonzalolog Go to last post
1 119
Lua

color door display need help

Hi I'm going to make a color name for the professions, but I ran into a problem Code colorMulAlpha( LocalPlayer():getJobTable().color, amul ), (User was banned for this post ("Wrong section, try Developer Discussion next time" - Shendow))

1 Day Ago
by Invule Go to last post
1 171
Lua

Temporary text with auto changing

Hi, i was wondering how to make temporary text on screen that will change text after some time? I want to make some text appearing at screen that will be displayed every 50 second but with random text. I was thinking to make random table to make it work...

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

solved Can i change the DVScrollBar width ?

Hi everyone, Simple question : Am i able to change the DVScrollBar width ? I printed its width and saw it was 15px, i need it to be 16px for design purpose... Please tell me it's possible ! I've been looking everywhere on the wiki (maybe not...

1 Day Ago
by Perceptron Go to last post
2 105
Question

How can I modify the TTT Death Sound for the ONLY the person who died?

Alright, so the last question I asked on this site was only maybe 2 days ago, so I feel really bad and helpless at this point. So, here's the deal: I have a TTT dedicated Gmod server, and I want to edit the sound that plays when somebody dies. I've...

1 Day Ago
by a1steaksa Go to last post
2 275
Question

servers with really low ping

hi, i was wondering how severs have such low ping? is it spoofed? do they have some sort of good commands in their server.cfg? thanks.

1 Day Ago
by drizzydotvip Go to last post
23 1,084
Help

Territories

Hello, I know I am a new player and I will likely be looked upon as just a useless Leecher to the Community, but I am afraid I am going to ask anyway. I am currently looking for a way to have a GUI in the top left section of the screen (anywhere in...

1 Day Ago
by Shendow Go to last post
7 199
Help

solved DScrollPanel won't instantiate

Hi everybody, I wonder why my DScrollPanel is not correct ? local PANEL = {} function PANEL:Init() self:Dock( FILL ) self.VBar.Paint = function( pnl, w, h )

1 Day Ago
by Perceptron Go to last post
2 110
Help

solved Client Times Out

After some recent changes to my gamemode regarding file names, AddCSLuaFile, and Include, clients now crash when they join the server. Additionally, when I view the server in the server browser, it's under the name "Base Gamemode" and not what it...

1 Day Ago
by Deathking15 Go to last post
2 161
Help
1 Day Ago
by Tom333 Go to last post
2 161
Help

HELP PLZ FOR MY FIRST HUD

Hello, I m a small coder and i have create my first HUD but it looks like that.... Link for screen: https://www.noelshack.com/2017-46-6-1511013900-capture.png I try to transform my folder to .gma but i doesn't work ... :( Please help me and...

1 Day Ago
by JacobsReturn Go to last post
2 234
Help

Adding table values through functions then reading them on client not working

Hi, I have been coding my addon for a while and I have come across a problem I didn't think of. After reloading the map / restarting the server, when it loads up non of the values "add" like when a player spawns it sets the players nwstring to something,...

1 Day Ago
by JacobsReturn Go to last post
8 197
Question

solved How to make a RNG that assigns a player as a particular playermodel?

Okay, this is probably my weirdest and most hard task for someone to program. Brief notice: I know nothing about lua coding apart from the small times I've code monkeyed. So, if you do explain lua, please treat me like a child that was dropped as a...

1 Day Ago
by MPan1 Go to last post
5 154
Lua

DARKRP Job Error

Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 711. The best help I can give you is this: Right before the '}', Lua encountered something it could not make sense of. ...

1 Day Ago
by gonzalolog Go to last post
1 102
Help

solved Making a timer local?

I already have a thread and I asked this in the comments of it but I thought this should deserve its own thread. I am making a entity(printer) and I call a timer.create in ENT:Initialize(). If I spawn 1 printer it works fine. But if I spawn another,...

2 Days Ago
by ZeroToHero Go to last post
3 116
Help

solved Making a printer NET Error

I am trying to make a printer and I made a timer that every 10 seconds it will set moneyPrinted to moneyPrinted + some money. I want it to sent to client so client will know what to draw on the printer. Its not working ...

2 Days Ago
by ZeroToHero Go to last post
6 156
Help

Finding owner of entity within FindInBox

How I know can I get that information? I am trying to make it so you can scrap props to a guy and have him only take YOUR props no anyone elses. Here is the code. I am aware it doesn't work but, a little pseudo code you can think of it as. NOTE: I...

2 Days Ago
by gonzalolog Go to last post
3 149
Question

Players Can't Use Mics/Chat when Dead?

I have a server running Wolvin's Enhanced Prop Hunt but players cannot speak when they have been killed/have died. Does anyone know how to fix this? I have no idea where to even begin looking. Thanks so much!

2 Days Ago
by blackjackph Go to last post
10 225
Question

Realm: Menu (autorun/hooks)

Hi, is there an autorun for menu realm? or is it possible to send menu realm luas to clients? lua/menu/errors.lua modified to send http.post to google form + google sheet example:

2 Days Ago
by Ia_grib Go to last post
7 265
Question

How to Disable Auto-Taunt on Prop Hunt?

I use Wolvin's Enhanced Prop Hunt on my PH server but it comes with an auto-taunt feature that taunts every 45 seconds. I have been trying to research how to disable this but the closest i could find was to edit the sh_config.lua file found in...

2 Days Ago
by blackjackph Go to last post
0 118
Lua

TTT Shop - Items cost more than one credit

Hello! I know that the developer didn't want to change the price of items, but it would be rly nice. I tried to configure the terrotown/gamemode/weaponry.lua file, but it didn't work. Can someone of you help me?

2 Days Ago
by gonzalolog Go to last post
3 136
Help

solved attempt to call method 'IsVisible' (a boolean value)

Hi ! I'm having trouble with DPanel and IsVisible Here is my code : cl_init.lu local MENU = {} local F4_FRAME

2 Days Ago
by Perceptron Go to last post
2 96
Help

Disconnect: (in-game name) timed out, error during loading screen.

WE NEED A FIX ON IT, I currently have mod in a darkRP server and they will unmod me if I'm not active. (User was banned for this post ("Didn't read sticky" - Shendow))

2 Days Ago
by James xX Go to last post
3 173
Lua

I wanna know how to make my own Garrys Mod script.

Hello every one, Im looking for someone to help me understand and learn how to make a Garrys Mod script. Serious inquires only. Iam very respectful and open minded to suggestions! Please dont make fun of me, every learned at some point. :cat: (User was...

3 Days Ago
by gamerpaddy Go to last post
1 233
Question

Making PAC3 play a sound when attacking

Hi all, I'm working on making weapon model replacements using PAC3 for TTT. At the moment, I currently have a model replacing the TTT knife swep via PAC3, and that works great! No issues there right now. The issue I am having, though, is that I can't seem...

3 Days Ago
by WitheredPyre Go to last post
4 335
Help

Currency system.

I cannot find a good way to create a money system, could someone help? This is the first currency system I used, it worked perfectly fine, but it used NWInt which is not efficient as it makes everything public and causes server lag. local pm =...

3 Days Ago
by bilbasio Go to last post
11 234
Help

solved SendWeaponAnim() Not working consistently

I'm trying to make a swep capable of reloading even if it has a full magazine already. (If someone knows how to force a reload even with a full mag, please let me know because it will make all my problems go away) I'm doing this by doing...

3 Days Ago
by a1steaksa Go to last post
2 205
Help

Hiding the tool tabs in the spawn menu

Hello facepunch, so I have a question, I found code for hiding normal tabs in the spawn menu for non-admins but I also want to hide the two of the 3 tool tabs for non-admins too. Here is the code for the tabs: local function removeOldTabls() local...

3 Days Ago
by Pyro-Fire Go to last post
5 375
Help

How to use a variable from another file of another folder.

Hi. First , yes i know there is 999999 thread about it , but actually i'm completly lost. When i try to reproduce something it never works. Actually that's what i've : So actually i want call a variable that is in the "cl_init.lua" file...

3 Days Ago
by gonzalolog Go to last post
26 1,135
Help

Players timing out

I own a server and there is a rather big issue going on with it. I find that some players would "time out" when attempting to join and I'm not sure if this causes them to fully crash, but I do suspect this as I have fallen victim to timing out myself (and...

3 Days Ago
by Pyro-Fire Go to last post
6 363
Help

using SetModelScale on a player acts weird

If you use SetModelScale on a player, it is easy for the player to get stucked in nearly everything. The movement is weird either. Is there a way to fix this behaviour?

3 Days Ago
by Pyro-Fire Go to last post
2 185
Help

Lua AutoRefresh problem

Hello! i have been looking around on the google how to fix my Lua AutoRefresh, beacuse it prevents my work everytime i do any Draw i need to type "Reload" in the console to update my Draw on the entity. Idk why isn't working for me i have looked so many...

3 Days Ago
by xrelolp Go to last post
0 138
Question

HELP - Pointshop

Hi guys, I would like to know how to restrict skins/playermodels (Pointshop) to specific jobs. Can somebody help me?

4 Days Ago
by Deathking15 Go to last post
8 357
Help

solved How to only have server's own spawnlist in spawnmenu?

hi there I wanna make so it would look something like that imo that way it looks cleaner and avoid people trying to spawn blacklisted props I want it to be a fake spawnlists menu, so it wouldn't mess up with anything

4 Days Ago
by code_gs Go to last post
3 204
Lua

solved Need help with ply:GetVelocity()

Hello! I am currently trying to develop my deathrun's hud further and I decided I want to add a velocity bar to the hud as that is very helpful for Deathrun. I've been trying to figure out how to add another bar, below the hp but I can't figure it out....

4 Days Ago
by ZombiezPvP Go to last post
9 261
Lua

Entity instanced sub-metatables

How might one make a metatable for something like the entity metatable that automatically creates its own instances? Sample Code: local testClass = {} function testClass.MyFunc(t,x,y,z) print( "MyFunc() Call:",t,x,y,z ) end local testMeta = {}...

4 Days Ago
by Pyro-Fire Go to last post
0 122
Help

need help with entity networking

hi, ive been trying to learn Glua and ive followed some tutorials and made the chair thrower, made some variations.etc right now im trying to grab a chair thrown by the chair thrower and when it collides with the ground make it explode in multiple...

4 Days Ago
by MPan1 Go to last post
1 160
Help

Ammo Machine help

Hey guys I found this old ammo machine addon and I've been trying to make it work all is good with it but the last error I get has something to do with a Spawn Icon. It seems I'm also using a few out of date things. This is the error I get when ever I...

4 Days Ago
by MPan1 Go to last post
4 233
Help

Help with custom images

So I'm trying to use custom images for a DImage in my server, how exactly do I add the image to the content to make it not a missing texture when the image is displayed to the players? Thanks

4 Days Ago
by DarkAura Go to last post
6 149
Lua

[SWEP CONSTRUCTION KIT] Can i change color of prop on click ?

Hello ! I wonder if i can change a prop color from the SWEP CONSTRUCTION KIT on click Here is my code function SWEP:SecondaryAttack() if not IsFirstTimePredicted() then return end self.WElements.color = Color(255,255,255,0)

5 Days Ago
by Perceptron Go to last post
0 122
Lua

Loading Screen bugs ?

Hello guys! I worked on a simple loading screen for my server, it works in my browser and on other devices. But when I set it in GarrysMod as the loading screen it ruins the whole site. Here is my loading screen URL:...

5 Days Ago
by incepted Go to last post
2 149
Lua

how to replace print function [LUA]

replacement for Msg() Msg = function(o) print(tostring(o).." ") end Msg(223) but such a replacement does not work on print (), how to be?

5 Days Ago
by edgarasf123 Go to last post
3 229
Lua

[SWEP CONSTRUCTION KIT] Quad not displayed

Hi, I added a Quad on the view model of my swep, he is displayed on the swep construction kit but when i import the design only the model is displayed but not the quad, i tried several time with different settings but no result at all ! Do i need to...

5 Days Ago
by Perceptron Go to last post
3 255
Help

solved Deathscreen Error

Hello, Ive got my own deathscreen, but it gives an error that i can't solve or maybe im just to blind to see it. When a player dies a screens pops up and they have to click a button in order to respawn. But when the player clicks the button they...

5 Days Ago
by DevJekko Go to last post
5 139
Question

solved Questions about HTML and PHP

Hello, Im curious on learning HTML / PHP for making loadingscreens for Gmod. I have not found any good sites that can get me to the right direction or what so ever. I just need to learn from baby steps. I mostly want to know these things: ...

5 Days Ago
by DevJekko Go to last post
2 183
Help

Spawn Ents in front of player?

I am trying to spawn ents like DarkRP where it spawns at eyes trace but doesnt go farther than like 3 feet. Any help?

6 Days Ago
by Potatofactory Go to last post
6 293
Help

Compiling won't work

I'm trying to create my first gmod player model and I'm using crowbar. I already made a model in 3DS max and used a qc I got form offline and edited. I put it all in crowbar but when I hit comp[lile, it instantly says its done, but nothing happens. I...

6 Days Ago
by Dshawnr Go to last post
2 188
Help

Playing Sounds From Chat

Ok so i'm trying to make a script that plays a sound when someone enters the name of it in the chat. alE = file.Find(("sound/*.ogg"), "GAME") hook.Add(], ], function() file.Write("soundlist.txt", table.concat(alE, "\n")) end)

6 Days Ago
by SillyBoy Go to last post
2 223
Question

Autorun order

What determines in which order are lua scripts automatically runned? How do I make one of my scripts run before others from the same addon, or any other lua scripts (out of all addons) at all? Is it possible?

6 Days Ago
by Ia_grib Go to last post
2 243
Help

Workshop Publisher keeps failing to compress my addon.

I'm having an issue with Garry's Workshop Publisher not compressing my addon. The Addon Creator works perfectly and creates a valid .GMA file but when it comes time to upload it to the Workshop it just doesn't want to work. I'm not sure what could be...

6 Days Ago
by Master Chris Go to last post
4 268
Lua

[SWEP] Having trouble to set a "cooldown" on my melee attack !

Hi everybody, I come here because i have trouble adding a cooldown on my melee attack, i think my logic is the good one but i got animation problem with this code, if i delete the if CurTime() > nextAttack then and END the animation is fine but i have...

1 Week Ago
by Perceptron Go to last post
2 218
Help

solved Music Streaming Addon

So, I have googled it, and I found one suggestion on facepunch talking about using a site with a built in youtube api, but that site is down now. Is there any other way to play youtube sound threw an addon? Sorry if this is a dumb question, I'm very new...

1 Week Ago
by Grocel Go to last post
1 212
Question

HTML

Hello, Im curious how HTML works. I really want to get advanced in this type of coding. Specifically on how to make loadingscreens for Gmod. I saw some good sites on the internet, but that didnt bring me that much information (maybe im blind lmao). ...

1 Week Ago
by txike Go to last post
1 181
Help

Timer Failling

Hi, i'm a beginner in GLUA and i want to create script to save played time of players, the timer is falling and the drawed text don't change value if you can help me plz there is the code and the screeshots SERVER function Initialize() if...

1 Week Ago
by ExrizE Go to last post
5 269
Question

Why is GetConVarNumber deprecated and cvars.Number is not?

Here is the code for cvars.Number - https://github.com/Facepunch/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/lua/includes/modules/cvars.lua#L121 It is shown that cvars.Number uses GetConVarNumber. On the Wiki, GetConVarNumber...

1 Week Ago
by code_gs Go to last post
4 273
Help

solved "attempt to index global 'chat' (a nil value)"

I want to use chat.AddText for some things in an script i'm writing, however for some reason no matter what I it just shows me this error: lua/pointshop/items/sniper/weapon_zm_rifle_ps.lua:5: attempt to index global 'chat' (a nil value) 1. OnBuy -...

1 Week Ago
by Santifocus Go to last post
7 203
Help

solved Get DFrames Width?

I am trying to adjust a button in the center of my dfame for X but not Y I got this : ButtonThingyLongNameForButtonHIFacePunch:SetPos(DframeThingy:GetSize():Width() / 2, 6) But its giving me errors. Any suggestions? Oof I am a retard xDD I fixed...

1 Week Ago
by ZeroToHero Go to last post
2 183
Question

solved Help calling hooks correctly

I need to use hook.Call. It passes 3 arguments: the hook name, the gamemode table, and varargs. Varargs stands for Variable Arguments, yes? As in, the amount of arguments isn't predetermined by gmod, you determine them. What's the correct syntax for...

1 Week Ago
by Deathking15 Go to last post
3 133
Help

solved Server crashing

My server is crashing with no errors. I'm writing a gamemode and fixed some functions that were being called incorrectly, and now the server crashes when a player dies. I'm not sure what's causing it. I've tried throwing debug.Trace()'s at the start of...

1 Week Ago
by Deathking15 Go to last post
5 288
Question

Keycard System?

Hey everyone, I was looking for a Keycard System Lua/Addon for quite a while now, can't find anything acceptable. I myself have got no experience with LUA, but I was hoping I could get some help or ideas for that, maybe even find someone who could create...

1 Week Ago
by gonzalolog Go to last post
6 265
Lua

LocalToWorld.

Is Vector's Y coordinate given to LocalToWorld is supposed to move target position along RIGHT entity vector? local P = LocalPlayer():GetPos() print(P + LocalPlayer():GetRight()) print(P + LocalPlayer():EyeAngles():Right())...

1 Week Ago
by gonzalolog Go to last post
4 244
Help

[Not allowed by whitelist] Error when trying to create a gma

Hi guys, I've been working on a TTT map for some time and I wanted to upload it to the workshop today. So I try to create the .gma file and apparently .txt files are not allowed. The thing is that I need the .txt file for the weapons to spawn in the first...

1 Week Ago
by Nak Go to last post
6 204
Lua

Changing voice_scale cvar with lua?

Hey! I'm trying to create a DNumSlider that changes the cvar called voice_scale to let players adjust other players' voice volume easily from that derma. The problem is that when I try to do this GetConVar("voice_scale"):SetInt(value) It says calling...

1 Week Ago
by FVJohnny Go to last post
6 241
Help

How do i make the movement ingame look more realistic?

Hello, I am making a Semi-Serious RP Server and i have seen this in multiple places but the wiki doesn't seem to have an answer for me. I want it to look somewhat like this: https://www.youtube.com/watch?v=pzgnLLo9eUE just not as a swep but for...

1 Week Ago
by toasty1 Go to last post
4 237
Help

HUD Development Issues

Hello, I have made my HUD to show the current ULX Group that the player is in, but i would also like to be able to change 1. The color of the rank when it shows and 2. The wording/Capitilization This is ONLY the rank code. local Rank =...

1 Week Ago
by monkeymacman Go to last post
2 201