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,808
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,664
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...

9 Minutes Ago
by DahDestroyer Go to last post
2,690 91,069
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...

Ia_grib 1 people are reading this thread x 1
35 Minutes Ago
by G4MB!T Go to last post
1 53
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 4 people are reading this thread x 4 Winner x 21
1 Hour Ago
by MDave Go to last post
634 56,133
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.

2 Hours Ago
by blackwidowman Go to last post
4 50
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.

4 Hours Ago
by code_gs Go to last post
18 394
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...

6 Hours Ago
by CatsAreAwesom Go to last post
0 33
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...

7 Hours Ago
by DevJekko Go to last post
1 75
Help
7 Hours Ago
by NikkuMiru Go to last post
0 59
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?

9 Hours Ago
by arow1234 Go to last post
6 101
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...

9 Hours Ago
by MPan1 Go to last post
9 182
Question

Removing Effects and particles?

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

9 Hours Ago
by MelonShooter Go to last post
4 118
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...

13 Hours Ago
by Cruben Go to last post
8 180
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...

13 Hours Ago
by Sunbeak Go to last post
0 42
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...

17 Hours Ago
by MelonShooter Go to last post
1 64
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 =...

Piece 1 people are reading this thread x 1
20 Hours Ago
by Piece Go to last post
0 92
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?

21 Hours Ago
by DevJekko Go to last post
18 265
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,...

23 Hours Ago
by Jompe Go to last post
9 236
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...

1 Day Ago
by Invule Go to last post
8 315
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.

1 Day Ago
by StrandedHeart Go to last post
2 74
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

1 Day Ago
by LifeSick Go to last post
9 155
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.

1 Day Ago
by DevJekko Go to last post
4 134
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()...

1 Day Ago
by evilseabass Go to last post
29 348
Lua

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 brianm109 Go to last post
41 693
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!

1 Day Ago
by Murica Go to last post
182 13,835
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...

1 Day Ago
by MelonShooter Go to last post
6 84
Question

solved Droppable DModelPanel

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

1 Day Ago
by Unknown Gamer Go to last post
7 141
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 !=...

1 Day Ago
by code_gs Go to last post
4 136
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...

1 Day Ago
by Chickengbs Go to last post
6 79
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 =...

1 Day Ago
by OwnedbyCube Go to last post
3 59
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...

1 Day Ago
by MelonShooter Go to last post
9 236
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,...

1 Day Ago
by clumiso Go to last post
3 63
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 = {

1 Day Ago
by FireWolf2525 Go to last post
8 172
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...

1 Day Ago
by code_gs Go to last post
32 726
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 =...

2 Days Ago
by txike Go to last post
7 87
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

2 Days Ago
by James xX Go to last post
8 183
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 MelonShooter Go to last post
4 171
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 Days Ago
by MelonShooter Go to last post
2 121
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))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4 Days Ago
by Csyon Go to last post
12 204
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...

4 Days Ago
by AverageDrink. Go to last post
10 135
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.

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

4 Days Ago
by code_gs Go to last post
16 361
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

4 Days Ago
by tommy228 Go to last post
2 85
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?

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

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

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

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

5 Days Ago
by GalaxyBeatzz Go to last post
20 1,364
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...

5 Days Ago
by Jaxswat Go to last post
0 65
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:

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

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

6 Days Ago
by GalaxyBeatzz Go to last post
2 128
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 -...

6 Days Ago
by OwnedbyCube Go to last post
12 141
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?

6 Days Ago
by JacobsReturn Go to last post
9 214
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...

6 Days Ago
by GalaxyBeatzz Go to last post
8 242
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? *...

6 Days Ago
by Robotboy655 Go to last post
5 212
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,...

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

6 Days Ago
by geferon Go to last post
3 181