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 3,476
Link

NEED A CODER? DON'T MAKE A THREAD - LAST UPDATED 25 OCTOBER 2013 - 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://scriptfodder.com/ Want to learn to code? http://facepunch.com/showthread.php?t=1250283

garry Winner x 39
3rd September 2014
by NiandraLades Go to last post
2 22,622
Question

Area around an region?

Is it possible to create a wall or barrier of some sort in a square shape between two different vector points with lua? EDIT - With props or a way to stop players from exiting the area within the box.

iRyno 8 people are reading this thread x 8
35 Minutes Ago
by iRyno Go to last post
0 35
Help

How to make Friendly-Fire for DarkRP

Hello guys, I need some help for a gmod server. I have a militaryRP and i would like to make it where like TEAM_FRIEND1, TEAM_FRIEND2 vs TEAM_ENEMY1, TEAM_ENEMY2. I check the other facepunch threads about this but I just don't know where to put the code...

JcoolJ 1 people are reading this thread x 1
1 Hour Ago
by Invule Go to last post
13 234
Help

Toggle to hide

Hey guys i have a level system but want the bar to disappear when you press F9 so that it is no longer visible i have tried everything but wont work. This is the XP bar in the Client side. hook.Add("HUDPaint", "XP_HUD", function() local pre =...

2 Hours Ago
by breadstick Go to last post
4 139
Post Your

Problems That Don't Need Their Own Thread v5 ( 2 3 4 5 .. 18 19 20 21 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...

2 Hours Ago
by Hobo_Gus Go to last post
833 28,450
Lua

Executing lua files in powershell console

Hey there, I have been trying to figure this out for a little while now. With python it's as simple as adding the python files to the windows environment variables and then typing 'python scriptname.py' and it executes in powershell. I can't even find the...

5 Hours Ago
by Luni Go to last post
8 340
Request

Stencil Tutorials?

So I've looked around for some stencil tutorials, but the only things I've found are posts that are either outdated, or don't go too far in depth. If there really aren't any, someone should really make a nice, in depth tutorial for them, since, for me...

6 Hours Ago
by MaxShadow Go to last post
5 198
Help

util.PrecacheModel() doesnt seem to work on the client

Hey there, I have a Problem with the util.PrecacheModel() function. I am trying to precache all car-models for my cardealer in a InitPostEntity hook, but if I only run it on the client it does not work. If I run it on the server it works fine, but...

8 Hours Ago
by Benn20002 Go to last post
2 85
Help

Extra reserve ammo for guns in TTT?

I was wondering how to get extra reserve ammo for a gun when it is spawned in. I tried using this: if SERVER then function SWEP:Initialize() self.Owner:GiveAmmo( self.Primary.Ammo, 30 ) end end

fruma 3 people are reading this thread x 3
10 Hours Ago
by fruma Go to last post
2 70
Help

resource.AddFile

Hello there, I have used to the directory of "/garrysmod/lua/autorun/server/resources.lua" and it just isnt working. Paste bin of contents inside file: http://pastebin.com/nufv2zeX

Zacy 1 people are reading this thread x 1
11 Hours Ago
by kpjVideo Go to last post
2 72
Repeat

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

Highlights from the previous thread

12 Hours Ago
by Yashirmare Go to last post
165 14,157
Lua

Lua Scripting Challenge *Beginners Only!* ( 2 3 4 5 6 Last )

What's up fellow punchers! For all those newbies out there looking to apply their recently acquired skills (but might find taking on SWEPs and fully fledged game modes a little out of reach), I've decided to start a Lua scripting challenge to provide a...

13 Hours Ago
by MaxShadow Go to last post
202 9,608
Help

solved attempt to perform arithmetic

Hi, I have a big problem, I develop a bank system, so I need a button to transfer money from the inventory to the bank, but I have this error. attempt to perform arithmetic "monaywanttransfered" <a nill value> Client-Side:

14 Hours Ago
by swarshilder Go to last post
18 458
Question

How to put music when a special person joins?

Hello , I would like some information. I am a founder of a server and I would like to put a music and a message when I join. Can you give me the code to put? In addition to the position or I have to put it? Thank you

15 Hours Ago
by iJohnny Go to last post
39 1,136
Question

How to get notified about sequence events?

Hello, I am trying to figure out how to get in lua notified about sequence events: $sequence reload "reload" fps 30 activity ACT_VM_RELOAD 1 node Ready { { event 3005 28 } // Initial placement of the bolt { event 3013 35 } // Start of...

17 Hours Ago
by H3llGhost Go to last post
2 138
Help

menu toggle on keypress

Hey there, I am trying to figure out how to get a menu to toggle on the keydown of something that isn't THESE... I can get it to toggle on just fine with this: laws.open = false local function f1() if (input.IsKeyDown(KEY_F1) and not...

18 Hours Ago
by JasonMan34 Go to last post
3 165
Garry

Next Update v6.0 - October 2016 ( 2 3 4 5 .. 32 33 34 35 Last )

http://cdn.akamai.steamstatic.com/steam/apps/4000/header.jpg?t=1421333577 Changelog Main repository Pull requests Latest update is out: http://www.garrysmod.com/2016/10/10/october-2016-update/

Willox Thread has images 1 people are reading this thread x 1
1 Day Ago
by Swamp Onions Go to last post
1,361 95,615
Lua

solved How to get the RGB value of DColorMixer and use it

So if I were to create a DColorMixer like so local colorpick = vgui.Create("DColorMixer") colorpick:SetPos(10, 100) colorpick:SetPalette(true) colorpick:SetAlphaBar(true) colorpick:SetWangs(true) colorpick:SetColor(Color(200, 0, 0))...

1 Day Ago
by Thane Go to last post
11 254
Lua

solved file reading problems

I am trying to read a file I want to use for an addon I am working on, I am having issues with the file.Read() function... concommand.Add("doesitexist", function() if file.Exists("questions.txt", "DATA") then print("true") else ...

1 Day Ago
by MrRalgoman Go to last post
5 91
Lua

The best way to learn to make particles?

I really want to learn to make particles because I want to improve the quality of my addons. I'm not quite sure how to make them and make them high quality. I decided to come here, so you guys can help me get on the right track. Whether it's Lua based or...

1 Day Ago
by MPan1 Go to last post
1 152
Help

Sending large messages from client > server

So I am working on an in-game staff application system, and I'm in the need to send a large message ( the main part of the application ) via the net library, I just sent a big chunk to imitate an application and then made it print to console, but I...

1 Day Ago
by thegrb93 Go to last post
11 448
Help

Node graphs?

I'm looking to improve the NPCs but I can't find anything updated about how to make nodes. I've tried the node graph editor but it's just not doing anything and I suspect nodegraphs are outdated. Am I wrong on that? 23rd March 2017 Or just any kind...

1 Day Ago
by johnmadden Go to last post
1 124
Help

Force Clients to download a workshop collection

Hey, I added a workshop collection with >100 Items to my Garry's Mod Server and I want to force clients to download all Items if they join the server. I could write a .lua with resource.AddWorkshop("Id") for every item into lua/autorun/server/ but...

1 Day Ago
by zippy36jr Go to last post
6 285
Question

Zombie Survival Weapon Prices?

I have recently gotten my ZS back alive, though, I found out that a large part of my Player base are more likely newbies to Garry's Mod and in general gamemodes. I have decided to make the prices a little "lower", so players stay. I have managed to get...

1 Day Ago
by Toedeli Go to last post
2 189
Garry's Mod

Garry's Mod Wiki Discussion ( 2 3 4 5 .. 10 11 12 13 Last )

We've been talking about the wiki in about 4 different threads. So here's one dedicated to it. http://wiki.garrysmod.com/ I just added a more functional sidebar. Typing in the search box should filter the contents of it. It should also open up...

1 Day Ago
by NeatNit Go to last post
513 24,749
Question

Optimization Tips

Hey guys, I just wanted to ask for some (server) optimization tips. Things like config settings or lua-functions I shouldnt use at all or exchange to others. Just general, basic stuff i should note while making scripts. Thanks. :)

2 Days Ago
by txike Go to last post
9 482
Help

socket

hello guy! i try to learne how use socket in glua. So ive found 2 "modul" gsock2 et bromsock. gsock2 is down ( no link to download) bromsock is a 2008 edition. So witch of then is up to date ? where ca i found them ? I juste wan't to make a...

2 Days Ago
by Mista Tea Go to last post
5 400
Lua

How to code in GLua - What you actually need to know

If you're here, you probably want to code something for Garry's Mod, but have no idea how to. Before you go on, if you have absolutely 0 coding knowledge, please refer to this thread instead The point of this thread is to make a compilation of useful,...

2 Days Ago
by maurits150 Go to last post
11 578
Help

Need help with creating npc's. plz give walkthrough.

Ihav no idea on what to do in order to create a npc. i have looked at the lua files on wiki.gmod.com and dont understand it, plz help.

2 Days Ago
by txike Go to last post
4 626
Help

solved How do I make this toggle-able?

Hello, So, I got a script from Gravious, which basically makes a little box appear to the bottom right side of your screen showing the key(s) pressed and a number of times you've strafed within a certain period. What I would like to do is to toggle it...

2 Days Ago
by ZombiezPvP Go to last post
21 619
Help

solved Issue with writing text in a dark color.

For some reason, when I draw text in a vgui panel, and I make it a dark color, such as black, it does not show up. However, when I put it in white, it shows perfectly fine. I have tried different methods of drawing the text and none of them work. This has...

2 Days Ago
by JaguarHDX Go to last post
2 145
Help

solved Source is nil

What is the problem ? local Audiosource = nil local function TestSound() sound.PlayURL( link, "mono", function(source) if IsValid(source) then if IsValid(Audiosource)then

2 Days Ago
by Gigabait Go to last post
11 273
Help

solved for i1, #tbl do?!

Hello Guys I Use the Script Underdone RPG and the Script Daily Login Reward I have Complete change the Script and i can use on Underdone But now I have a problem for i=1, #tbl do -- das i=1 = du bekommst 1 Item das bedeutet wenn du bei Wood 3 machst...

2 Days Ago
by The Commander Go to last post
12 426
Help

How to edit that hook?

I wanna edit this hook in a plugin. hook.Add("PlayerBindPress", "Clockwork.chatBox:PlayerBindPress", function(player, bind, bPress) if ((string.find(bind, "messagemode") or string.find(bind, "messagemode2")) and bPress) then if...

2 Days Ago
by karl-police Go to last post
9 288
Lua

Can anyone suggest some beginner lua challenges for gmod?

Hi, I am currently learning Lua for Gmod and to further improve on my skills I would like a few beginner scripting challenges. Any challenges will be much appreciated.

3 Days Ago
by JasonMan34 Go to last post
7 298
Help

Clients Constantly Timing out

Hi, on my server users are constantly timing out. This happens to everyone atleast once a day and doesn't usually stop. We receive 20-30 players on a daily basis and I've tried removing tons of addons and using tools like Debugr to see what is throttling...

bg192 1 people are reading this thread x 1
3 Days Ago
by bg192 Go to last post
4 331
Question

solved Table for all playermodels (Including installed workshop models)

Hi, so the chances are 3 replies into this someone will say "Use google and you would have found the answer", then linking me to a thread where this has be solved before. But I have googled and still can't find the answer. In all honesty, I'm probably...

3 Days Ago
by Owjo Go to last post
3 168
Help

Making scripthook not work on your server

Hello, so there is a script been going around for a while now called Scripthook which pretty much when injected into your game will download all of a servers clientside files upon joining. This is annoying since most of my custom VGUI panels have to be...

3 Days Ago
by Promptitude Go to last post
21 689
Help

realtime changes DListView

Hey, i made a http://wiki.garrysmod.com/page/Category:DListView + http://wiki.garrysmod.com/page/Category:DNumSlider when i move the slider the dlistview has the old number (10) is it possible to show the right value in the dlistview without delete...

4 Days Ago
by Shenesis Go to last post
1 174
Question

Crouching delay between player view and world model

Hi, just wondering if it's at all possible to remove this delay? If it was removed then "teabagging" would be more obvious when you spam crouch 👍 Hopefully this isn't a limitation of the source engine or something...

4 Days Ago
by Zeh Matt Go to last post
8 269
Help

Changing player movement acceleration and deceleration

Hey (first post). I'm looking to modify the acceleration values for my future TTT server. I want the movement to feel snappier, so I want to decrease the time it takes to speed up/slow down when you use/release your movement keys. My assumption is that...

4 Days Ago
by breadstick Go to last post
2 212
Lua

SetupMove and ladders

I'm using GM:SetupMove to invert player movement (Up becomes Down, Left becomes right, etc.). For some reason, this makes ladders unusable, they just fling you back the moment you touch them. Why does this happen? hook.Add( "SetupMove",...

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

Prop Hunt Admin only Spectate

I saw one post on FP about this and it still leaves me super confused as to how to make the spectate team only for admin use. Any help is greatly appreciated.

4 Days Ago
by GravityWolf Go to last post
4 162
Help

Method to edit 3d2d text on a brush

Hi guys, I had a quick question for all you more experienced guys out there...ok say I want to edit some 3d2d text that is on a wall (brush for all you fellow mappers) and I wan't to edit the text / numbers by using a command such as !numberchange ...How...

4 Days Ago
by MPan1 Go to last post
1 165
Lua

Global vars

What's the taboo with using global variables and or functions in lua? Everyone always says that you need to define your variables as local or else they will conflict with other addons and what not, correct me if I'm wrong, but lua is one of the only...

4 Days Ago
by MrRalgoman Go to last post
4 187
Help

solved Reading Memory Wrong Offset

Trying to learn how internals of gmod work, and use debugger in general. Wrote a small module to show where state and luabase pointers are located. The luabase pointer should be located at 0F900205 (0x0F9001C0 + 69), but then reading in memory...

4 Days Ago
by edgarasf123 Go to last post
1 156
Help

DermaPanel for Lightsaber Forcepowers

Hey Guys and Girls, I have a Big Problem. I want to make a Pointssystem for my Forcepowers for Robotboys lightsaber addon Every Forcepower is possible to have 3 Stages of the Power Stage 1 lowest DMG Stage 3 Highest Possible Damage. I Want a...

4 Days Ago
by PIXX Go to last post
5 186
Help

I made a addon but it wont show up in spawn menu!

I made a addon but it wont show up in spawn menu even though i uploaded it and gave it the other category please help! 20th March 2017 they also work on my server also

4 Days Ago
by PIXX Go to last post
2 129
Stupid

solved Should I use module and package.seeall, or just define a global table?

I'm having a little bit of trouble understanding module and package.seeall - Both what they actually do and why I'd use them, I have a 2 questions: 1) When should I use module and package.seeall? 2) How do I access a function that was defined after...

4 Days Ago
by code_gs Go to last post
3 141
Help

[TTT] Sv_alltalk Problem

So i have a problem. I set up sv_alltalk 3(in server.cfg) so everone can speak to everyone, but sometimes when map changes or server restart it changing back to sv_alltalk 1 How to fix it?

4 Days Ago
by markusmarkusz Go to last post
2 131
Question

Mounting GMA in game

I have an old in-game downloader in which I used the "game.mountGMA" and I wanted to work on it a bit but one question I have is what files require a rejoin to the server. (Models, sounds, etc.) because teh sever will say the sound or material is missing...

4 Days Ago
by maurits150 Go to last post
5 317
Help

solved ConVar resets on restart with FCVAR_ARCHIVE set

I'm creating a mod to change the look of the Detective/Traitor menu in TTT. For that I have created a serverside ConVar which allows users to make changes to their menu or not. I created the ConVar with the following code in the lua -> autorun...

4 Days Ago
by hendrikbl Go to last post
5 175
Help

[TTT] Bodies disappear.

Hello J have a dedicated server TTT, and today when j start playing j realized that when someones die's bodies disapper, j read some tutorials on the internet, j removed collection from workshop to see if this problem with addons but still nothing. When...

4 Days Ago
by Gr0m3r Go to last post
8 274
Question

Making bones work off of an alias for bonemerge

HL:S world models use a different name for ValveBiped.Bip01_R_Hand, so they don't correctly appear in the player's hand. I was just going to move it in DrawWorldModel, but is there a way to change a bone name or create an alias for it, instead so that it...

4 Days Ago
by Robotboy655 Go to last post
4 217
Help

Eye Trace for NWEntity

Hey Guys i found this code in the internet and know that when i aim on a player (EyeTrace) it must show under the Model the Icon But i want to do it for a eyetrace as NWEntity. Which function i need for the server side code? That the trace function...

5 Days Ago
by Sodak Go to last post
4 222
Help

Disabling Death Grunt DarkRP

Hi, I have a quick question. How would one disable the "Death Grunt" sound a player makes when they switch jobs? Thank you for your time.

5 Days Ago
by MrRalgoman Go to last post
1 154
Help

Changing Eye Angles on one axis

So I barely know any Glua and I've been trying to make a few edits to a gamemode. One edit I'm wanting to add is when you press a button your eye angle snaps directly forward but without changing your direction. The best I can get is setting the eye...

5 Days Ago
by code_gs Go to last post
3 155
Help

solved Live Check Commands - TTT

util.AddNetworkString("alivecheck") util.AddNetworkString("cmdfail") local cmdPrefix = "/" local commands = {} or nil commands = { = "You have already called a Live Check." = Color(0, 255, 0) } commands = {

5 Days Ago
by GravityWolf Go to last post
3 163
Help

My server is not showing up on Garry's mod Internet

Hey, so I recently just set up a server, but there is a little problem. It is not showing up on the Internet Browser in Garry's mod, the only way to connect is by typing connect (IP) in console. Any way to fix this, thanks.

5 Days Ago
by Potatofactory Go to last post
3 194
Question

2 questions about DTextEntry

1. Is there a way to center the content (text) of the DTextEntry element? 2. How to get rid of the current language thing? ( Panel:SetDrawLanguageIDAtLeft) Thanks in advance.

5 Days Ago
by Klaes4Zaugen Go to last post
7 351
Lua

solved How much PData is too much PData?

I searched around for a bit. Couldn't really find anything except for this one thread posted back in 2012 or something. Pretty much said that PData was very resourceful. I'm making a gamemode for a bit of fun and it seems I can't save the user's guns...

5 Days Ago
by bosnian_cyco Go to last post
5 262
Lua

prevent setpos from teleporting player inside walls

I'm using this code to be able to set the players position while they are alive: concommand.Add("test1", function(ply) ply:SetPos(ply:GetPos() + ply:GetForward()*70) end) If I'm next to a wall the player will get stuck inside the wall....

5 Days Ago
by Luni Go to last post
2 209
Help

solved The weapons don't equip properly I think..?

Hello, I will try to explain the situation as detailed as of my ability and try to stay as clear as possible. So basically, I am using the Flow's Surf game mode files and for some reason, with the surf files, when I equip a weapon in the pointshop, it...

5 Days Ago
by ZombiezPvP Go to last post
9 235
Help

Any method to make third-person reload animations slower or faster?

From what i've seen, there's no GetWorldModel function (unless i havent been looking enough) Is there anyway to make the third-person reload animation slower? (on the default holdtypes) I've tried this (it did not work very well) ...

5 Days Ago
by Shenesis Go to last post
7 166
Question

Is it possible to make player download a .dll automatically? or workaround

My server's radio requires the bass module to be installed on the client. However, the client probably doesn't want to do that by himself. my question is is it possible to make the user download the module automatically? thanks

5 Days Ago
by Jelman Go to last post
5 293
Help

'<eof>' expected near 'end'

Hi , Hello , I have an error on a script, but I do not understand what it is due. " '<eof>' expected near 'end' " . I do not have a line number.

5 Days Ago
by TonyGmod Go to last post
9 273
Help

solved Finding the name of a Prop...

I need to find a way to get the name of a prop that I am looking at. There are props on a map that I cannot find the prop in the Q menu and I am trying to ban the prop from being used on my prop hunt server. Problem is I don't know where to start with...

6 Days Ago
by GravityWolf Go to last post
2 133
Help

How to disable PermaProp tool for staff members?

Hi, on my server I have an addon called "PermaProps" that lets you save and delete props permanently. You may have heard about it before. I was wondering if there is a way to disable this specific plugin for my staff members, while still allowing them to...

6 Days Ago
by Samurai Yack Go to last post
2 150
Help

solved Circle on the surface

How would I make this: A circle surrounding a prop like a capture point. I've been trying a few methods after googling around, but none showed up. I placed all the codes in cl_init.lua since it is client side? Any suggestions are appreciated.

6 Days Ago
by Lennyest Go to last post
0 124
Help

How do I make ammo go directly into the clip once it's picked up?

Im stumped. I'm trying to make it so when you pick up an ammo box, it goes directly into clip1. Something similar to the hl2 grenade. I've been trying to find a way, but nothing has worked for me.

6 Days Ago
by code_gs Go to last post
14 261
Help

Sending large amounts of text from a client gui to the server

So I am working on an addon for our rp server that allows scientists to write research papers. I need help with sending all the text that a player has typed in a text box to the server so I can put it in a text file on the server so I have have it...

6 Days Ago
by zippy36jr Go to last post
9 381
Help

solved GMad can't find addon.json.

I'm trying to upload a workshop item, but every time I try to get GMad to make a .gma file it displays this message: "C:/Users/Tom/Desktop/breenskin/addon.json error: Couldn't find file" Help?

6 Days Ago
by Tom333 Go to last post
8 209
Help

Advanced derma stuff

Hello, so I am working on a script and I am trying out some different stuff with derma. I figured out a pretty cool way to implement a delete feature to the item I am working on, shown here... The bottom stuff are buttons that I just haven't gotten...

6 Days Ago
by MrRalgoman Go to last post
2 222
Help

How do you clear decals near a player?

I don't want the whole maps decals to be cleared, I just want the decals near a player. I'm planning on making a mop SWEP.

6 Days Ago
by XxLMM13xXx Go to last post
1 153
Help

solved render.DrawLine/Quad

I'm currently struggling with trying to figure out how to use the lines and quads to my advantage. I'm a new guy to GLua, but I'm very stuck at the vector part of this code. Could anyone elaborate on how to use it? I'm trying to make a sort of control...

6 Days Ago
by Lennyest Go to last post
5 145
Question

lua_error_url

Hi, Trying to track errors on a server and store them in a DB. For some reason though lua_error_url only saves errors when using "lua_run". It won't post any errors in any files. Any idea why this is? gm_luaerror also somewaht works but stack trace...

6 Days Ago
by Unknown Gamer Go to last post
4 351
Help

Adding .wav files to GMOD Sounds?

Hello, thanks to @MPan1 I got an awesome playlist, which is mainly made for Ambience and such. Well, I tested it out, works perfectly. But then I realized: When I add custom sounds, it doesn't accept the links! So, where do I have to save the sounds to...

6 Days Ago
by Toedeli Go to last post
3 164
Question

Completely new to Lua, have a question

So, as the title says, I'm completely new to Lua, and programming in general. I've been following <CODE BLUE>'s tutorials, and things are going pretty smoothly so far. I have one particular problem I'm stuck with involving GLua, and I can't seem to...

6 Days Ago
by Acob Go to last post
2 207
Help

How would I make a basic character creation script?

Hi, I have a StarwarsRP server and I want to make it as custom as possible and a way to do that is when a player joins it prompts them to create a character otherwise they can't play. My problem is I can't find any tutorial that teaches you how to create...

6 Days Ago
by iJohnny Go to last post
1 153
Help

Thirdperson Muzzle Flash Visible in Firstperson

Hey Facepunch, so I'm currently working on a SWEP, and I want it to have 2 muzzleflash particles. One seen in firstperson (viewmodel), the other only visible in thirdperson (worldmodel). Under my PrimaryAttack function: local vm =...

6 Days Ago
by Rockster3400 Go to last post
2 151
Help

Need Help with a custom chat commander for Star Wars RP

I am trying to create my own server, and I need 2 things. 1. When holding a player with a physgun, hit right click to freeze him. 2. A LOOC (Local Out of Character) command.

6 Days Ago
by Moku Go to last post
1 113