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,839
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,687
Help

Spawning weapons, picking up cars

Hi, Some ulx groups can not spawn weapons via Q Menu and others (like admin) can not pic up cars however operators can. Where do I set who can spawn and pick up? Yours truly, Cheese No problem for the best english.

9 Minutes Ago
by Cheesecake! Go to last post
2 58
Help

Outline dframe

I want to create a derma panel that is invisible on the inside but has an inward-outline with a specific colour , not a material kinda looks like this but invisible inside the panel: how do I go on about this? (not trying to create a hud)

MGFear Thread has images 4 people are reading this thread x 4
36 Minutes Ago
by MGFear Go to last post
6 109
Tutorial

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

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

2 Hours Ago
by Thiefdroid Go to last post
210 15,803
Help

Models wont load in fixed swep version

Hello again. So I wrote some fixed some sweps yesterday, because those have thrown a bunch of errors. I had to disable one fixed addon, not only because it wasnt needed anymore, but also because the weapons models were missing. My problem is not...

3 Hours Ago
by Cyrol Go to last post
0 25
Help

Source engine map sizes

Hi, I am looking at trying to create my own maps using Hammer, what is the maximum map size for a source engine map? How would I make different areas link together without a physical connection much like in rp_evocity_v5p? Thanks guys.

4 Hours Ago
by B.J. Go to last post
4 160
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

7 Hours Ago
by Quozul Go to last post
2 180
Help

Creating a Innocent-Shop (TTT)

Hey everyone, as the title suggests I'm working on creating a Shop for Innocents in the Garry's Mod Game-mode TTT. However I'm really mediocre when it comes to scripting so I'm now stuck and don't know what to do with the code: function innoshop()...

7 Hours Ago
by Santifocus Go to last post
0 55
Post Your

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

12 Hours Ago
by NeatNit Go to last post
2,699 91,510
Help

DarkRP Combine Doors team restricting.

Okay,I have a script for opening a combine doors on maps like City17 and others. Classic sliding combine doors. So, I need to make a whitelist for this doors, so only combines can open that doors using USE function(standing as E, as default). I have a...

14 Hours Ago
by HikkaSurito Go to last post
9 359
Help

SWEP:Reload singleplayer equivalent

I have code under the SWEP:Reload() hook that gets called only in multiplayer, and I want it to be called in singleplayer too. Is there a workaround for getting SWEP:Reload() code to get called in singleplayer?

Gooball60 2 people are reading this thread x 2
17 Hours Ago
by Gooball60 Go to last post
6 117
Lua

solved Help with a Toggle-able Panel!

I was wondering how I would go about making a panel on a Dframe be toggled by a separate button on the same Dframe. Ex, Pressing a button once and it brings up a panel on the Dframe, then pressing it again to make it dissapear. Here is my code for the...

18 Hours Ago
by Lizord Go to last post
4 90
Question

Server freezes / "Changing collision rules within a callback is likely to cause crashes!"

Hi, I'm hosting a TTT server and sometimes it just stops working with no errors being printed into console/console.log file whatsoever. It freezes and I have to manually restart it. I can see the Changing collision rules within a callback is likely to...

18 Hours Ago
by darkjacky Go to last post
3 177
Lua

solved Problems with net.SendToServer()

Hey FacePunch community ! I get a problem with my net.SendToServer... I'm testing a swep, so here the code : cl_init.lua if not LocalPlayer():canAfford(amount_floor) then net.Start("fwlt")

21 Hours Ago
by EpicGaby Go to last post
3 79
Lua

solved Make a UI appear on initial spawn ONLY until the player clicks the "submit" button

Title explains it all. I am working on a script, all is going well, except I need a way for the UI to open on InitialSpawn, however after they press a "submit" button, it will no longer ever appear.

21 Hours Ago
by Ia_grib Go to last post
9 152
Help

solved My map is acting weird

