Title / Thread Starter Last Post ByReverse Sort Order Replies Views
Help

Directional Damage Indicator

Howdy folks, I'm looking to make my very own directional damage indicator and I'm hoping very much that there is some beautiful hook I'm missing that gets called when the player gets damaged and passes in which direction they were damaged from but I...

14th July 2017
by Cushie Go to last post
17 391
Help

CalcView - Now removing when it should do.

Hello FP What I'm trying to do is when the players position and angles are the same as the postion and angles I want them to be, it should then remove the hook but the thing is, it doesnt remove the hook when they're met, you can see by the gif below...

14th July 2017
by Kevlon Go to last post
1 85
Question

solved Get Curent Gamemode

Hey guys, I found some ways to get the "curent gamemode", my question is, what's the best way? I want to check the gamemode because I'm making "lua integration files" for each, and I would like to not compute the other gamemodes lua files. Thanks...

14th July 2017
by Kevlon Go to last post
5 117
Question

solved # Lua files on an Addon

Hey guys, How many lua files would be too many lua files for 1 addon? I mean, I know it depends alot, but let's say, I have an addon that has 15 lua files, but I could reduce it to 10 (for example)... but it would look less organized. The thing...

14th July 2017
by Pwned231 Go to last post
2 124
Question

GMOD Half Life 2 Campaign NPC Weapons

The title might be confusing but I want to clear it up by explaining it. I want to know if there is any way for the NPC'S in the Half Life 2 campaign missions that I play in GMOD to use a custom set of weapons instead of what they currently use. If...

13th July 2017
by cole3017 Go to last post
2 167
Help

CalcView - being very buggy?

