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 4,512
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 23,567
Help

Thermal Detonator or grenade for starwars is shooting insted of throwing grenade

Ok so Iv recently been configuring/developing for this server and someone suggested that we have grenades. Me being the Star Wars savvy guy I knew exactly what to do. So I used a base from this guy and the model is showing in the view-model but the...

Snowa Thread has images 6 people are reading this thread x 6
17 Minutes Ago
by Snowa Go to last post
2 20
Help

DarkRP location tracking

Hey, I'm very new to Lua and my understanding is still extremely basic - I am trying to learn but am struggling to comprehend how I could do this. I want to write a script that does this: Checks if the players team is TEAM_SECENG If true then if...

1 Hour Ago
by Tratman Go to last post
4 45
Help

Need help on 3d text over player head

Hi so I am trying to make a floating text over a players head saying there name. I am having trouble on the adjustments. Can you help me? vec = LocalPlayer().GetAll():GetPos() ang = LocalPlayer().GetAll():GetAngles() cam.Start3D2D(vec,ang,.1)...

1 Hour Ago
by Coffeee Go to last post
2 62
Help

Player_Manager not updating player runspeed and walkspeed correctly.

I set the walkspeed and runspeed of the class, but still the speed is default. If i put player_manager.OnPlayerSpawn(ply ) in a think hook it works but it keeps setting the hp to max. zombies_fast = { DisplayName = "Fast Zombie", WalkSpeed =...

txbondboy 1 people are reading this thread x 1
2 Hours Ago
by txbondboy Go to last post
0 24
Post Your

Problems That Don't Need Their Own Thread v5 ( 2 3 4 5 .. 34 35 36 37 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 VIoxtar Go to last post
1,454 52,043
Help

Concept of server hopping based on going through a certain part of a map?

Hello, i'm asking about the concept of server hopping when going into a certain area since it's a well known and strived for concept which no one ends up following through on. I'm not going to ask someone to hold my and through it but after my exams are...

2 Hours Ago
by SmithStanley Go to last post
4 118
Help
3 Hours Ago
by txbondboy Go to last post
0 40
NSFW

GMod - What are you working on? May 2017 (#69) ( 2 3 4 5 6 7 Last )

Highlights from the previous thread

4 Hours Ago
by gonzalolog Go to last post
240 19,504
Help

Need help making an entity face or track a player or npc

So I'm attempting to have an entity face-track a player or npc as he/she moves . Is there a simple way of doing this, I have done some experimenting and got it to only point once towards an entity spawned using ent.Create, but it doesn't update its angles...

4 Hours Ago
by AzureMarine Go to last post
9 97
Help

DarkRP NeedToChangeFrom problems :\

So i've started my DarkRP and I've made some custom jobs but I always have hard times with The NeedToChangeFrom function, I've tried everything from redoing the code 5 times or double checking and this is my last resort. So i'm trying to make two jobs...

5 Hours Ago
by PotatoJunior Go to last post
16 156
Lua

Hiring a Coder MegaThread ~ Rip In Peace CoderHire ( 2 3 4 5 .. 11 12 13 14 Last )

New Gmod Scripts/Jobs Site: ScriptFodder By now we all heard the news that http://coderhire.com/ is going to be closing it's doors so might as well go back to the good ol' megathread days. This thread is for anyone who wishes to hire a coder to...

5 Hours Ago
by JasonMan34 Go to last post
530 43,295
Help

Hungermod

Hey there, I would like to make an addon that will notify you if your hunger is lower than 20. How do I do this? Thanks - Jack

5 Hours Ago
by Grixed Go to last post
0 31
Garry

Next Update v7 - April 2017 ( 2 3 4 5 6 7 8 Last )

http://cdn.akamai.steamstatic.com/steam/apps/4000/header.jpg?t=1421333577 Changelog Live Changelog Main repository Pull requests Latest update is out: http://www.garrysmod.com/2017/04/17/april-2017-update/

Willox Thread has images 1 people are reading this thread x 1 Winner x 20
8 Hours Ago
by rebel1324 Go to last post
299 22,608
Question

Force NPC to holster his weapon.

How can I force npc_metropolice to holster his stunstick?(Ex. after attacking a player)

9 Hours Ago
by hanm13 Go to last post
4 58
Help

Custom models are floating

Hello, I am currently editing a gamemode and it has a system where if you have a bounty set on you, if you place a comm tower, you receive a percentage of your bounty. I have changed the model to a fridge, cause why not. Anyway, regardless of what...

10 Hours Ago
by Matt09546 Go to last post
5 138
Help

Prop Hunt Q menu

Hi, How do I enable the spawn menu in my prop hunt server? please answer asap Thanks, D4NNY (User was banned for this post ("Wrong Section" - Kiwi))

10 Hours Ago
by AO | D4NNY Go to last post
0 44
Help

solved Error which makes core game functions not work

I modified the Flood gamemode a bit to make it into Purge Roundbased but when I try to make my server appear under "The Purge" rather than "Flood" I get this error which renders core mechanics like buying props and weapons non functional. ...

Cub
18 Hours Ago
by Cub Go to last post
7 76
Help

Entity Owner text

So i'm trying to show the player who spawned the entities name on the entity. I got this code but It always shows up as unknown rather than a actual ingame name cl_init.lua local owner = self:Getowning_ent() owner = (IsValid(owner) and...

20 Hours Ago
by MrRalgoman Go to last post
1 55
Help

SpawnIcon/DAdjModelPanel

I'm attempting to create an Arma 3 inventory-style system that uses an image of the weapon/item to show what it is. I ran into an issue, and I was wondering if anyone knows a solution I've made a simple window to get the angles so I can insert them...

23 Hours Ago
by Geoffry Skio Go to last post
2 54
Help

solved Lua entity particle orientation help

So I have currently made a working entity missile that launches when you press E on it, the problem i have is that the particles come out of the side of the missile instead of where it should. I'm using...

1 Day Ago
by AzureMarine Go to last post
1 96
Help

DarkRP Bodygroup

Hello. I am trying to setup jobs on DarkRP, and when they spawn they have a specific bodygroup set. I am using this code and I've tried various other codes and it doesn't seem to work. PlayerSpawn = function(ply) ply:SetBodygroup(1,...

1 Day Ago
by DukieBoyXL Go to last post
6 83
Help

Help with shared function (Reference error)

Hello Guys. I was working on a Networked Var function that only server can change var value Server->Client function CreateNetworkVar(Object, VarName, Type, DefaultValue, NotIsHookCaller) local ReadFunction, WriteFunction, SetFunctionName,...

1 Day Ago
by Nicksf13 Go to last post
4 93
Help

PLEASE READ PLEASE! How do I set the SNPC based on the AI of the standard RPCs to the path to the fo

Warning!I'm from Ukraine, and I do not know English well, so I had to use translators. I'm sorry I create an SNPC based on the standard AI NPCs from Half-Life 1/2, and I encountered such a problem: I need this NPS to use my sounds instead of standard...

1 Day Ago
by vladvoron Go to last post
4 99
Question

Set hand model only

Hi, how do I set a glove model from materials/models/weapons/v_models/hands/gloves.vtf as hand model? Thanks

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

TMySQL Help!

I need TMySQL. I have looked everywhere but cant find it. Please help. I need it!!!

1 Day Ago
by code_gs Go to last post
7 109
Help

solved IsHovered() Returning true and false?

So I'm trying to get a sound to play once when the mouse hovers over a button and I found something interesting. The way I was gonna do it was have a counter, and play the sound on the first initial frame. Only one problem, I can't reset the counter when...

1 Day Ago
by MrRalgoman Go to last post
4 71
Help

Create a function condition that require the player to be inside a zone

Hello facepunch: I need a little help on configuring the Bio-Hazard addon from the workshop. Here' s the thing : There' s an entity that spawns a toxic sphere that is suppose to infect you once you get in. The thing is that there' s a condition...

1 Day Ago
by code_gs Go to last post
8 178
Help

DTextEntry:SetText not working? Possibly because of net error?

Okay, I try not to clutter the forums with dumb questions but this one truly is stumping me. So my last resort is to outsource and ask the community. Little run down... I'm making a death-menu, which essentially makes you click "Respawn" every time you...

1 Day Ago
by Richtofen Go to last post
4 99
Help

Not Sure How to Create Default Value in MySQL

Hello I am trying to set up the Epidemic gamemode that was released here on Facepunch about 5 days ago. I have a MySQL connection established and everything is installed correctly. I imported the .sql file correctly too. However, it appears one thing...

2 Days Ago
by eilex Go to last post
5 193
Help

Adding delay between 2 prints in chat

Hello Facepunch ! I have been messing around a lot on gmod lately so sorry if im posting a lot today :s Here' s my function : if (ent:IsPlayer()) then if (self:ShouldCollide(ent)) then if (ent.ShieldTouch) then timer.Simple( 2,...

2 Days Ago
by JasonMan34 Go to last post
3 121
Help

How do I play a sound to everyone on the server?

Dont tell me there is a ulx command to do it because im looking for a way to do it in lua.

2 Days Ago
by JasonMan34 Go to last post
5 121
Help

FastDL - Some players trying to download .bsp instead of .bz2 and getting missing map errors?

I have a working FastDL setup for my server, all of my maps and resources are uploaded to it in bz2 format and 99% of users can join and successfully download the files. However, every so often I see in the console someone trying to join and getting a...

2 Days Ago
by Shorthouse06 Go to last post
2 110
Help

How can I stop guards from equipping custom playermodels in Jailbreak 7?

Hello! I'm in the development of my Jailbreak GMod server, running the Jailbreak 7 gamemode by Excl and have a little problem... so I've added some custom playermodels to the pointshop, however when a player goes onto the guards team, they still have...

2 Days Ago
by bubbyodo Go to last post
0 69
Question

DColumnSheet onSelect Hook?

Hello everyone, I'm currently working on a UI-Redesign of an Addon of mine, I'm now using DColumnSheet As it serves what I need. Problem is that I can't find any hook or method to detect when one of the buttons is pressed. I'd have to get the active...

2 Days Ago
by Sean Bean Go to last post
3 76
Lua

Derma Panels on car

I want make Derma only open in vehicles whit commands. (User was banned for this post ("Wrong section again please USE DEVELOPER DISCUSSION FOR GMOD HELP" - Kiwi))

2 Days Ago
by Synix28 Go to last post
1 115
Request

Half-Life 2 Weapon Iron-Sights.

I was wondering if anyone could edit the original Half-Life 2 Weapons and add Iron-Sights to them, and to go into the Iron-Sight, simple hold E. Weapons: USP-M. MP7 SPAS-12 Pulse-Rifle .357 Magnum Makeshift Crossbow

2 Days Ago
by aidor Go to last post
3 2,021
Help

(gmod lua) weapon broken in multiplayer

Hi! Can someone help me with this code I have below. I'm no lua programmer and making this semi-working pistol took a long time for me. It works fine in single player, but glitches a lot in multiplayer. Can someone fix them, point the problems or guide me...

2 Days Ago
by atomic-emnu Go to last post
4 114
Help

JavaScript on loading page not being called

Hello, sorry if this is in the wrong place, but I can't find anywhere better. I have created a loading page for a server with code akin to: <head> <style> ... </style> </head>

2 Days Ago
by Briggybros Go to last post
0 76
Help

solved Camera collisions with MyCalcView?

Hey guys! I'm currently trying to make MyCalcView collide with walls, but I can't get it to work. If you guys could help me out, that would be great! Code: function MyCalcView( ply, pos, angles, fov )

2 Days Ago
by LambadaCorez Go to last post
2 53
Question

solved HUD

-- Add 16 to the width and set the height of the box. width = width + 16; height = (20 * #information) + 14 - cutheight; -- The position of the information box. local x = 4; local y = ScrH() - height - 4; -- Increase the x and y position...

2 Days Ago
by DukieBoyXL Go to last post
3 73
Help

solved How to use ents.FindInSphere?

I have a basic script to attempt it but it doesnt seem to be working. nullwavify = ents.FindInSphere( self:GetPos(), 500 ) for key, value in ipairs(nullwavify) do if v and v:IsValid() then v:Ignite() end end

2 Days Ago
by ricesoda Go to last post
2 59
Help

TTT Equipment Menu Specified Order

I dislike the fact that the equipment menu items are not in any order and can change on server restart. I'd like to keep it organized and would like to implement a method of doing so. I'm thinking I can add a numerical value to each item and maybe...

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

3 Days Ago
by DonovanBlurr Go to last post
1,726 93,517
Help

Stop viewmodel from flipping when decreasing FOV?

I'm trying to fix a custom SWEP in a gamemode that has a scope that works by adjusting the FOV. However, when zooming to around 0.3x of the default FOV the viewmodel flips upside down for some reason and appears at the top of the screen. This isn't...

3 Days Ago
by Shorthouse06 Go to last post
2 88
Question

game.GetWorld() not shared ?

Hello, Why this ? How is possible and how to fix it ? Shared.lua : game.GetWorld().Status = 1

3 Days Ago
by NeatNit Go to last post
7 190
Help

solved I need help spawining a custom npc in my gamemode.

I am making a single player gamemode, and i downloaded a custom npc. I cant seem to get it to spawn with ents.Create.... local temp = ents.Create("npc_hillary_ally") temp:SetPos(SpawnPos) temp:Spawn() My console keeps...

3 Days Ago
by Maglite Go to last post
8 120
Help

solved attempt to index global 'surface' (a nil value)

So I am getting a pesky error on the server about the surface library. I understand that the surface library doesn't exist on the server but I don't understand why it's being loaded on the server, I have an init file autorun/snpc_main.lua with this code...

3 Days Ago
by MrRalgoman Go to last post
3 59
Help

Error when starting my Gmod server

Alright, I've created a server and when I start it up I have a lot of "errors" : http://prntscr.com/fbbh7k I don't know if I should ignore this or trying to solve the problems. Also it takes A LOT of time to start it up like 5 minutes (I have about...

3 Days Ago
by DukieBoyXL Go to last post
2 100
Help

How to check if the text includes a word from a table?

Im trying to make it detect if the message includes anything from a table when the player types something. I know that I should use PlayerSay hook but the problem is that I dont know how to make it check if the message includes the text.

3 Days Ago
by bilbasio Go to last post
4 93
Question

Lua error when the server changelevel or lua refresh

Hello, Can you help me ? When i changelevel all the gamemode reload with lua error Thanks you.

3 Days Ago
by JasonMan34 Go to last post
5 136
Lua

Need Some Advice/Help with Timers

As I mentionned in the Title I want your advice on what timer to use. Reaching out from CurTime() and Timer.simple to timers with ids created with timer.Create. Here is the thing my goal is Having a Timer called A for example which will trigger another...

3 Days Ago
by ZarusNat Go to last post
8 156
Help

Some people crash upon selecting a character on my server

Hey everyone, I've coded a NS schema for my roleplay community, and some people can join in and play just fine - though some people crash to desktop instantly whenever they select their characters. Any ideas on why this is happening? EDIT: Here are...

3 Days Ago
by DahDestroyer Go to last post
4 98
Question

From Blender to Gmod

So I've created a model of a sword that I'd like to bring into gmod. I've looked online and all I can find are super outdated and confusing tutorials. I've created the model in blender and I'm completely lost on what to do next to bring it into gmod....

3 Days Ago
by Robotboy655 Go to last post
2 117
Help

Tool gun constraining props to admin

Hey guys I'm setting up a server for the first time in several years and I'm running into an issue I'm not sure how to solve, I've checked google and I cant find any solutions. Im assuming this is a setting in FPP but not 100% sure. Whenever an admin uses...

3 Days Ago
by RileyGuy1000 Go to last post
1 77
Help

solved How would I run a command as soon as the client loads into the server? (gamemode)

Quick question, how would one run a command as soon as the client loads into the server?

3 Days Ago
by MrRalgoman Go to last post
1 54
Help

solved How to pack an addon into a gamemode?

Hey guys, I need some help. I need to pack an addon into a game mode. I have tried this before, but for me, it's extremely confusing. I guarantee this is super simple and my dummy head can't figure it out, but I've been searching the internet,...

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

solved Trying to make a toggleable button that executes a ConCommand, help!

Trying to use the "IsKeyDown" input command, but every time I press my N key, it floods the command a ton of times until I stop pressing N. What I need is a toggleable hook that when you press N, there's a time delay until the next time you can press N...

3 Days Ago
by Moat Go to last post
3 70
Question

solved Permission & publication question/help.

I want to make a server content or gamemode. Whatever. I also want to make it surfing, bunnyhopping and rocketjumping with a timer. I found the addons that I want to take out some lua text stripes/ lines with the functions above and put them into my...

3 Days Ago
by Sweets Go to last post
0 70
Lua

solved Increase damage of the weapon you're holding

How would I go about increasing the damage of whichever weapon the player is holding for a short duration? Here's what I have so far: In this case I'm checking if the weapon is valid, and if so, is the weapon a crowbar? Then I'm checking if the player...

3 Days Ago
by Thane Go to last post
12 160
Help

Help with surface.SetDrawColor

Hello, I have a little problem.. Can you help me with my entity ? I build a Casino Server with tetris, slots, spinwheel. Everything work for the tetris except the color of is always grey

4 Days Ago
by killerrichard Go to last post
5 142
Lua

solved Console Variables not editable by clients on dedicated servers

Hello, I've been trying to patch a strange bug I found a while ago in one of my addons, however I simply cannot figure out what im doing wrong so here I am. The bug only occurs in dedicated servers, the bug itself is that server side convars can not be...

4 Days Ago
by Butterygames Go to last post
4 121
Help

solved Model is not displaying correctly.

Hello, so finally, I got my custom models into my steam collection and the user successfully downloads my models. My model is located at: models/items/ticketmachine.mdl So, I have set the model to my entity, as shown below: self:SetModel(...

4 Days Ago
by Matt09546 Go to last post
6 110
Help

solved any way to find a HL2 npc's lua code?

just wondering. I want to find the Fast Zombie's code and modify it to fit my addon. I believe Nightmare House 2, a half-life 2 mod, has done it.

4 Days Ago
by code_gs Go to last post
3 77
Question

Profiling server files, are the two first results bad?

As you can see below the picture, two first lines have values way higher than every other, my questions is simple how bad is the modules for server side?

4 Days Ago
by E4ewd Go to last post
5 252
Lua

Adding viewDelta for GMOD (CS:S Crouch)

I'm trying to add the viewDelta from CS:S for better air-crouching. I'm using all the CS:S hulls with: SetHull, SetHullDuck, SetViewOffset, SetViewOffsetDucked https://developer.valvesoftware.com/wiki/Player_Entity CS:S Crouch Code (Momentum BHOP...

4 Days Ago
by FiBzY Go to last post
5 202
Help

Find Half Life 2 contents in server files

Hey facepunch : I' ve been doing some pretty cool things on a server, and i wanted to mess with choppers, so i got myself a reskined version of the half life chopper. But for some reason this chopper can not be destroyed with roquets other than the...

4 Days Ago
by DG_Mathieu Go to last post
4 153
Help

Hit-Boxs problem.

When a player holds any weapons hit-boxes don't move after him.

4 Days Ago
by code_gs Go to last post
6 218
Help

solved Parent ENT has no Collision

I'm trying to attach a Enitityto another Enitity, but the attached Enitity has no Collision... function ENT:Touch( ent ) if ( ent:IsPlayer() ) then return end if ( ent:GetClass() == "monitor" && !self:GetConnected() ) then local...

4 Days Ago
by Synix28 Go to last post
4 132
Lua

solved Help needed with 'env_fire'

Hello there, so, I'm trying to make an entity that is a torch lit. The problem is, that I can't seem to be able to successfully create a working fire effect (the ignite function creates a fire that's too big and too laggy). After many tries combining...

4 Days Ago
by AlbertoBC Go to last post
10 563
Lua

ScrW() -> a nil value ?

Hey ! I'm coding an addon for myself but I got a problem : Here, my code : function SWEP:HUD() local width = ScrW() local height = ScrH() // Here some code for the function end

4 Days Ago
by Leyserr Go to last post
7 369
Help

Derma Bound F3

I have a question, I have created a derma menu which is bound to F3, however, when you close it the mouse remains (as that key makes the mouse appear), and thus you must reopen it and close it again. Is there a way I can override that when the menu is...

4 Days Ago
by Alydus Go to last post
2 107
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
5 294
Help

Hands for models in the Pointshop

Hello. I'm currently just getting a bunch of different playermodels for my Jailbreak server (Jailbreak 7 by Excl game mode to be precise) and am struggling to allow the playermodels' hands to be viewed in first person mode. They all just show up as...

4 Days Ago
by bubbyodo Go to last post
0 66
Question

solved A derma panel with tabs

Hello, so currently I have a pretty basic derma panel. function frame_create() --Note that I changed the function name. You can change the function name to anything you want frame = vgui.Create("DFrame") frame:SetPos(50,50)...

5 Days Ago
by CupCakeR Go to last post
4 134
Help

I made a huge mistake.

Okay, so I had made a few entities, and I wanted to change the "ENT.Spawnable = true" to false. I did so by using Notepad ++'s functions. However, notepad decided that it would replace every "true" with "ENT.Spawnable". And in turn broken every file with...

5 Days Ago
by NeatNit Go to last post
4 202
Help

solved Can you run GiveAmmo in a SWEP? just wondering

My SWEP has it so if you pick up a "PSI Hypo", it goes to a seperate ammo counter alongside "Psychic Points". When you use your attack, the psyshic points are depleted. But then you can click right-click to use a PSI-Hypo and regain your psychic points...

5 Days Ago
by ricesoda Go to last post
5 137
Help

I am in need of a simply line of code for darkrp.

Anyone know / have a line of code for darkrp, for when you die as a job lets say for example as mayor and you get demoted to citizen and your temporarily ban from becoming mayor again for 30 mins. Basically a temp ban code when you die as a class it...

5 Days Ago
by frankyp Go to last post
0 100
Lua

solved Jobs Dont work (I messed up my last thread so sry)

I made all my jobs the way I think they should be made but they dont show in the f4 menu. Just the default jobs. here my code strait from jobs.lua. --https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua For examples and...

5 Days Ago
by lNloruzenchi Go to last post
30 424
Help

Pointshop 1 giving items on a custom action

Hello, I need some help for a code to give items when people donate to it. So basically, if someone were to buy the package by the name of "knife", I would like them to receive the item "weapon_knife" in the pointshop1. I'm unsure of what code I...

5 Days Ago
by ZombiezPvP Go to last post
0 72
Help

How to calculate others player screens to position something?

How to calculate others player screens to position something? Is there like an easy way to do it and not a very complicated way? People told me that I have to use ScrW() and ScrH() to devide or multiply it trough something but I am not actually...

5 Days Ago
by JasonMan34 Go to last post
20 555