Made a simple map, gm_sand. When I went into GMod to test it, it was an old version from a few hours ago! I've tried everything but nothing has worked :( Log: ** Executing... ** Command: "C:\Program Files...

23 Hours Ago
by igdegoo Go to last post
2 42
Help

Eyeposing problem

So I'm pretty new to eyeposing, and the eyes are doing this: In it's default state it looks fine, but when I start moving them they get all messed up, I used Male_02's eyes for it Everything else is working perfectly as expected, but I just can't...

23 Hours Ago
by spike10164 Go to last post
2 71
Lua

solved "The Floor is Lava" Gamemode as an Event in TTT

I want to script the Gamemode "The Floor is Lava" as an Event in my TTT Script. It shall work like the Gamemode: When the Event starts, all over the map shall spawn Lava and with every second the lava shall rise up to the sky. If a player touches the...

1 Day Ago
by G4MB!T Go to last post
1 115
Lua

solved Need Help creating a name script ( 2 Last )

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...

1 Day Ago
by jonnyetiz Go to last post
42 754
Help

solved I have a problem with compiling using gmad.exe

I have a bit of a problem here. So my friends and me decided that I should change most of the weapons names and change their damage/recoil/precision/ammo. I did that, and it all worked properly on the basic weapons. There we're some LUA-errors as well,...

1 Day Ago
by Cyrol Go to last post
2 66
Help

solved table question

I have a 3d2d button and I'm wondering if its possible to make that button remove the content from a table but when you press it again, the content from that table re appears? Tried with table.empty but of course that only removes the table. Im...

1 Day Ago
by Zer0nix Go to last post
5 102
Help

Desynchronization of client side models

So, about my problem. I use client side models for rendering weapons holstered weapons and WM models. On my local server or in SP everything works fine. But on the dedicated server there starts desynchronization or whatever it is, causing some king of...

1 Day Ago
by Mr Mactavish Go to last post
0 94
Question

solved DButton, do a rounded button

Hey Facepunch community ! I'm trying to do some test for my own but I really get no ideas for how I can create a round DButton... I've try to put Borders with https://wiki.garrysmod.com/page/DButton/SetDrawBorder but it's decrapeted... IDK if i'm...

1 Day Ago
by EpicGaby Go to last post
2 54
Question

local draw = draw - for what?

Sometimes i see code like this local draw = draw local surface = surface local cam = cam local math = math local team = team What's the purpose of it? I've missed something?

1 Day Ago
by KiruKiru Go to last post
2 123
Help

Damage drop off & Kill display

Hello amigos! Im making a PUBG Hud. Im almost finished but i need to do some finishing touches. One thing that i need is whenever the player gets damage it's gets a drop off. Like this: http://www.youtube.com/watch?v=3n_BZK12Vzw&t=1m17s And...

1 Day Ago
by monni Go to last post
3 131
Question

Removing Effects and particles?

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

1 Day Ago
by MelonShooter Go to last post
5 169
Help

End-Round-Music Errors

