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 5,781
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,639
Help

EndRoundMusic

I installed this on my server. If I press F1 then I can go to EOR music and I can disable the end round music. My question is I wanna change the code if I go to menu on F1 "Eor Music" I want to change the volume of the endroundmusic. But I don't know how...

13 Minutes Ago
by MelonShooter Go to last post
3 56
Question

Droppable DModelPanel

Been wondering how I can go about doing this with the "droppable" and "receiver" functions.

1 Hour Ago
by MelonShooter Go to last post
1 31
Help

Play sound as looping music & obey music volume ?

How would I play a sound file in Garrys Mod as music, on a loop, and obey the user's music volume setting? I think that I can use the below to play a sound at the players music volume, but it doesn't get louder / quieter when the user changes their...

2 Hours Ago
by MelonShooter Go to last post
2 85
Question

Removing Effects and particles?

Is there a way using lua to remove effects and particles from clients' screens?

2 Hours Ago
by MelonShooter Go to last post
2 26
Help

Icon looks chunky?

I took an icon from a freepic site and tried to use it on a panel but the rounded parts look chunky and lowpixelish How can I solve this? I am using DImage

5 Hours Ago
by kpjVideo Go to last post
6 111
Question

Personal Questions for Gamemode Creation

I tried being as descriptive as possible with my title but there was only so many ways that I could describe this thread. What I need is answers to several questions that I have on gamemode creation while I create the gamemode that I want. I am going to...

6 Hours Ago
by code_gs Go to last post
29 648
Post Your

Problems That Don't Need Their Own Thread v5 ( 2 3 4 5 .. 64 65 66 67 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...

7 Hours Ago
by Banana Lord. Go to last post
2,662 90,135
Question

how rotate draw.wordbox

how i can rotate draw.wordbox https://pp.userapi.com/c639917/v639917298/467a8/5VgXgxQbeHc.jpg draw.WordBox(50, 22.88, 145, "$"..Printed, "Trebuchet24", Color(0, 0, 0, 0), Color(255,255,255,255))

8 Hours Ago
by Tupac Go to last post
1 68
Question

Why does Entity's SetNWVector skips networking values in some cases ?

I was coding the new TA snap implementation and noticed a strange behavior of ENT:(Set/Get)NWVector. I am setting the spawn position here and reading it here. Obviously it is SERVER --> CLIENT with the same key "ray_intersect_pos". 1. When I reload the...

11 Hours Ago
by code_gs Go to last post
11 265
Help

TTT Scoreboard isn't showing confirmed dead

Hello, I set up a new TTT-Server just as I did about 10x before. But for some reason there is no confirmed-dead in the scoreboard. I identified the body and it's displayed in the top-right corner but it doesn't show up in the scoreboard. I reinstalled...

11 Hours Ago
by txike Go to last post
3 61
Help

Roundedbox around anotherone

