Title / Thread Starter Last Post ByReverse Sort Order Replies Views
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 38
3rd September 2014
by NiandraLades Go to last post
2 17,334
Garry

MODDING HELP - READ ME FIRST - LAST UPDATED 5 OCTOBER 2015

This forum is for help modding Garry's Mod. This does NOT include Mapping or Modelling. Mapping: http://facepunch.com/forums/40 Modelling: http://facepunch.com/forums/38 Your first port of call should be the Garry's Mod Wiki. If you don't find...

garry Lua King x 27
27th February 2013
by garry Go to last post
0 17,749
Love

GMod - What are you working on? July 2016 (#59) ( 2 3 4 5 .. 12 13 14 15 Last )

Highlights from the previous thread

1 Minute Ago
by geferon Go to last post
569 35,823
Post Your

Problems That Don't Need Their Own Thread v4 ( 2 3 4 5 .. 72 73 74 75 Last )

Welcome to Problems That Don't Need Their Own Thread v4! 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...

17 Minutes Ago
by bobbleheadbob Go to last post
2,968 75,478
Lua

ScriptFodder - The Garry's Mod Marketplace ( 2 3 4 5 .. 47 48 49 50 Last )

ScriptFodder - The Garry's Mod Marketplace ScriptFodder is tailored towards two types of people, if you're a Garry's Mod server owner, ScriptFodder can offer a variety of premium content for your server, or if you're looking for something a little more...

Handsome Matt Thread has images 6 people are reading this thread x 6 Dumb x 22
21 Minutes Ago
by Lunaversity Go to last post
1,976 73,719
Lua

Issue with Mirrors and PostPlayerDraw

I'm currently developing my own custom pointshop at the moment, but I'm having an issue. Whenever a player goes in front of a mirror, their props becomes visible to them: http://i.imgur.com/LCM6zon.jpg http://i.imgur.com/tmv0hhp.jpg And when...

1 Hour Ago
by hghg1 Go to last post
1 67
Help

Script Help?

I need help on a script that can only be or one job, so basically you type !sit in chat and you teleport to a certian area on the map. Any help?

1 Hour Ago
by andreblue Go to last post
8 131
Help

Custom entities with player model

Hi! I try to make a custom entities, and I use a playermodel. I don't know how to fix this error : function ENT:Initialize() self:SetModel("models/player/portal/male_07_medic.mdl") self:PhysicsInit(SOLID_VPHYSICS)...

1 Hour Ago
by overki11 Go to last post
9 136
Help

Odd HUD issue

Hello! I have a weird bug with a HUD i'm trying to fix. This is for the hitman variant of TTT. Where traitor have a target and must kill the target etc. I (With the help of some friends) fixed the HUD to adjust size depending on the size of the...

ncc360 Thread has images 1 people are reading this thread x 1
1 Hour Ago
by ncc360 Go to last post
2 66
Help

How can i unarm a player?

Is there a command for unarming the player a command that unarm the player but they still have all there weapons so no strip weapons! :D

poepel 1 people are reading this thread x 1
1 Hour Ago
by overki11 Go to last post
2 37
Help

Finding an entity's on-screen dimensions in pixels

In several games, namely Deus Ex, items are outlined when selected for activation or pickup by corners around the item visually. For example: I'm trying to achieve the same effect in Garry's Mod, but I'm having some difficulty determining the...

1 Hour Ago
by Robotboy655 Go to last post
5 57
Help

limiting weapon pickups (1 primary, 1 secondary)

i renamed all of my sweps that i use in my server to css's sweps to make them spawnable my the map and not missing anyways if u care heres the code how i renamed them AddCSLuaFile( "weapon_placer.lua" ) _G.weapons_OnLoaded = _G.weapons_OnLoaded or...

2 Hours Ago
by PizzaDoxy Go to last post
5 119
Games

Can't Remove PD Doors

Hello i currently own a darkrp server and i was wondering on the map rp_downtown_v4c_v2 i can't remove PD doors since i have made my own code.... I really want help with this and it's botthering me.... please help If you want to connect the ip is...

2 Hours Ago
by AcTivColonel Go to last post
9 91
Help

Help with update today

For a while I've been using xDShot's CSGO knives on my TTT server, until today the animations have broken and which was seemingly caused by nothing. There are people saying there was an update but there's no record of it on steam or...

2 Hours Ago
by Woodehh Go to last post
6 168
Help

Scoreboard Adding Avatars?

Well I tried adding avatars, worked great. But, only loaded 1 avatar? then after that broke the file so I didn't use it again.. local ScoreboardDerma = nil local PlayerList = nil local function ScoreboardShow() if !IsValid(ScoreboardDerma) then ...

3 Hours Ago
by whitestar Go to last post
2 44
Garry

Next Update v5 - April 2016 Update is out! ( 2 3 4 5 .. 19 20 21 22 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/04/28/april-2016-update/

3 Hours Ago
by YourStalker Go to last post
854 60,815
Help

Custom Tails view model not working correctly

I recently made first person hands for my Tails player model and for some reason it looks wired. Anyway i can fix the arms thats my main concern. Thanks for giving me your time. // Created by Crowbar 0.34.0.0 $ModelName "_TailS_...

3 Hours Ago
by louie123 Go to last post
10 181
Help

solved Disabling default scoreboard (not a gamemode)

Well I am trying to make a scoreboard but everytime I press TAB the default Sandbox tab comes up aswell as mine behind it? Is there anyway I can disable it inside of my scoreboard lua file? local ScoreboardDerma = nil function ScoreboardShow() ...

4 Hours Ago
by jacobcooper18 Go to last post
6 116
Lua

Effect direction?

I'm working on a custom effect and currently I need it to start at the player's position (that wasn't hard), but also go into the direction of the player's eye trace. Does anyone around here know how I would do that? This is the effect's code: ...

5 Hours Ago
by wh1t3rabbit Go to last post
3 110
Help

Lag Spike issues!!!

Ok, I'm a bit ticked off by this lag spike issue now. Hello, my name is Randy Butternubs some of you might know me as the "facepunch meme" or otherwise. And yes I'm still newbie to coding, I know how to host a server I just don't know how to...

7 Hours Ago
by RandyButter Go to last post
21 420
Question

How to sync client side timers

I have 2 timers that are hooked to the Initialize function client side. Obviously as you would assume when 1 player connects, and then another player connects 5 or so minutes later, the timers will be out of alignment. What is the best possible way to...

8 Hours Ago
by dannyf127 Go to last post
10 259
Help

Number of walls trace passed though

How exactly would I go about counting the number of brushes a trace has passed through? I haven't really tried much as I do not know what to do in order to make it ignore a certain brush but hit others.

9 Hours Ago
by code_gs Go to last post
9 170
Question

Painting and retrieve data from DListView?

Hey everyone. I'm working with DListView, but I've encountered some problems. 1. I cannot seem to figure out how to target individual elements of the DListView to paint them. 2. Reading the wiki, I couldn't find any way to retrieve the data from...

10 Hours Ago
by whitestar Go to last post
6 67
Help

SetModelScale, SetRunSpeed, SetWalkSpeed and SetModel aren't working!

Hello! I've been modding for almost a year now working on 2 main projects, TTT Assassins, and the one that I'm having trouble with, Vampirism. In recent months I have been rewriting the mod and trying to get it to function as intended, but I keep...

10 Hours Ago
by EpicCreeperHD Go to last post
6 153
Help

No DNA on TTT Custom Weapon

This may be a simple and easy question, but how can I disable DNA on a custom weapon I found. So DNA will not be found on people killed with it?

11 Hours Ago
by skullorz Go to last post
8 217
Help

chat tags

So here is the working code... local Tags = {} Tags = { Color( 255, 0, 119 ), "Owner", Color( 196, 29, 107 ) } Tags = { Color( 0, 136, 255 ), "Admin", Color( 6, 116, 212 ) } Tags = { Color( 227, 39, 39 ), "Global-Admin", Color( 201, 34, 34 ) } Tags...

15 Hours Ago
by meharryp Go to last post
35 537
Help

DrawMaterialOverlay on ttt

Hello. I used DrawMaterialOverlay( "effects/invuln_overlay_red", 0.5 ) on my local server, and it perfectly works, instead in my ttt server, I only see error. Why?

15 Hours Ago
by Predda Go to last post
8 142
Help

How do I make it so a certain player gets a weapon when they spawn?

So, I have a player that wants to pay for a permanent weapon. How do I make a player spawn with this weapon: m9k_l85 I couldn't find any addons that'd do this for me, so I'm just going to post this here.

15 Hours Ago
by Matsumoto Go to last post
10 173
Lua

solved opening a players profile via derma menu

Hey guys.. Was messing around with some derma stuff and wanted to know how to open a certain players profile. I couldn't find anything looking through the player category on the wiki. Can someone point me in the right direction here? Here is...

16 Hours Ago
by bosnian_cyco Go to last post
2 63
Help

Loading screen features ideas/suggestions?

Anybody have any good ideas for a loading screen? I'm making one and was wondering if anybody had some ideas for some features or a specific look that would make it look better? I want the best of the best for my community and want to make sure it's the...

16 Hours Ago
by Rori Go to last post
4 91
Lua

help with respawn commend

hi i have code for respawn commend and its say that i dont have accses to the commend code : function ulx.spawn( calling_ply, target_plys ) local affected_plys = {} for k,v in pairs(target_plys) do if !v:Alive() then v:Spawn()...

16 Hours Ago
by roastchicken Go to last post
7 109
Lua

help with wings script

i want to add wings addon to the shop but i dont know whats worng with this code : ITEM.Price = 15000 ITEM.Model = 'models/wings/wings_folded.mdl' ITEM.Bone = 'ValveBiped.Bip01_Spine2' function ITEM:OnEquip(ply, modifications)...

17 Hours Ago
by soosy Go to last post
0 50
Help

Recording all the palyers in the game? video.Record

I havn't ever used video.Record before because really it ain't something people use... but I was thinking of a system were people can report a player? and when we type a command in chat it loads up the players replay? local config = { container =...

17 Hours Ago
by jacobcooper18 Go to last post
8 314
Lua

Backdoor Busting 2016

Hey guys, I've taken it upon myself to declare war on the fuckboys and their shitty backdoors. All the code previewed here lives on my server. If you don't trust my findings you're free to download the addons and check for yourself. Note that the...

17 Hours Ago
by Sir TE5T Go to last post
12 439
Help

New to lua coding, What is wrong here?

I am attempting to code a admin has joined the server script however i am getting script errors This is probably such a simple fix but it would help and educate me if i was told the problem here. Thankyou function GM:PlayerInitalSpawn( ply ) if...

19 Hours Ago
by COMBOBREAKER Go to last post
8 120
Lua

Need Help with Converting from a string to a non-string in tables

Okay so in this example I'm trying to create tables inside of another table. I have to be able to get the name of the table that is to be created with a variable however when I want to put it into table.insert it interprets the variable name literally. As...

19 Hours Ago
by Netheous Go to last post
1 86
Help

Where is the Medkit file in DarkRPmodification?

Hi guys, I want to change how much the DarkRP medkit heals players from 1 to 10 instead. I've looked around in the darkrpmodification file and can't find any file which has the medkit so I can change how much it heals Do you guys know where it is?...

20 Hours Ago
by Blinkenn Go to last post
10 202
Help

tmysql3 & tmysql4

Anybody know if using both is possible? Don't really feel like converting all over to tmysql4 structure. Thanks.

20 Hours Ago
by code_gs Go to last post
1 67
Help

Loading screen question?

So I was gonna make a custom loading screen for my community and I was curious if anyone knew where to look or what to do about getting the users steam ID, Photo, name and map name as well as player count. Any help?

23 Hours Ago
by Rori Go to last post
2 63
Help

Lua error with custom printer! :( Help!

Hello so I am trying to add a custom entity and I keep getting 1 lua error, this is what it said! 'ENT' is being indexed like it is a table, but in reality it does not exist (is nil). Hints: - You either have 'something.somethingElse', 'something'...

1 Day Ago
by code_gs Go to last post
4 60
Lua

Could someone help with an ENT error?

can someone please help me fix this error? 'ENT' is being indexed like it is a table, but in reality it does not exist (is nil). Hints: - You either have 'something.somethingElse', 'something' or 'something:somethingElse(more)'. The 'something'...

1 Day Ago
by The_Lord Go to last post
0 65
Lua

KeyPress HUD Code Help.

so there is some networking needed for what I am trying to do, and uhhh... the most i've ever networked was sending 2 player names to the client, so I need some help. Anyways, some of you know that on surf or bhop servers, you can view what...

1 Day Ago
by whitestar Go to last post
1 87
Lua

Trying to apply a variable to a player

Hello,I'am trying to apply a variable to a player,Like: function SWEP:Equip(ply) ply:Strength=20 end The lua error I get is:Fuction arguments expected near = I'am trying to do this so I get it on a derma screen later on.

1 Day Ago
by Gmod4phun Go to last post
21 269
Lua

solved GM:PlayerSetModel how to get the current player model?

Right now GM:PlayerSetModel has one argument, the player. I need another argument which is the current model of the player. Or does using player:GetModel() do it? Or does it get the model before the one that the player wants.

1 Day Ago
by roastchicken Go to last post
6 92
Lua

Writing data to a log.txt.

Hello! i was wondering how you would write data like a string and numbers to a txt file. I know ulx does something similar but i dont know how. Thanks!

1 Day Ago
by PureCTRL Go to last post
9 129
Lua

death dont get knife

hi i have a deathrun server and when someone have a knife from the pointshop so when they death it not give him the knife code of my knives : ITEM.Name = 'Bayonet' ITEM.Price = 8000 ITEM.Model = 'models/weapons/w_csgo_bayonet.mdl' ITEM.WeaponClass =...

1 Day Ago
by PizzaDoxy Go to last post
5 137
Help

solved phys_hinge in lua

Hello guys :) i want to make an entity in lua (a trebuchet) i need the axis there http://i.imgur.com/zJf813q.jpg i know how to make it in hammer editor but i want it in lua, also i add an hud for that entity

1 Day Ago
by poepel Go to last post
13 287
Lua

solved Choose random position on ground?

Is there anyway to choose a random position anywhere in the map to spawn a random swep on the ground? The function I'm looking for is the one that chooses a random position.

1 Day Ago
by lvivtotoroyt Go to last post
6 78
Lua

How to get current ammo?

I have been making a hud recently and is there a way to make something like this :local health = LocalPlayer():Health() but getting the local players ammo?

1 Day Ago
by Gmod4phun Go to last post
8 105
Lua

solved Disable Spawnmenu serverside?

I am trying to restrict the spawnmenu only to people who have the toolgun. I have found this hook: wiki.garrysmod.com/page/GM/OnSpawnMenuOpen But I realized that that hook (that that.. heh) is a clientside one, and doesn't that mean that the script can...

1 Day Ago
by lvivtotoroyt Go to last post
6 78
Help

Animated text getting bigger when hovered onto.

Was just wondering on how I could create animated text for a button I hover onto. The text would get slightly bigger when hovered onto and the go back to normal size. I know how to animate vgui's already but this I don't know this. Code I have so...

1 Day Ago
by TheNooblycore Go to last post
8 195
Help

Drugs show up under weapons tab instead of shipments tab, buyable by any job.

I'm currently testing this drug dealer job and the entities that work with it. However, drugs seem to show up, inside of my category, under the "weapons" tab rather than the shipments tab, which appears to be darkened. I can also buy drugs regardless of...

1 Day Ago
by roastchicken Go to last post
3 105
Help

How to enable no-clip in LUA?

I'm looking for a Lua command (or a line of code) that puts the player into no-clip. Thanks :)

1 Day Ago
by BillyOnWiiU Go to last post
6 288
Help

solved How to remove lag from Avatars? ( VGUI )

local Avatar = vgui.Create( "AvatarImage", Panel ) Avatar:SetSize( 100, 100 ) Avatar:SetPos( 65, 100 ) Avatar:SetPlayer( LocalPlayer(), 100 ) Ok so I have this, everything on the server works no errors. But when I change anything inside...

1 Day Ago
by jacobcooper18 Go to last post
9 123
Help

solved Timer with chat.addtext

timer.Create( "LvlTest", 2, 0, function() if (ply:GetNWInt( "LVLBar" ) + 1) then for k,v in pairs( player.GetAll() ) do chat.AddText( Color( 100, 100, 255 ), ply, ", Has just reached lvl ", client:GetNWInt( "LVLBar" ) ) end ...

1 Day Ago
by jacobcooper18 Go to last post
12 146
Question

solved Wich are the differences between a windows server and a linux server?

Hello. Excuse me for any grammatical errors. The title doesn't perfectly explain my question, so before comment read all. I don't know why my script perfectly works on a windows server, but not on a linux server. I know that in a linux server, I...

1 Day Ago
by Predda Go to last post
4 113
Question

Playermodel for a specific player in pointshop?

Is there a way to make a playermodel purchasable only for a specific player in pointshop? If there is, how can this be achieved?

1 Day Ago
by MooreTwisted Go to last post
4 169
Help

How i can play youtube songs on sound.PlayURL ?

Hello, i tried help of this thread: https://facepunch.com/showthread.php?t=1389301 But it doesn't want to play.Maybe The link is not ending with .mp3? Please guys, i want help.I am figuring it out 2 days now.

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

Keep Weapon on change job DarkRP 2.5+

Well like the title set, how do i make player keep weapon when they change job in DarkRP?

1 Day Ago
by YoutoYokodera Go to last post
0 69
Help

DarkRP Commands Permissions

Hello, I've setup ULX which is merged with CAMI for DarkRP Commands. I've setup a rank that is inherited to the "admin" ulx rank, but disallowed the "darkrp_admincommands" permissions. While doing so they are still able to do the slash commands to the...

2 Days Ago
by Darkblizzard Go to last post
0 81
Release

Simple Radio/Comms command for DarkRP

Hey everyone, this is my first attempt at creating a Gmod script of any kind. Basically its a re-do of the /advert command but instead of /advert its /radio, /comms, or /coms that puts out text in the format of *yourname* : *your message in bright...

2 Days Ago
by FirstOrder Go to last post
10 321
Help

solved Unknown error in GLua

I have a problem, I have this snip of code: // Now let's loop through all the lines so we can split those too for i, line in ipairs(lines) do // line is the current line, and i is the current line number data = string.Explode(" ", line)...

2 Days Ago
by ZombieKingAAA Go to last post
27 281
Help

solved Fly mode instead of GM:PlayerNoClip

Hello all, Had a good look round at trying to find a fly command that I can use in my gamemode. Basically, players will be allowed to fly around the set area of the map although not pass through any object/world items. I am in the process of rewriting...

2 Days Ago
by .0mega Go to last post
9 263
Help

solved Make sleep people whit a swep

Hello I want to make a swep with which you can make sleep(DarkRP) someone when you shoot on it with this swep I have le little idea of how to do that but i need some help

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

solved Adding the infamous blur to vgui elements

Hey everyone. This is just a simple question. I've looked at a few addons that incorporate blur into derma/vgui elements, and I'd love to do the same. However, from these addons, all I got was confusion. Could anyone demonstrate how to add blur...

2 Days Ago
by Fillipuster Go to last post
2 113
Help

How to stop "models/rendertarget" material from refreshing on specific entity

I mean I need to pause the material on an entity while not effecting others.

2 Days Ago
by anka067 Go to last post
0 72
Lua

Sorry for the spam but I need help with animations.

Code: hook.Add( "PlayerSay", "PlayerEmotes", function( ply, text, public ) text = string.lower( text ) -- Make the chat message entirely lowercase local pl = self:GetOwner() if ( text == "/salute" ) then PrintMessage( HUD_PRINTTALK, ply .. "...

2 Days Ago
by Gmod4phun Go to last post
10 165
Help

Particles???

I been looking around on facepunch at all the "All you need to know about particles" and "so you want to learn lua" but not of them truely explain on how I could attach a particle effect onto a world model of a weapon, and I was wondering if anyone can...

2 Days Ago
by poepel Go to last post
3 245
Question

jobs.lua

my jobs . lua wont load and says Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 22. The best help I can give you is this: Right before the '}', Lua expected to read...

2 Days Ago
by Garnet Go to last post
5 185
Lua
2 Days Ago
by InvisbleMario Go to last post
4 131
Question

Where can i get a list of keyvalues for NPCs?

I haven't been able to find a list of keyvalues.

2 Days Ago
by figurez Go to last post
6 154
Lua

help with code for awp in pointshop

ITEM.Name = 'Awp' ITEM.Price = 35000 ITEM.Model = 'models/weapons/csgo_world/w_snip_awp.mdl' ITEM.WeaponClass = 'awp_gentleman' ITEM.SingleUse = false ITEM.Material = 'materials/awp/awp.png' function ITEM:OnEquip(ply) ply:Give(self.WeaponClass)...

2 Days Ago
by roastchicken Go to last post
8 134
Help

solved GarrysMod Lua | draw.Simpletext increase size?

Is there any possible way of increasing the size of a text? because oh my god, its small.. draw.SimpleText("Level: "..client:Health(), "DermaDefaultBold", 10, ScrH() - 480, Color(255, 255, 255, 255), 0, 0) how on earth, do I make the text displayed...

2 Days Ago
by roastchicken Go to last post
5 92
Lua

Need help with some code

Hello, I'm fairly new to coding in lua and coding overall. I've decided to make a script that works sort of like ulx I suppose just on a much more dumbed down scale and will only work with console commands though the code I've slapped together isn't...

2 Days Ago
by jacobcooper18 Go to last post
11 156
Help

solved Custom Box on screen? Help

Expierence.lua XPFUNCTION = {} if SERVER then function XPFUNCTION() local client = LocalPlayer() if !client:Alive() then return

2 Days Ago
by jacobcooper18 Go to last post
9 102
Lua

solved Override local vars?

Short question: Can I modify local vars in a function without overwriting the complete function? I don't care how complicated it can be.

2 Days Ago
by man with hat Go to last post
4 189
Lua

solved Any hook for when the server shuts down?

I have my own money system on my server. When the server loads it loads the file containing the money(s?) in this format: <steamid1> <moneyamount> <steamid2> <moneyamount> I need to make it so that when the server closes it saves all of the money...

2 Days Ago
by lvivtotoroyt Go to last post
2 110
Lua

Gamemode creation error : file not found

Hi world, I have started to create a custom garry's mod gamemode. I have create the basic stuff, and three lua files : init.lua, cl_init.lua and shared.lua. So far there is no problem but when i want to add a new file to my gamemode (i mean a lua file...

2 Days Ago
by Alpha_Dev Go to last post
3 104
Help

solved How do I make a certain ULX group spawn with a certain weapon?

How do I make a certain ULX group spawn with a certain weapon? I want my "vip" ULX group to spawn with a certain weapon, but when I use a loadout mod it just makes them spawn with what I set and none of the tools that their darkrp job should spawn with....

2 Days Ago
by cowslaw Go to last post
10 202
Help

solved GLua file contents to variable

Let's say I have a file, with "STEAM:000 csgo_some_wep", how can i read that file and turn "STEAM:000" and "csgo_some_wep" into vars? Or put them into. I assume you have to read the file in a var, explode it, with space as a delimiter? Also, I have a...

2 Days Ago
by ZombieKingAAA Go to last post
7 99
Help

DTextEntry Focus

Hello I am trying to capture the focus of the keyboard on a DTextEntry. However, I do know that you cannot focus unless you parent it to a "EditablePanel" which I have done. I will proceed with showing you my code. local PANEL = {} -- Called when...

2 Days Ago
by MPan1 Go to last post
2 94
Lua

Make a hook to open a VGUI?

I am comfused open making a hook to open this vgui this is what I have so far concommand.Add("!compliment", DermaPanel) hook.Add( "PlayerSay", "!compliment", function (ply, text, public) text = string.lower( text ) if ( text == "!compliment")...

2 Days Ago
by MPan1 Go to last post
2 112