I would like the players to have the possibility to make the music quietly and completely remove the EndRoundMusic. (F1 Menu) This does not work! cl_end_round_music.lua: net.Receive( "_ttt_end_round_music", function( byte, Player ) local _sound =...

1 Day Ago
by Piece Go to last post
1 200
Help

Increase melee range of melee weapon?

Hi. I have a problem. There is a weapon for the gamemode TTT called Genji Katana. I've edited the code quite a bit improving it in a few ways, but it remains un-usable. Why? The hit box for it is literally a quarter of a pixel. You CANNOT hit someone...

1 Day Ago
by MelonShooter Go to last post
2 91
Help

Ragdoll Entity Physics

When setting the model of an entity to a ragdoll the physics mesh appears to be rotated +90 degrees, is there any way to correct this?

1 Day Ago
by kpjVideo Go to last post
7 153
Help

PhysObj not refresh properly until taking the entity with Gravity Gun?

Hi everyone. Basically I never go there and I never post something - with time I find how to solve the problems I encounter. But currently it's not the case: I found nothing for solving it. It's easy-to-understand and I don't think it's complicated to...

1 Day Ago
by DiablosGMOD Go to last post
2 68
Help

Missing texture server error issue

Hey there, Having this error when the server is starting - it doesn't stop the server working properly but I would rather find out what the issue is to keep everything in tip top shape. https://pastebin.com/cqcMFb2T Thanks for any help you can...

1 Day Ago
by code_gs Go to last post
1 52
Help

Hud not appearing

Dear readers, I got this problem were my custom hud appears in Singleplay but not appearing in multiplayer? I searched on Google and there are people with the same problem, but not a fix. Anyone? Thankssss

1 Day Ago
by James xX Go to last post
11 117
Help

how to create a hud agenda ?

Hello, I wanted to know how to create a agenda hud, in short display the text of the agenda, if a person could give me the code, thanks in advance.

1 Day Ago
by MelonShooter Go to last post
23 244
Help

Cleaning up code?

So I have a lot of repeat type of code, example below, and I'm just wondering if there is any way to simplify it This for some reason really bothers me, and if there is anyway to make it into one function please let me know Code: if plyHealth !=...

2 Days Ago
by Thiefdroid Go to last post
7 245
Question

Lua Question

Curious on how to make two things. A simple timer that shows up in the middle of your screen when dead that states something around the lines of: "You will respawn in (#) seconds", and also wondering how to make your screen have a certain effect for a...

2 Days Ago
by MeepDarknessM Go to last post
11 272
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
2 Days Ago
by Loadingue Go to last post
635 56,424
Help

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.

2 Days Ago
by code_gs Go to last post
18 445
Question

Item pickup

I have some questions about the item pickup. How would i disable so whenever a player walks over a item it will not automaticly pick up, but they have to press E to pick it up. And whenever a player looks at the item a text or whatever can pop up. Would...

2 Days Ago
by DevJekko Go to last post
1 97
Help
2 Days Ago
by NikkuMiru Go to last post
0 83
Help

Issues with Entity Physics Being Synced

Hi all, In a custom SWEP primary fire function I create an entity, set its angle to match the owner's aim vector, and adjust it's position to be outside of the player model. Once I Spawn the entity, I set it's velocity to shoot out from the player's...

2 Days Ago
by Cruben Go to last post
8 199
Help

Stunstick DarkRP

So, I'm trying to basically have the same exact animations/sounds from the stun-stick from HL2 by editing this script, but to arrest (LMB) and unarrest (RMB). The animation doesn't work and the swing speed is nowhere near the actual stun-stick. I'm...

2 Days Ago
by MelonShooter Go to last post
1 84
Question

Minimap Rendering?

I got on a server that had a picture of the map as a minimap and just a blue marker pointing out where you are on the map. How did they do this? Did they just get a picture from the map or did they render it?

2 Days Ago
by DevJekko Go to last post
18 301
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,...

3 Days Ago
by Jompe Go to last post
9 250
Question

solved Detect if a player is in their escape screen/menu

Heyoo Was wondering if anyone knows how to detect if a player is in their escape menu.

3 Days Ago
by StrandedHeart Go to last post
2 89
Help

Can't seem to find the problem with my bones in Blender

I can't get Automatic Weights to work for my model. Can anyone help me? This is a really huge pain in the ass. Here's the BLEND file: https://mega.nz/#!kccRxYCb

3 Days Ago
by LifeSick Go to last post
9 170
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.

3 Days Ago
by DevJekko Go to last post
4 147
Help

solved Help with halo drawing swep

Hey everyone, ive been working on a weapon that shows entities starting with k_ through walls for 10 seconds in a range of x units. I have a few things already, any help would be greatly appreciated! hook.Add( "PreDrawHalos", "AddHalos", function()...

3 Days Ago
by evilseabass Go to last post
29 399
Help

DTextEntry Prompt Element - can't find?

Hello Facepunch I've been looking around on the vgui Element list and I'm unable to find the element in mwhich when it's called it prompts the user to input some text, it's like a DTextEntry but on a fixed window of a kind... Your help it greatly...

3 Days Ago
by MelonShooter Go to last post
6 93
Question

solved Droppable DModelPanel

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

3 Days Ago
by Unknown Gamer Go to last post
7 150
Help

solved F4 Menu help - Icons!

Hello Facepunch I've recently decided to remake the old f4 menu into darkrp, while doing so i'm coming through a little trubble myself as I'm a little rusty to gLua. You'll be able to see in the picture below as to how the icons are suppose to be...

3 Days Ago
by Chickengbs Go to last post
6 89
Help

solved Traitoritem in the Shop doesn´t appear

My Script does not appear in the Traitor´s Shop. The Console does not print any Errors. Here is the Code: if SERVER then AddCSLuaFile("shared.lua") resource.AddFile("materials/VGUI/ttt/icon_the_assassin.vmt") end EQUIP_THE_ASSASSIN =...

3 Days Ago
by OwnedbyCube Go to last post
3 68
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...

4 Days Ago
by MelonShooter Go to last post
9 263
Help

How to pass a life bar over a material?

Hello, I am annoyed because I work on a HUD, I created a background for my hud except that I can not manage to pass the bar of life, the text above this material each time my bar of life is found below the material. Thank you in advance for your reply,...

4 Days Ago
by clumiso Go to last post
3 73
Help

ents.Create() Spawn Limit

They will spawn infinitely!!! How to make limited spawn NPC?! local NPC = {} NPC.Conf = { npc_mutant_dog = { pos = { -- NPC positions = {

4 Days Ago
by FireWolf2525 Go to last post
8 188
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...

4 Days Ago
by code_gs Go to last post
32 738
Help

solved chatcommand with networking

I've been sitting on this mess for up to 2 hours, I cant find a solution for this: the addon should send a net whenever a certain command was written but I can type either of which (2 commands) and it opens the same one: sv_: local ChatCString =...

4 Days Ago
by txike Go to last post
7 98
Help

solved 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

4 Days Ago
by James xX Go to last post
8 203
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...

4 Days Ago
by MelonShooter Go to last post
4 186
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...

4 Days Ago
by MelonShooter Go to last post
2 137
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))

4 Days Ago
by Tupac Go to last post
1 124
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...

4 Days Ago
by code_gs Go to last post
11 304
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...

4 Days Ago
by txike Go to last post
3 107
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...

5 Days Ago
by Invule Go to last post
15 485
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

5 Days Ago
by txike Go to last post
1 78
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")...

5 Days Ago
by escept Go to last post
7 186
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,...

5 Days Ago
by DevJekko Go to last post
7 222
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? ...

5 Days Ago
by KaChing Go to last post
4 154
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 ...

5 Days Ago
by Cryen Go to last post
2 99
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...

5 Days Ago
by txike Go to last post
5 167
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...

5 Days Ago
by Zer0nix Go to last post
2 141
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...

5 Days Ago
by lemonhead Go to last post
9 198
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...

5 Days Ago
by Lavacoal123 Go to last post
1 68
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...

5 Days Ago
by Lavacoal123 Go to last post
10 230
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

5 Days Ago
by MGFear Go to last post
2 74
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...

6 Days Ago
by Geniush Go to last post
55 7,983
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,...

6 Days Ago
by TomatoSoup Go to last post
5 96
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?

6 Days Ago
by Ia_grib Go to last post
4 190
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 ?

6 Days Ago
by OwnedbyCube Go to last post
8 185
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 =...

6 Days Ago
by TomatoSoup Go to last post
6 180
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...

6 Days Ago
by Thiefdroid Go to last post
5 137
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...

6 Days Ago
by TomatoSoup Go to last post
8 160