Hello, I have a question. I want a roundedbox around this (oultine), but not that so you can see it underneath the layer, because im using transparency. I already tryed a few things but not worked. draw.RoundedBox(height * 1.1, 750, 975, 410, 65,...

11 Hours Ago
by Koolaidmini Go to last post
9 173
Help

solved Player.GetAll

I want the player.GetAll in a draw.SimpleText. This will count all the players that are online. But i can't get it to working.

11 Hours Ago
by DevJekko Go to last post
5 98
Tutorial

GMod - What are you working on? September 2017 (#73) ( 2 3 4 5 Last )

Highlights from the previous thread I'll put this at the top; Kiwi is after feedback for the GMod section!

12 Hours Ago
by CapsAdmin Go to last post
178 13,078
Help

Hide function

Hello, Ive got some problems. What do i need to do for these problems: I want so my health bar only appears when a player is under 100 health. (it will slide down when the player is back up to 100 health) I want so my armor bar only appears when...

13 Hours Ago
by Invule Go to last post
15 449
Help

TTT Deadly Speed-Limit

Whatīs the deadly Speed Limit in TTT ? I need it for that: if speed > ??? then Which number do I have to put in there ? The Playerīs Fall must definitely end deadly. Thanks in advance

13 Hours Ago
by txike Go to last post
1 40
Lua

Problems with FastDL

On my server, FastDL materials, models are not working. Only maps. resource file: resource.AddFile("models/exor/skybox/forest_small.dx80.vtx.bz2") resource.AddFile("models/exor/skybox/forest_patch.sw.vtx.bz2")...

13 Hours Ago
by escept Go to last post
7 145
Question

Blur

I got some questions about layering blur under a roundedbox. This is actually the first time im using blur so yeah. For example i want a layer behind this roundedbox. How would i do this? draw.RoundedBox( 1500, 1500, 1500, 1500, 1500, Color(255,...

15 Hours Ago
by DevJekko Go to last post
7 178
Help

GM:CalcView

So im having trouble in running this function ( im really new to coding in lua, ive read and finished Java only) Where do i put this? In gamemode? An Addon? or run it straight in console? is there and addon i can use run this type of code in? ...

16 Hours Ago
by KaChing Go to last post
4 119
Help

solved GetrRoleString (a nil value)

addons/killerinfo/lua/autorun/server/sv_killmsg.lua:14: attempt to call method 'GetRoleString' (a nil value) 1. fn - addons/killerinfo/lua/autorun/server/sv_killmsg.lua:14 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109 ...

18 Hours Ago
by Cryen Go to last post
2 72
Help

Force SWEP

Im making a force swep but only missing a few things. I need a good hand position for this. I saw one that had his hand on his head and his hand was forward. Second i need a function were the player can pick up things. Like a physgun effect.

18 Hours Ago
by DevJekko Go to last post
0 39
Help

solved text rows with tables?

so I tried making a table to be able to change text on a dframe paint with draw.simpletext my table looks like this: inforegistertext = {} inforegistertext = "placeholder3", "placeholder2", "placeholder1" the place I use this in looks like this...

22 Hours Ago
by txike Go to last post
5 138
Help

solved Addon config

Made an addon everything is good. Only thing is the config which I've set up horribly. Is there any way I could make it better? zvendor.weapon1name = "M4A1" -- Name of the weapon zvendor.weapon1desc = "Fast shooting assault rifle" -- Description of...

1 Day Ago
by Zer0nix Go to last post
2 114
Lua

net.Send/net.Read

Hi! (I'm betting code_gs will respond to this one too :P) I'm fresh into learning net.Send/net.Read. My goal is to send a number from server to client. I tried using net.WriteInt(), but the number I'm sending over is a variable. When declaring the...

1 Day Ago
by lemonhead Go to last post
9 145
Help

solved Give a player custom SWEP with player:Give()?

Simple and straight questions here. I want to give my player a custom SWEP with traditional GLUA (one that would go in the content folder of a gamemode). I tried putting the classname argument as the name of the folder the "shared.lua" is in, but I'm...

1 Day Ago
by Lavacoal123 Go to last post
1 46
Help

solved Refusing to send user message TextMsg of 256 bytes to client

I have been getting this error (no I'm not using the usermsg library, unless PrintMessage does) every tick when running this test gamemode I've been brewing up. I'm fairly new to making gamemodes so please be open minded when viewing. (Note: The...

1 Day Ago
by Lavacoal123 Go to last post
10 196
Garry

Next Update v7 - July 2017 Update is Out ( 2 3 4 5 .. 13 14 15 16 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 dezamb Go to last post
631 55,752
Help

solved scale surface font?

Is it possible to scale the surface font? my UI text looks normal on 4k and 2k resolution but not on 720 for example. looks quite acceptable on 1080 but below that everything gets way to tight

1 Day Ago
by MGFear Go to last post
2 50
C++

gm_concmdhook - An omnipotent console command hook ( 2 Last )

Description: A simple module which allows a coder to see all console commands being run and choose to disable them from running. Example Code: require( "concmdhook" ) local function PlayerFromAddress(address) for k, v in...

Gbps Thread has images 1 people are reading this thread x 1
1 Day Ago
by Geniush Go to last post
55 7,866
Lua

solved Is there a way to create multiple safe zones on gmod maps?

I know there is a way to create one safe zone, and I used this LUA code: local function PlayerSpawnProtection(victim, attacker) local BoxCorner = Vector(-166.657898, -8377.381836, 10790.562500) local OppositeCorner = Vector(400.776825,...

1 Day Ago
by TomatoSoup Go to last post
5 67
Lua

solved DComboBox options icons

DComboBox options have empty space on the left, they're perfect for icons, however I found no method to add an icon to an option on the wiki. Is there a way to do so or do I have to modify functions myself?

1 Day Ago
by Ia_grib Go to last post
4 164
Help

solved Choosing random player with player.GetAll() except for Traitors

If I want to choose a random player like this: local randomply = player.GetAll() How can I prevent that the chosen player is a traitor or dead ?

1 Day Ago
by OwnedbyCube Go to last post
8 157
Help

solved Layers

I got a problem. I want to put this code over some other layers. But it keeps underneath it so nobody can see it. Any tips? hook.Add("HUDPaint", "HUDHealth", function() local maxHealth = LocalPlayer():GetMaxHealth() local health =...

1 Day Ago
by TomatoSoup Go to last post
6 157
Lua

Need Help creating a name script

Hello. I am working on an SWRP server, and I need help with making a name creation system. In a nutshell, what I am aiming for, is when a player first joins, he/she will be prompted with a UI to enter a name, and then after that a string of 5 randomly...

2 Days Ago
by jonnyetiz Go to last post
21 424
Question

How to create cars on simfphys base ?

Hello, I want to create my own simfphys cars (using models from TDM or LW) and I want to know how to do it because I can't find any good cars on the simfphys base that includes lights and signals. Thanks

2 Days Ago
by Thiefdroid Go to last post
1 107
Help

SWEP attack delay

Hi. I'm trying to find out what is causing a HUGE delay in attacking with the SWEP. The SWEP is not mine, I am using a modified version of the one created by CmndrFello, Modified by RisingDarkness. Is is a addon for TTT that adds a T weapon that is...

2 Days Ago
by Thiefdroid Go to last post
5 99
Stupid

Changing the behavior of a player's armor

The default HL2 implementation of armor has it where a little armor protects your health a little, a lot of armor protects your health a lot. (ie: having just 10 armor and taking a bullet will leave you with some armor left but also remove health). For...

2 Days Ago
by TomatoSoup Go to last post
8 125
Help

Evocity retexture addon doesn't work right

Hello. Im working on a Evocity retexture addon for Gmod. I need to know, how to get custom textures working. I tryed to make the same paths like the original texture files have and just replaced the textures. It worked, but only one time. After i close...

2 Days Ago
by Csyon Go to last post
12 184
Help

Small question regarding "func_breakable"

For my gamemode I really need to some how make func_breakable to have specific increased amount of health sort of, so only players with specific weapons could break them, since I have way too many sweps, its not an option to make thouse weapons dont break...

2 Days Ago
by Creepy-Tan Go to last post
2 123
Lua

Swep problems

So.... my swep wont spawn and i have no idea why here's the code: AddCSLuaFile() SWEP.Author = "AverageDrink" SWEP.Instructions = "LMB to bite, RMB to go into rage mode." SWEP.PrintName = "SCP-625 Swep" SWEP.Purpose = "Bite your enemies to deal low...

2 Days Ago
by AverageDrink. Go to last post
10 121
Help

solved Lua hook for prop limit with in the server

Hey, i wanted to know how i would be able to get a servers prop limit and print it to a HUD. I know how to print it i just don't know how to get the limit. sorry if it is simple I'm new to lua.

2 Days Ago
by TheBritishLad Go to last post
7 125
Help

damage drop off

trying to make damage drop off but i get the error: AddMultiDamage: g_MultiDamage.GetDamageForce() == vec3_origin i used this for the damage drop off inside the swep local function BulletCallback(att, tr, dmg) if ValidEntity(att) then local...

2 Days Ago
by code_gs Go to last post
16 345
Question

solved Check if server has TTT Damagelog Installed

how would i check if the server that runs my addon has TTT Damagelog installed? im not finding anything useful to start with

2 Days Ago
by tommy228 Go to last post
2 69
Help

solved Physgun effect

Hey, I want to make a swep that has the same effects as the physgun where it can pick up stuff, but it will not show the physgun it self but something else. Any tips for doing this?

2 Days Ago
by DevJekko Go to last post
1 121
Help

solved (TTT) Defining Player that bought an Item

How can I define the Traitor who bought the Item so that I can script functions especially for him ? Thanks.

2 Days Ago
by OwnedbyCube Go to last post
2 58
Help

solved I need help with tags in darkrp.

So, i'm making a server of darkrp and i tried 2 addons of tags, and both gave errors with the following things: 1)the first one is atags, the problem is that it just overide the name, and the ooc and the advert don't show up any of the tags, 2)The...

2 Days Ago
by FireWolf2525 Go to last post
5 109
Help

solved checking if player joined first time

I only have one idea in mind how to check if a player has joined the server or spawned in it for the first time, but its complicated. I imagined creating a file for each player and check when a file is created, if the player had a file made for him he...

2 Days Ago
by MGFear Go to last post
17 223
Humor

drm for gmod

anticheat discussion was so 2014 today we will discuss and share the best ways to ensure the most revenue for our garrys mod scripts post your uncrackable drm methods and services here as well as your favorite methods of taking revenge on these...

3 Days Ago
by GalaxyBeatzz Go to last post
20 1,331
Help

How to properly add items to the spawnmenu when right clicking

This is quite the incentive to fix this bug. A few months ago, I uploaded an addon called EGS. With EGS, you have the ability to right click an item to load it into the tool- similar to the creator tool. See example: While this works, it causes...

3 Days Ago
by Jaxswat Go to last post
0 50
Help

[SUPPORT] Displaying Location Data in console/chat

Hello! I am trying to find a way to utilise place names to display location information in chat (Not vectors, place names), but I do not know how to do this. There is a server that has achieved this, as displayed here:

3 Days Ago
by Wolfman13 Go to last post
4 124
Help

DrawPartialTexturedRect image stretching

I'm using an image of the map and DrawPartialTexturedRect (Code below) to create a minimap. The problem is when it tries to draw something that is out of the bounds of the image (In this case, outside of the map), it creates this artifacting/stretching ...

3 Days Ago
by Koolaidmini Go to last post
5 169
Help

Player info

Hello readers, I want a player information above someones head for my server. I want a roundedbox that displays the players health and underneath it the playersname. Ive been searching on google but could not find any usefull information.

3 Days Ago
by GalaxyBeatzz Go to last post
2 115
Help

solved Function Arguments expected

Iīve got an Error, I know this Error, but I donīt know how to solve it. Thatīs the Error: addons/tttsuicidecounter/lua/autorun/suicidecount.lua:5: function arguments expected near '...' 1. unknown -...

3 Days Ago
by OwnedbyCube Go to last post
12 127
Help

DarkRP Combine Doors team restricting.

OK, so, I have two codes for this thing, I have a clean code for opening the combine doors on maps like rp_city17 and other HL2RP maps. It's working. But I need to restrict this, so only special teams like TEAM_HELIX(MPF HELIX) can open this doors. Guys...

3 Days Ago
by HikkaSurito Go to last post
4 182
Help

Jailbreak Cell Door

I've been trying to work out how to make a command that allows the user to open cell doors. The problem I am having is that everything I have tried so far, it opens every door in the map! Can anyone help please?

3 Days Ago
by JacobsReturn Go to last post
9 197
Help

When players try and physgun a prop they do not own it no collides it.

Whenever a player attempts to physgun a prop, regardless of if they own it or not, it becomes nocolided. The issue came up after the adding of VCmod, if you need anymore information just ask and I will supply it, thanks for taking the time to read this...

3 Days Ago
by GalaxyBeatzz Go to last post
8 229
Help

Difference between activity, sequence, gesture, scene?

I'm trying to teach myself how to animate entities using LUA and I'm not doing very well. Each of these seem to be tied to animations in some way, but whenever I think I've got it, I end up being wrong. What's the difference between them? *...

4 Days Ago
by Robotboy655 Go to last post
5 194
Lua

SendLua not registering Color() variable

Seems I'm having an issue, but I don't have a tissue :( All jokes aside, I was making a function to change a player's job appearance in darkrp. This is the function that is causing the problem: local function CoverJobInfo(Ply, Col, JobName,...

4 Days Ago
by code_gs Go to last post
7 133
Help

(Nutscript HL2RP) "attempt to call "Register" (a nil value)"

Hello, I'm trying to get plugins to work on my Nutscript HL2RP server. I keep getting these two errors: gamemodes/hl2rp/plugins/hl2_combinelight/sh_plugin.lua:5: attempt to call field 'Register' (a nil value) 1. unknown -...

4 Days Ago
by geferon Go to last post
3 159
Help

DarkRP server help

Alright, so basically I've made a DarkRp server. Problem is, when any player enters the server, it doesn't 'activate'. As in, the bottom left GUI doesn't show up, the F3, F4 and F1 thingos don't work, and you cant use the q menu. Also, the default...

4 Days Ago
by TheVac Go to last post
18 239
Help

solved How to Reverse Lerp?

Now I have tried many things, but I am making a health bar that declines animation towards the center. (The left bar doesnt want to work) HP & HP1 are defined and so are the config vars. if HP == ply:Health() then HP = HP else HP = Lerp( 0.01,...

4 Days Ago
by KingofBeast Go to last post
9 274
Help

[TTT-Server] Players spawn in the air

I am looking for a long time for a solution. How to set this so that all players touch the ground when they are spawn? So you can still move, but you have to jump to touch the ground again. Also, in some rounds, the models are so gray / black .. It all...

4 Days Ago
by code_gs Go to last post
26 443
Lua

NextBot Coding and Discussion Thread ( 2 3 4 5 .. 10 11 12 13 Last )

This thread will be for anything related to the new NextBot system, I'll keep the OP updated with useful information to help anyone who has questions or needs help. Update 160 added bindings to the nextbot system, which is what CSS, TF2 and L4D bots...

5 Days Ago
by towerofpower256 Go to last post
506 70,463
Help

solved Not read files

Hello everyone i have a problem with a custom file with my test. i create a folder called ("testeo") inside ("lua") inside ("autorun") inside ("sh_test.lua") inside of ("testeo") other folder called ("test_addon") inside ("sv_test.lua") and...

5 Days Ago
by davicyyo Go to last post
6 114
Help

Playing youtube through gmod

I can't really figure this out and I have tried ways that just didn't work for me I need some help with this :/

5 Days Ago
by gonzalolog Go to last post
18 366
Help

groundcontrol error message

I am getting this error message and I dont know why/how: gamemodes/groundcontrol/gamemode/sv_player.lua:380: attempt to call method 'isPlayer' (a nil value) 1. unknown - gamemodes/groundcontrol/gamemode/sv_player.lua:380 2. FireBullets - :-1 ...

5 Days Ago
by MGFear Go to last post
8 143
Help

solved Player:HasGodMode() not synced across Client and server?

Setting godmode on the server then asking the client if they have GodMode it returns false on the client. 14th September 2017 FML, had bit of a look that to 2 users on the Garry's Mod Lua Discord. HasGodMode() is false on client always.

5 Days Ago
by MarZ333 Go to last post
1 116
Lua

Converting other games weapons to GMod

I was wondering how someone would go about converting weapons from other games (in my case PUBG) to GMod. I've seen people do this before with BO2 and csgo weapons in the game but do they model the stuff themselves or is there an easier way to do this for...

6 Days Ago
by GalaxyBeatzz Go to last post
2 143
Question

Need help learning entity animation

I'm trying to teach myself how to animate models in game, and it's not going well. I've been fooling around with http://wiki.garrysmod.com/page/NextBot/StartActivity and http://wiki.garrysmod.com/page/Entity/SetSequence, but it doesn't work reliably. ...

6 Days Ago
by code_gs Go to last post
3 140
Question

Adding color to a chat message

I am trying to make an addon so it will send alerts to an admin if they do something but I can't get the color to work in the chat message that would go to them, can someone please explain. I tried looking it up and asking a few friends but I found...

6 Days Ago
by txike Go to last post
3 115
Question

Which compression algorithms are supported for FastDL?

I've been doing some research and it seems that LZMA would be a better method to use over bzip2, due to smaller files and smaller time to decompress. The time to compress does not matter as much in this case, as it only needs to be ran once. So my...

6 Days Ago
by code_gs Go to last post
6 285
Help

Physgun on props not working

So in my server when i try to pick up any prop )as shown in the video) it doens't move.

6 Days Ago
by gmoddertr Go to last post
4 103
Help

Printing :GetDamage() is getting smaller and smaller after damage

here is what I was printing print(dmginfo:GetDamage() * 200) It's getting smaller and smaller... + it doesn't multiply also tried print(dmginfo:GetBaseDamage() * 200)

6 Days Ago
by code_gs Go to last post
11 325
Help

solved Parenting effects to entities and making custom effects?

Currently making some magic staffs for my melee weapon base (how ironic) but for some reason the effect stops following the attack animations after being used for a certain amount of time. Another problem is that the effect tends to fall a bit behind...

6 Days Ago
by Thiefdroid Go to last post
0 77
Help

solved Playermodel in a hud

Hey, how would i go about putting a little box showing a player's playermodel or steam picture. I have tried this a couple of times and i get some script errors and about 12 fps :D

6 Days Ago
by MaverickMeme Go to last post
2 97
Help

solved surface lowering fps / crashing game

Hey, i have started making a hud as a little project of mine. I have encountered an issue where my hud is now lowering my fps from an average of 200 to about 30 - 50. I'm not sure if this is something about surface i've never been told before but here is...

6 Days Ago
by MaverickMeme Go to last post
13 257
Help

DarkRP Help Thread V1 ( 2 3 4 5 .. 41 42 43 44 Last )

Hello Everybody and Welcome to the DarkRP Help thread. This forum covers everything related to DarkRP. This is the list of things that you can help others or get help from. 1. Lua=this includes HUD'S, lua errors, and lua code. 2. Jobs=generally...

1 Week Ago
by FireWolf2525 Go to last post
1,759 102,239
Help

solved VGUI Scaling and Docking

For some reason, I can't get this to work properly for anyone on lower screen resolutions everything else works fine just one part of the hud doesn't. if someone could tell me what im doing wrong it would be a big help. here is the part that is messing up...

1 Week Ago
by Martin132 Go to last post
5 184
Help

Thruster-like effects?

How would I make an effect come out of my entity and be locked to it? I have tried using util.Effect() but it just spawns the effect at its position rather than making it follow like the flames on a thruster does.

1 Week Ago
by MPan1 Go to last post
1 122
Help

solved Restrict USE vgui menu to jobs.

So I'v been really excited that I have a measurable growth in my knowledge of GLua but I am not too go at DarkRP custom functions so Im stuck on this one thing Code: local jsa = TEAM_GUN net.Receive("open_vendingmachine", function( ) local ply =...

1 Week Ago
by Snowa Go to last post
8 229
Help

solved Clueless as to where this code should go.

So I have this bit of code a friend/dev gave me for k, v in pairs( ents.FindByClass( "door" ) ) do v:Fire("unlock") end All it does is take the doors of a map and unlock them. Useful for if you want to unlock doors for another gamemode....

Cub
1 Week Ago
by MPan1 Go to last post
6 149