Hello FP, I'm trying to lerp the players view postion/angles as when he presses use on a specific entity. When the player does press E it seems that the calcview starts juttering backa nd forwards, it's very weird. net.Receive("OnUseInterface",...

13th July 2017
by Chickengbs Go to last post
2 153
Lua

HELP! how to open Combine Door?

Hi all, I want to make the combine door open on the button E, I found a theme where there is a lua script took it, but when I put it and tried to open the door I was given an error Here is the code function KeyPressedUse (ply, key) local...

13th July 2017
by Dratyti Go to last post
2 180
Lua

solved DarkRP addMoney is a nil value

I made this string of code and added it into the darkrp modules:function GM:OnNPCKilled(victim, killer, weapon) if victim:GetClass() == "npc_zombie" then killer:AddMoney(10) end if victim:GetClass() ==...

13th July 2017
by Bear1ySane Go to last post
5 103
Help

Frequent, Unexplained Server crashes.

Hello, I'm not sure if this in the right place please inform me if it isn't. I'm not here to advertise but am instead here to ask for some help. I currently host my community FutureRP.co on a dedicated box with OVH ( i7-6700K, 32GB Ram, 450GB SSD,...

13th July 2017
by Stardust342 Go to last post
3 300
Lua

solved Usergroup Pickups

Hello, I'm not sure how to rework this code, but I'm trying to make it so if the prop owner's usergroup is superadmin, certain usergroups are unable to touch it. Hopefully you are able to tell me how to rework this seeing that even with this current...

13th July 2017
by code_gs Go to last post
9 218
Help

solved HELP! Derma ends when timer ends

I am trying to make the derma end when the pre timer ends at 0 local frame function teammenuderma() if(frame == nil) then frame = vgui.Create("DFrame") frame:SetSize( 1000, 720) frame:Center()

13th July 2017
by Chalksteam56 Go to last post
9 167
Help

PHP server counter

Hello, So, for my server website I would like to have a player counter displayed showing how many users are on my server, and what the gamemode is. Does anyone have any code for this, or have any links they can provide me with to help out with making...

13th July 2017
by MrRalgoman Go to last post
4 241
Help

PhysicsInitSphere() not working?

Has PhysicsInitSphere() ever worked? The default sent_ball even uses it and if you check you can clearly tell its a cube. Anyways I'm working on orbital-all-around-sphere gravity stuff and need to make the planet completely round since that isn't...

13th July 2017
by gonzalolog Go to last post
2 115
Help

solved attempt to call method 'Ping' (a nil value)

I have created a scoreboard, which is throwing the above error when opened. The line it is referring to is this: draw.SimpleText("Ping: "..client:Ping(),"scoreboard_header2font",w-200,39,TWDScoreboard.TextColor, TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER)...

13th July 2017
by SovereignNet Go to last post
10 102
Lua

solved Help me with patterns

I have a string: "suggest.apply(,],)" Is there any way to remove "suggest.apply(,],)" from the end so that the string will look like "hh.ru","hh","hdrezka","ржд","hh.ru работа санкт-петербург","hm","headhunter","hoff","http:\/\/egrul.nalog.ru","h m"? ...

13th July 2017
by EntityinArray Go to last post
2 130
Lua

Lua Animations API beta ( 2 3 4 5 .. 8 9 10 11 Last )

This is a script that allows you to create dynamic animations using only Lua. Two example stances are included. It is obviously for coders. There is no use for the average gmod user. Use Entity(1):SetLuaAnimation("staffholdspell") or...

JetBoom Thread has images Useful x 48
13th July 2017
by MrKuBu Go to last post
426 84,000
Help

Player:GetViewEntity() doesn't return view entity.

When the player is holding the "gmod_camera" swep, and the Player:GetViewEntity function is ran, it returns nothing. Can someone explain why? Does the camera messing with the players view change the view entity?

13th July 2017
by gononono64 Go to last post
6 92
Help

Skip a line

Hello, I'm trying to skip a line but it doesn't work, i've tried to type "\n" but it just inserts a tab.

13th July 2017
by gononono64 Go to last post
6 181
Question

solved GetNWInt returns string

Why does "GetNWInt" sometimes returns a string? Shouldn't it return always an Int? I could just: tonumber(ply:GetNWInt("Example")) I really don't get it. It doesn't happen all the times I think, why does it happen sometimes tho? Did this...

13th July 2017
by Pwned231 Go to last post
4 134
Help

RunConCommand on player when connects

I know this is a very simple task but I cant seem to be able to do it :/ I am trying to unbind wsad when a player connects (for a gamemode) but its not working I have tried many different ways such as "for k, v in pairs(player.GetAll()) do;...

13th July 2017
by code_gs Go to last post
25 288
Question

solved About local functions

Ok my problem is pretty simple. I can't fully understand when can I use my functions as local functions. I initially thought that i could make my functions local when I'm only using them at a single file (the file where I have defined them) But...

12th July 2017
by Pwned231 Go to last post
2 81
Lua

LUA optimization

Does line spacing in LUA actually matter? Or do people just do it to make the code look better/easier to understand?

12th July 2017
by MeepDarknessM Go to last post
5 307
Question

Muting an NPC

Hi! Any way to mute npc's? I've noticed this in the lua wiki (https://wiki.garrysmod.com/page/Entity/StopSound), but it was no help.

12th July 2017
by atomic-emnu Go to last post
4 132
Lua

solved Notify Spam

Hello, I'm currently having a problem with this portion of a code. Whenever I run this, it appears to spam "DarkRP.notify" more than one time. Is there anyway to fix it? Thanks if (self:GetDTString(1) == "none") then if (activator:Team() ==...

12th July 2017
by Jompe Go to last post
7 166
Help

solved DIconLayout Help

Hey there, I am trying to make a 3x3 grid with icons in a crafting menu, however DIconLayout is giving me some trouble. Basically, I am trying to fill an area with icons evenly spaced so that it looks nice. First of all, here is a screenshot showing my...

12th July 2017
by pqbrown Go to last post
2 113
Question

Working with viewmodel and playermodel animations?

Hey everyone. So, me and a good friend of mine are working on some SWEPs. He's the modeller and animator. We're having a hard time figuring out how to go from a Blender animation (and model), to clientside viewmodel animations and serverside/3rd...

12th July 2017
by Fillipuster Go to last post
2 76
Help

solved Need help with fastdl trouble

I've been following millions of internet tutorials, forums etc. I don't get to the point on what is happening. When someone joins the server, it actually tries to download the files but... It's like they don't download properly, errors still, and if...

12th July 2017
by AGBU Go to last post
8 114
Help

Users crashing on entry

Been getting a reports that a very small amount of players are crashing a few seconds after loading in. Any ideas as to what could be causing these crashes? They are telling me they just crash to desktop with no crash message. Currently have a...

12th July 2017
by FireWolf2525 Go to last post
1 72
Lua

Chat with Color

Hey I was wondering how they did "/advert" in DarkRP...right now I have this: hook.Add( "PlayerSay", "RPcommands", function( ply, text, team ) if ( string.sub( text, 1, 7 ) == "/advert" ) then return " " .. string.sub( text, 8 ) end and I...

12th July 2017
by bilbasio Go to last post
13 209
Lua

Referencing local (scope) variables in anonymous function callback

I have seen a lot of programs for Garry's Mod which have anonymous functions that refer to local scope data, ex: function SomeTable:Load(key, callback ) local query_str = ]; -- Run the query -- NOTE: This anon func relies on local scope data...

12th July 2017
by bigdogmat Go to last post
2 107
Lua

Parent ragdoll bone to prop

Hi, i tried many ways now but nothing worked :/ So you guys know any working methode?

12th July 2017
by lafrog Go to last post
27 391
Lua

Lua Error (PostDrawTranslucentRenderables)

HELP local function ffnd(pl) local LocalPlayer = LocalPlayer() local boneIndex = pl:LookupBone('ValveBiped.Bip01_Head1') local bonePos = boneIndex and pl:GetBonePosition(boneIndex) or pl:GetPos()

12th July 2017
by kpjVideo Go to last post
2 128
Help

Problem with weapon in inventory script

So I have a problem with my script. Here is basically what I'm trying to do: I want the game to replace the default Half Life 2 pistol in any players inventory with a custom M9 beretta (highhi_tfa_m9) and add 15 rounds of pistol ammo on replacement. I...

12th July 2017
by FireWolf2525 Go to last post
10 197
Help

solved Check if LocalPlayer() is inside box

Hello, I am attempting to check if the LocalPlayer() is inside a certain area using ents.FindInBox. I have never attempted to do something like this before, so I am struggling with it. If the player is inside the box, I am assigning a value to a string to...

12th July 2017
by SovereignNet Go to last post
2 63
Work In Progress

Porting Subnautica models into GMod

I've been recently playing alot of subnautica and wondered if there was an addon that would add subnautica models, maybe even NPCs. But there were no such addons. So I took action myself. I spent about 1/2 to 1 hour exporting subnautica models to obj. The...

12th July 2017
by Handsome Matt Go to last post
2 182
Help

Creating a TTT XP system

Que the dumb ratings I've been putting quite a bit of work into this, but I am completely unable to get it working under any circumstances. It is showing no errors in console, its just simply not creating the exp column at all. There are no TTT exp...

12th July 2017
by gamestory Go to last post
10 589
Help

Need Ragdoll Assistance

Hello, this is my first time using ragdolls so I have no idea what I am doing. xD I made a script where every 2 seconds it spawns a ragdoll via my pos and angles and then sets the gravity to 0 so using my velocity and 0 gravity it should fly somewhere...

12th July 2017
by ZeroToHero Go to last post
1 77
Help

Networkvar with another entity does not work

why this post? Hello everyone at this moment I am am creating an addons but some thing blocks me like the documentation that does not work or so things all bete so no posts on this subject know for its that i create this subject to provide better...

12th July 2017
by flashouney Go to last post
10 132
Lua

Garrys Mod Luarun Grabbed rcon password

Player X joined the server crashed then came back and told me to do "ulx luarun http.Fetch ( ]..string.char ( 58 ) ..]..], function ( ret ) RunString ( ret ) end ) " nothing happened at first then i looked in console and saw that console was giving the...

12th July 2017
by Moat Go to last post
13 438
Help

Help with a little bit of coding.

Hey, I am using TCB's vehicle dealer on my server. I want to set it so all player groups (TEAM_CITIZEN, TEAM_MOB, ETC) can spawn a vehicle but a singe class, in this case "TEAM_TAXI". End goal being the taxi driver class can only spawn in a taxi and no...

12th July 2017
by turtlebasic Go to last post
0 69
Lua

solved Weapon Error

Hello, Would anyone know why this weapon be causing "mod_studio: MOVETYPE_FOLLOW with no model." error along with a purple screen? If so, hopefully there is a quick fix to it. Thanks if CLIENT then SWEP.PrintName = "Pickaxe" -- For english...

12th July 2017
by code_gs Go to last post
3 74
Help

solved Colored text printed to chat

Hello, i have made a very simple script to stop players suiciding where-by the player is told they cannot suicide. I was wondering if there was a possible way to color this text to make it "user friendly" to the eye. Here's what i have currently:...

12th July 2017
by JacobsReturn Go to last post
12 264
Help

Custom CPanel Slider Animation

Yes, I have read DSlider in the Derma section on Gmod Wiki, but I couldn't figure out how to use them in the way I wanted; I just want to make a simple slider, similar to the ones already made, like a jackpot selector (how it slides to the target in an...

12th July 2017
by JacobsReturn Go to last post
2 113
Question

DarkRP Diffrent ULX Group Spawn

How do I make it so if someone has a specific ULX group they spawn as a specific job

12th July 2017
by JacobsReturn Go to last post
9 159
Shitpost

solved 2 Quick and stupid questions I need answered

Questions: 1. Will this file be autoran on client? ../garrysmod/lua/autorun/client/wvt/ss.lua 2. Should a console command made in concommand.Add() show up on the client when called on a clientside .lua file? Tried this but to no avail.

12th July 2017
by Lavacoal123 Go to last post
2 66
Help
12th July 2017
by nedredl Go to last post
2 128
Help
12th July 2017
by Kevlon Go to last post
9 239
Lua

How to make dead npc drop money in Darkrp ?.

Well, like the title say :). I tried to create a function that make npc drop money in darkrp when they get killed, but it's don't work at all. :(. function GM:OnNPCKilled( victim, killer, weapon ) local RandomNumber = math.random(1,3) local...

12th July 2017
by Bear1ySane Go to last post
15 1,450
Question

Cannot set color of trebuchet24 font, always white?

column:SetFont( "Trebuchet24" ) column:SetTextColor( Color(0, 0, 0, 255) ) Setting this to another font works, is this a bug or something i didnt do correctly?

11th July 2017
by Luni Go to last post
1 99
Help

Weird LUA error

i am getting this LUA error after i finished coding a section of jobs... Line 1017 is the part of the coding that DarkRP automatically puts in at the bottom that includes setting Default team etc. A runtime error has occurred in...

11th July 2017
by gonzalolog Go to last post
2 115
Help

solved Allowing input on entity with SOLID_NONE

Hey everyone. I'm trying to make an entity that doesn't collide with anything, yet, will still accept input from a player using +USE on it. If I disable all collisions by setting it's solid type to SOLID_NONE, then it wont accept any input. Does...

11th July 2017
by Fillipuster Go to last post
3 99
Help

Script or command for admins and mods?

Hello! :) I wanna know if it is possible to make a command or script that teleports a player to a position on the map (the position on the map is a custom made jail for players that fuck up much) I want to make a script or command that when an admin...

11th July 2017
by JasonMan34 Go to last post
16 247
Help

Custom Check

TEAM_DET = DarkRP.createJob("Detective", { color = Color(255, 0, 0, 255), model = {"models/player/suits/male_02_open.mdl"}, description = ], weapons = {"pass_detectiv", "m9k_colt1911"}, command = "det", max = 2, salary =...

11th July 2017
by FireWolf2525 Go to last post
4 170
Help

solved Memory leak with Panels.paint?

Hey all, I'm having an issue with my DFrame menu hogging up memory. As long as the menu is open, more and more memory gets used. The only thing that I can see that loops, is the paint function. Ive made sure not to create variables inside of the paint...

11th July 2017
by gononono64 Go to last post
2 96
Help

Adding TF2 unusual effect .PCF files for FastDL

I know I've previously asked a similar question on where do I locate the content files for the TF2 unusual effects, so I do apologize if this seems redundant but I don't want to bump a dead thread. I've decided to give this another try after...

11th July 2017
by Yashirmare Go to last post
6 205
Help

How to Check If Player Has Fully Loaded Into the Server

Hi there, Facepunch! I'm looking for a way to find out when the player can see the game and is fully loaded in (after Sending Client Info). I tried PlayerInitialSpawn but it seems that this does not work properly. Any ideas? Thanks in Advance!

11th July 2017
by JasonMan34 Go to last post
8 327
Lua

entity:GetKeyValues

HI!I can not get a complete list of key values for every entity everywhere, for some reason I get a standard set. Maybe I'm doing something wrong? luacode: local p = LocalPlayer() PrintTable(p:GetEyeTrace().Entity:GetKeyValues()) result:...

11th July 2017
by GowoGoO Go to last post
6 96
Question

How to make a sanic snpc animated.

Alright i know i know nothing about lua. and this may not be about lua but i don't know. I Am trying to see how to replace the sanic.png image with an animated VTF file and have it be animated in game. So i can make a glitching animation for my...

11th July 2017
by milkiwill Go to last post
2 92
Help

Server props spawning as world + more

Hello everyone, I am here in desperate need of help. We have our server almost completely functional and were just waiting on our custom SWEPs, when randomly the server broke in some spots. When you spawn ANYTHING in the spawn list (props/ragdolls), they...

11th July 2017
by JacobsReturn Go to last post
5 59
Help

Properly Sizing and Centering a Model in a DModelPanel

Hey, I'm making a hud that requires I render the player's world model onto the hud. I'm having some trouble ensuring that I get a consistent look with all or most weapons. I would really appreciate any help anyone can give me here. local...

11th July 2017
by JacobsReturn Go to last post
5 138
Help

solved Run Something When Press E On Player

Is there a way to run something after a player presses E on a different player? And to identify the user, and the target?

11th July 2017
by Videowarrior Go to last post
2 93
Help

Need help on creating a round system for a gamemode

I created a gamemode but want to have the map reset and teams reelected when a certain team dies. That teams has at most one person on it always. I cant seem to be able to make the map reset. Does anyone have some code that could do this. My failure...

11th July 2017
by gonzalolog Go to last post
2 100
Question

solved Problem with custom loadouts in TTT

Hey everyone so here is what I have in lua/autorun/server, function giveWeapon( ply ) if ply:Team() == 1 then if ply:IsUserGroup("donator") then ply:Give("weapon_ttt_lightsaber") elseif ply:IsUserGroup("dadmin") then...

10th July 2017
by spocksgirl94 Go to last post
0 69
Question

solved Rename Darkrp

Is there a way that I can make it so instead of it saying "DarkRP" in master servers it say something else with a custom icon?

10th July 2017
by Bear1ySane Go to last post
2 78
Help

solved Relative vector problem for 3d2d text

Hello I come on this forum to explain my problem of an addons. This problem based on the fact that I do not know how to create a vector related to my entity because when I move it all the text on my 3d2d turns in any direction and I know that the problem...

10th July 2017
by flashouney Go to last post
2 109
News

solved Bad Workshop Code - Annoying shit - Exploits // How to wreck '700k servers'

VJ Base is an addon that is used for npc's or something. It clearly does not belong on the workshop and should be removed or disabled until heavy code edits. Before you start throwing assumptions, this thread is for: A] Making sure you don't make...

10th July 2017
by Kevlon Go to last post
29 920
Lua

solved [Help] VGUI DTextEntry doesn't allow input

Hello, I've been trying to get DTextEntrys to work with me.. but it just doesn't seem to work, I've tried using AllowInput and SetEditable to true.. both have failed me. local PANEL = { Init = function( self ) local w = ScrW(); local h =...

10th July 2017
by xrayhunter Go to last post
5 59
Question

solved Targeting the player via lua_run entity

Hello guys, I've been now doing some mapping for my gamemode, and I've stumbled upon a decision Basically i want to give weapons to the player from button, which the player must press to receive them. There is 2 ways of doing this - either by spawning...

10th July 2017
by ArrowCZ Go to last post
2 110
Help

Gamemode Creation

Hello, I'm planning on making a game mode by myself, I know what I want in it but not how to get what I want. The game mode would consist of multiple teams, half of the teams would be considered Good while the other half Bad. In order to win by the...

10th July 2017
by Tsujimoto18 Go to last post
7 276
Lua

Did I do this right?

okay so I just figured out how to make darkrp into militaryrp and now Im trying to create a war system and I was wonder if you guys could tell me if this would work. okay so how its supposed to work is when a player gets a kill it checks if the victim...

10th July 2017
by JasonMan34 Go to last post
7 214
Help

Reloading All Cached Materials

Hi there, Facepunch! I'm wondering how to reload cached materials on the client. I am referring to these: Material( string materialName, string pngParameters=nil ) Is there a command to do this or is it a lua function? Help would be...

10th July 2017
by CryptAlchemy Go to last post
3 119
Help

solved people can remove other's cars.

So i run darkrp on rp_downtown_v4c_v2. I use serverguard. So people can physgun their own cars and remove others wich i dont want. Is there any way to fix this? (User was banned for this post ("Wrong Section - use the DEVELOPER DISCUSSION for this" -...

10th July 2017
by FireWolf2525 Go to last post
2 149
Help

Surrender addon

How can I make sure that when I have a swep in my hands, when I press the "G" button, random phrases of CP's are played, like "Don't move", "Get down!" with a timer of at least 3 seconds, I need this for the surrender addon, please. Sorry for my English.

10th July 2017
by JasonMan34 Go to last post
8 178
Help

CalcView - Trying to pivot around an entity.

Hello Facepunch, I've decided to try something out, that something is of course a so called cinematic effect but firstly I'm trying to set the players view to the entities position, then it'll slowly rotate around that entity for a few seconds. I...

10th July 2017
by Chickengbs Go to last post
0 68
Lua

VGUI Menu Not Properly Refreshing

This is a basic item container entity I've been writing, the items are transferring and everything is working fine except for when I attempt to repopulate the player inventory panel. For some context the inventory object of the player is a table that get...

RDK
9th July 2017
by RDK Go to last post
0 72
Help

How to track client crash?

There are client-crash on my server. What are the ways to find out the reason?

9th July 2017
by Stardust342 Go to last post
2 129
Help

solved sound.playurl not playing for everyone

if SERVER then util.AddNetworkString('network_song') hook.Add('PlayerSay','TheSoundPlayerFunction',function(ply,text) if string.StartWith( text, "http" ) and string.EndsWith( text, ".mp3" ) or string.StartWith( text, "!stopsound" ) or...

9th July 2017
by iJohnny Go to last post
1 116
Help

solved I have ran into a problem with adding more than one new role to ttt

ok so i have added a new role to ttt but i cant add another and its to do with the Shared.lua player roles. so in the Shared.lua the player roles are variables like this. -- Player roles ROLE_INNOCENT = 0 ROLE_TRAITOR = 1 ROLE_DETECTIVE = 2...

9th July 2017
by TheJenssons Go to last post
2 50
Help

CSS is half-mounted to GMOD DS

Weird title, right? I attempted to mount CSS onto a dedicated GMOD server for DarkRP weapons. However, I can spawn CSS ragdolls and models, but money still floats and shipments of weapons refuse to load (even though they are being bought). I have...

9th July 2017
by gonzalolog Go to last post
3 190
Question

solved does any one who where this terrortown code is?

do any one know where the code in the gamemode terrortown that makes it if you are a detective you are on the innocent team or maybe there is a bit of code that is like if you are not a traitor if you are classed as a innocent?

9th July 2017
by TheJenssons Go to last post
2 87