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

solved {HELP} HUD using to much memory??

So I created a HUD and it keeps using WAY to much memory and makes me exit gmod to save memory... its only 47 lines of code! Anyone have any ideas why its happening? (I can post the code if needed)

4 Weeks Ago
by Dark Hood Go to last post
10 163
Help

Help with DurgzMod

Can't find why it says this, just loaded the mod please help addons/durgzmod/lua/entities/durgz_mushroom/shared.lua:89: bad argument #2 to 'Exists' (string expected, got no value) 1. Exists - :-1 2. fn -...

4 Weeks Ago
by Thane Go to last post
9 214
Help

Good way for "calculating" prop "modules"

Hello facepunch, I wanted to ask, if theres a good/easy way, to calculate prop "modules" as seen in some darkrp printer addons (sharprinter etc) like here: I basically want to do that too, but when I look at that code, I dont understand how they...

4 Weeks Ago
by thegrb93 Go to last post
6 261
Help

solved Need Help with adding Sound when the players health is at 25 and below ( 2 Last )

I have started to make some HUDs and i really wanna add some custom sounds to them i have tried for about 3 hours now trying to add some type of sound but nothing is working or i just keep getting errors like this oneCSoundEmitterSystemBase::AddSound(...

4 Weeks Ago
by Lavacoal123 Go to last post
44 749
Question

Regular Expression (shared) binary module for GMod

Wondering if there is any open-source one? I couldn't find any, so that's why I am asking. (So, I don't "reinvent the wheelie.") I could make one in C++ (which would use Boost) and then one in C# (System.Text.RegularExpressions)..

4 Weeks Ago
by Apickx Go to last post
1 119
Lua

Change weapon view model/world model

Hi, How do you change a weapon view model and world model (clientside) ? I tried this, but it seems to do nothing: local knife = weapons.GetStored("weapon_mu_knife") local gun = weapons.GetStored("weapon_mu_magnum") local defaultKnifeViewModel...

4 Weeks Ago
by Gmod4phun Go to last post
12 241
Help

opening map barriers

On rp_paraleake_city_v3 the barriers that stop people driving into the back of the pd require a script for them to work properly. This is what i came up wit first. function policebarrier() for k, v in pairs(ents.FindInBox( Vector( -8467, 9394,...

H4
4 Weeks Ago
by Melted Bu11et Go to last post
1 155
Help

solved Nextbot issue.

Hey guys so I've been working on this Nextbot and I've got it to work to the point I wanted to, but when I got a friend to get on and try and he did the thing that toggles the nextbot to chase you, but they never do, they only chase me. I don't really...

4 Weeks Ago
by Gmod4phun Go to last post
9 165
Help

Making custom HUD toggleable.

Hello! I've been working on modifying an old variant of TTT, call "TTT: Hitman Modification". The varaint comes with a custom hud, however if you add it it will be the default hud and no one can switch to the one they prefer. I was wondering what would...

4 Weeks Ago
by ncc360 Go to last post
15 300
Help

solved Timer in derma?

Hello. How can you put a timer in a derma menu? They do not draw every frame, so it doesn't work by putting a dLabel inside of it.

4 Weeks Ago
by overki11 Go to last post
2 90
Lua

Blue's Unboxing problem

hi i have a deathrun server and i have this addon : https://facepunch.com/showthread.php?t=1481681 and i install it and all and when i do !unbox or /unbox it dosent do anything and i searched at all the lua files and i still didint find, help ?

4 Weeks Ago
by Peach Go to last post
4 145
Lua

add snipers to places

hi i have deathrun server with this sniper addon : http://steamcommunity.com/sharedfiles/filedetails/?id=512052415 and i want to add it in spesific places in maps how can i do that ?

4 Weeks Ago
by Invule Go to last post
1 110
Lua

solved Learning how to make a hud - Help?

I have spent a day or two learning lua and how to make a simple hud for gmod, I have come up with this with one little problem, The healthbar shows up behind the healthbar background. The healthbar it's self is a Draw.RoundedBox and the background is a...

4 Weeks Ago
by Deception_ Go to last post
10 276
Photos

solved All the silkicons of gmod.

Finally! I have figured out how to get all gmod silkicons! How Ive' done it: I have done It with a program called GCFScape. Ive looked in the gmod directory and I saw .vpk files Then I opened them up with GCFScape and I saw materials folder I...

4 Weeks Ago
by man with hat Go to last post
2 191
School

solved Does Robotboy drive a ferrari? ( 2 Last )

http://i.imgur.com/FPz6KJh.png Virtual reconstruction of Robot's ferrari http://image.prntscr.com/image/5f96106624fa42cd8ac21a32ad504a32.png Ferraris We have real pics of his ferrari here Serious discussion, how many ferraris has garry given...

4 Weeks Ago
by Zelpa Go to last post
44 3,508
Help

Lottery using Float values help! (with math.random)

v: I have this setup, under for k, v in pairs(player.GetAll()) do but I don't know, how to mathrandom someone using this NWFloat LotteryJoin and then setting another float value to 1, so we can give him his winning points. It is a Lottery as you...

4 Weeks Ago
by Sir TE5T Go to last post
8 280
Help

Help with demotion on death.

Now I need a script that will demote the mayor when he dies (not just when he kills himself, when other player kill him too)

4 Weeks Ago
by crazyscouter Go to last post
1 104
Beta

Translators ( 2 3 Last )

Because of the recent influx of French players, and the already existing user base of players who don't have English as a first language, it might be useful to have a list of user who speak another language, who can be contacted if need be by people...

4 Weeks Ago
by brianm109 Go to last post
89 5,268
Help

Changing TOOL.AddToMenu of Default Tool

I need help trying to get the axis tool to not add to the tools menu without having to touch the sandbox game mode files. Currently I can by adding in TOOL.AddToMenu = false to the original axis.lua file in the sandbox game mode files, but how can I...

4 Weeks Ago
by whitestar Go to last post
1 85
Help

Last Innocent

im trying to make a script that says is the last innocent here is my code local function LastInno() inno = 0 for k,v in pairs (player.GetAll() ) if v:GetRole() == ROLE_INNOCENT then inno = inno + 1 end

4 Weeks Ago
by whitestar Go to last post
7 196
Lua

Easy Entity Help

I have a addon that i need help allowing the player who bought the entity (DarkRP) to be able to move it with a physgun, i would like this entity to be picked up only by the player who spawned it and can use the physgun on it. I have tried multiple tricks...

4 Weeks Ago
by whitestar Go to last post
6 216
Help

How to find corrupt of badly coded addons.

Can I have some ways to find badly coded or corrupt add-ons because I recently made a post on why my server is lagging and know that I know why....... (an Addon on my server is badly coded) I need to find a way to find out which one it is. Thanks to...

4 Weeks Ago
by gonzalolog Go to last post
3 187
Help

Entity Collision detect

I am attempting to make an entity "A" that accepts another entity "B" as "ammo" (They collide then the script inside entity "A" deletes entity "B" and reacts by adding blah to blah) However I cannot seem to get the collision to even register for...

4 Weeks Ago
by darkaaja Go to last post
2 142
Help

Lag issues

Ok, I have a server it gets around 30 players per day -max. I recently had the problem of lag. I found out that was due to the ammount of addons on the server. I fixed everything but I still don't have the ammount of FPS as most servers do. any help? ...

4 Weeks Ago
by RandyButter Go to last post
5 177
Help

How theses scripts can work ?

Hello, having a PropHunt server working on : http://steamcommunity.com/sharedfiles/filedetails/?id=417565863 I wanted to improve my server but I am stuck with 2 scripts : -The first script is for giving points when people taunt and give more points...

4 Weeks Ago
by Darkouille81 Go to last post
6 360
Lua

deathrun models

hi i have a deathrun server and i wanted to change the death model how can i do that ?

4 Weeks Ago
by code_gs Go to last post
1 99
Lua

Help With Wings And Hats Code

hi i want to add to my pointshop these wings : http://steamcommunity.com/sharedfiles/filedetails/?id=107165776 i try somethings and i still failed and i have this addon of hats and stuff and i want to add it to to my pointshop :...

4 Weeks Ago
by Invule Go to last post
10 358
Lua

cant equiq the model

hi i have a deathrun server and when im buying or someone else a model (from the shop) when we do equiq it dont do anything how can i fix that ?

4 Weeks Ago
by soosy Go to last post
5 128
Help

Help with a PlayerDeath script please.

Hi, so my script won't seem to work, no errors. Is there an issue? function GM:PlayerDeath( victim, inflictor, attacker ) for f, ply in pairs(team.GetPlayers(3)) do if ply:IsCP() then ply:ChatPrint( "Unit: " .. victim:GetName()...

4 Weeks Ago
by Matsumoto Go to last post
22 412
Help

How do some addons auto-DL their own content for players?

Occasionally I've seen ScriptFodder addons that simply require you to stick the folder in garrysmod/addons, and not add anything to your workshop collection, download.lua, or fastDL of any sort. How is this possible, and how is it done?

4 Weeks Ago
by The Commander Go to last post
5 218
Help

How to access gamemode content folder?

Hey. Don't understand how to access gamemode content folder. I have a custom vtf in the content/materials folder of my gamemode, and when I try to reference it in derma it doesn't work, just puts a missing texture.

4 Weeks Ago
by Kiro The Pro Go to last post
2 161
Help

Weapon destroy

Is there a way where I could add a Lua file to make it so people can type /destroy and their weapon disappears

4 Weeks Ago
by Kiro The Pro Go to last post
4 172
Help

solved Timer and rev entity

Hello? Facepunch. How to transfer to entity for timer function? And how to fix this error? function ENT:Boom(user) timer.Simple( 5, function() self:EmitSound("weapons/slam/mine_mode.wav") end) --string 95 local ef = EffectData()...

4 Weeks Ago
by godred2 Go to last post
7 166
Help

Creating an NPC ( 2 Last )

Hello, I was wondering how I would create an NPC, where when you interact with it, a menu pops up with information, I have no idea how to create the actual NPC and was hoping someone could point me in the right direction. I sort-of know how to create the...

4 Weeks Ago
by UnknownFusion Go to last post
74 1,324
Question

Drawing halos for one team

How can I draw a halo on members of team1, that only team2 can see?

4 Weeks Ago
by Gedo789 Go to last post
3 159
Tutorial

How to Create a Swep Spawn Icon.

Programs Needed: VTFEdit | http://nemesis.thewavelength.net/index.php?c=178 Paint.net | http://paint.net/ paint.net's .vtf | plugin http://nemesis.thewavelength.net/index.php?c=225&o=0 1. Take a screenshot of what you want your spawn icon to be....

4 Weeks Ago
by overki11 Go to last post
20 9,547
Lua

solved Applying Maths to a table value.

So i have some code that creates a txt file that contains info i need to save It saves it in Json format Example {"scrapMetal":1} I have a function to load the data and convert it back to a table but i cant then apply maths to it. How would i do...

4 Weeks Ago
by Zeus2 Go to last post
26 288
Steam

server community group

hi i have deathrun server and i wanted to do when someone type !steam he can join our community group and it will give him items and rank him up any idies how to do this ?

4 Weeks Ago
by soosy Go to last post
6 155
Lua

csgo knives disappeared

hi i have deathrun server with pointshop and when someone buying an knife from the shop It disappeared after one round and cant be equiqed anymore even if im doing holster and then equiq its still dosent work this is the code im using : ITEM.Name =...

26th July 2016
by soosy Go to last post
5 207
Help

How to allow Animations on StarwarsRP

Our Server runs ULX and we would like to know how to allow our players to use the console command, bind (key) "act salute". How do I go about doing this?

26th July 2016
by gonzalolog Go to last post
3 146
Help

Hud doesn't work on dedicated server?

I've created my own gamemode, with its own hud. I'm running it on my dedicated server for me and my friends to enjoy. So far there are no real gameplay bugs and we've been having tonnes of fun, but there's one little problem with the gamemode's custom...

26th July 2016
by KO #1 Go to last post
6 268
Question

solved Find point on other side of entity without tracing backward

Currently, I am doing weapon penetration by hitting an entity, advancing a set step size past it to find an empty point, then tracing backward to find the exit point of the entity. The problem is if a bunch of entities are stacked together, constantly...

26th July 2016
by code_gs Go to last post
3 163
Lua

Adding properties to custom gamemode

I'm working on a roleplay gamemode with a friend, and I was wondering how I would add properties? In other words, how would I add being able to own one (or multiple) doors?

26th July 2016
by LUModder Go to last post
1 125
Lua

solved Help me work on one of my first weapons?

Hi all, New to Lua coding here. I'm making a SWep that increases in power as the owner loses health. I want the damage of the weapon to be equal to 100 minus the player's current health. Currently, I have this coded as 100 - Entity:Health(). When I do...

26th July 2016
by Apickx Go to last post
4 152
Help

Loading screen music suggestions?

So recently I set up a community again and I set up the loading screen but I can't think of any songs to add to it, any suggestions? Because I want the music but I want it to be relaxing or hype with not too much talking, so any ideas?

25th July 2016
by Haina Go to last post
5 155
Lua

How to use LERP?

So I would like to know how I would add LERP to a hud Here is the code I used for healthbar hud health etc local hudhealth = LocalPlayer():Health() / 100 local healthBar = math.Clamp((LocalPlayer():Health() / 100), 0, 1) local armorBar...

25th July 2016
by Kiro The Pro Go to last post
3 223
Lua

Users can Grab Cars trying to fix

I run a darkrp server and i am trying to fiqure of on how to prevent users from grabbing any cars that are spawned using the vcmod car dealer or admin spawned in. if any player owns the cars they can grab them at will and i am trying to fix that to...

25th July 2016
by PhantomSniz19 Go to last post
0 88
Help

Creating a multi-prop entity

How would I create a multi-prop entity? I know how to easily make an entity out of a simple prop, but I am unable to figure out how to take two props and merge them to create a single entity. For example turning a simple tv entity into a full tv with...

25th July 2016
by darkaaja Go to last post
2 139
Lua

Save and Load data

Im making a zombierp server and i need to keep track of how much scrap metal someone has picked up. I need it to stay after the servers restarts aswell. Would it be a good idea to create a text file which keeps track of player names and amounts? If so...

25th July 2016
by Zeus2 Go to last post
6 224
Lua

solved HUD Kill Feed troubles

So I have this weird problem that I have been trying to work out for a couple of hours. I am making a kill feed. (going for something similar to this) Here is my code-- init.lua--

25th July 2016
by bosnian_cyco Go to last post
3 189
Lua

Scaleing Help.

I need some help with HUD Scaleing. I need to keep the positions the same aswell as keeping the size and look of the hud the same on any resolution. I have no clue on how to do this and I need some help. Here is a sample of some of my code. Thank you. ...

25th July 2016
by Syntax2056 Go to last post
15 316
Help

solved Pointshop 1 Playermodel restriction help

ITEM.Name = 'Police Chief v2' ITEM.Price = 5000 ITEM.Model = 'models/player/santosrp/male_02_santosrp.mdl' ITEM.AllowedUserGroups = {"superadmin"} ITEM.SubCategory = "Owner" function ITEM:OnEquip(ply, modifications) if not ply._OldModel then...

25th July 2016
by C.Finley Go to last post
0 84
Help

Pointshop 1 - Give Entity problem

Hi, I need to give weapon attachments without the spawn of a box in which they are. Please help I have tried to do so: ITEM.Name = 'AK-74 - Barrels' ITEM.Price = 50 ITEM.Model = 'models/Items/BoxMRounds.mdl' ITEM.SingleUse = true

25th July 2016
by maximaler Go to last post
0 80
Help

[ERROR] lua/giverandom.lua:205: attempt to call method 'Give' (a nil value) 1. unknown - lua/giver

So basically, I am trying to make a command that gives me a random gun from a predefined list, but whenever I run it, it gives me this error: lua/giverandom.lua:205: attempt to call method 'Give' (a nil value) 1. unknown - lua/giverandom.lua:205 ...

25th July 2016
by skullorz Go to last post
20 555
Help

UGENT! Server Problems (No inventory Pickup, Can't spawn in weapons)

Sooooo for some reason, on my server none of the superadmins can spawn in weapons, neither can I. And My inventory system are gone. I have an active playerbase of 30 people per day and I can't loose that by having this on my tail. So please I need all the...

25th July 2016
by Noi Go to last post
5 218
Help

Need help with swep

Now that we have that out of the way I am having trouble making my first swep and I was wondering if anyone could help me. My only real problem is the swep acts as a gun though I was trying to make it act as a melee weapon and it even is held as a pistol...

25th July 2016
by Shenesis Go to last post
1 103
Help

Easily accessing serverside values clientside

Hi. Does anyone have some advice on how to easily access serverside values from clientside? As in, being able to view them without the ability to modify? An (obvious) example of this is Health and Max Health, you can see both with Health() and...

25th July 2016
by bigdogmat Go to last post
6 245
Lua

Entirely horizontal bullet spray?

So recently I learned that bullet.Spread is usually a vector value. I thought that I could easily manipulate it to achieve a certain effect I've been looking for, which would nicely compliment my newest weapon base. The problem is, however, it's...

25th July 2016
by rayrifle Go to last post
4 207
Steam

How can i upload my mods to steam

Hi! i make a gamemode for Garry's mod and i wanted to ask how can i upload it to steam workshop thanks :D

25th July 2016
by MPan1 Go to last post
5 225
Question

How do I set spawns up to face a certain direction for each spawn?

Currently using DarkRP When I do "/setspawn (job command)" in a certain location facing a certain way, when you respawn, it just faces one direction for each spawn you set. So when I set a spawn, each spawn you set all face one direction for each...

25th July 2016
by StaticXNation Go to last post
0 90
Help

TTT Hooks

I was wondering if there is a website where i can find all of the ttt hooks. PS http://ttt.badking.net/ doesn't have all of them

25th July 2016
by code_gs Go to last post
1 128
Help

you are unable to /demote

For some reason, I can't demote anyone on my server which I need to know how :( Sorry If I sound like a noob, I'm a beginner in some things, not all tho. So all I know is when I try to demote someone, it says "you are unable to /demote" Thanks to...

24th July 2016
by RandyButter Go to last post
3 162
Shitpost

solved UnMakePopup? Is it possible?

Hi, is there way to make DFrame not MakePopup?

24th July 2016
by Koji6ac9H Go to last post
6 263
Question

solved Find water's surface with trace

How can I find where air changes to water and vise-versa? I tried using a combination of trace masks, but I couldn't find anything that would void out empty space.

24th July 2016
by code_gs Go to last post
4 174
Lua

Need Help With Derma Panels! And Net Libraries

Im trying to get a derma panel to open with a chat command! I cant seem to get it to work. FYI(I am running a dedicated server with the DarkRP gamemode. Also i have VERY little knowledge about lua coding itself. I am trying to learn more so please no...

24th July 2016
by PureCTRL Go to last post
8 254
Help

solved HUD Help (Again)

Hello FacePunch, I need some help coding a HUD. I released some code that I later decided to scrap because it was a bulkey design. It is now one bar. I am needing to invert or reverse the animation of which the armor bar increces and decreses when the...

24th July 2016
by Syntax2056 Go to last post
6 180
Lua

Worldmodel Bodygroups Broken.

I'm not really sure how to even explain this bug, so here's a video and my code. Code function SWEP:DrawWorldModel() if CLIENT then self:DrawModel() self:SetBodygroup(1,self.ShieldGroup)

24th July 2016
by code_gs Go to last post
3 130
Lua

solved Protect my code?

If i've created an addon and sell it to a customer on PayPal, and if i'm scared that he is going to sell it again for more. Is there a way that i can do so he is not allowed to resell it. Please help. :)

24th July 2016
by typedef state Go to last post
1 109
Help

solved MOTD Edit Help

I want to edit the code of the MOTD to make it open it after a set time on a loop. I've tried adding a "for do" and "simple timer" but none of these worked. Here's the unedited version of the MOTD. Thanks! ulx.motdmenu_exists = true local mode...

24th July 2016
by Noble Atticus Go to last post
2 133
Lua

solved Need some HUD help.

I need some help with antialiasing this HUD and Scaleing it propperly insted of the way it is being scaled now. Scaleing works but doesnt at the same time. The HUD code will be below. --SNIPCODE--

24th July 2016
by Syntax2056 Go to last post
6 157
Lua

dont see the model

hi i have deathrun server and i was trying to change the death model with this code : i removed this code from init.lua : ply:SetModel( mdl or table.Random( rModels ) ) for this code : if ply:Team() == TEAM_RUNNER then ply:SetModel( mdl or...

24th July 2016
by soosy Go to last post
10 159
Help

solved Turbostrois for linux server

I have server what is running on linux. i want players to driver train. Metrostroi trains are so detailed that when i spawn one train with three waggons server dosen't lag. But when 2 trian is spawned server starts lagging. Turbostroi is lua file what...

24th July 2016
by GXsakuboy99 Go to last post
4 150
Lua

solved Strange issue regarding particles

Hello, em... so I've tried to make particles for the first time, basically, and while I thought that I got it, something strange happens. I've made a rain effect which, upon start, starts to go off every 5 seconds and go on again. Here's a video: ...

24th July 2016
by typedef state Go to last post
6 110
Help

Adding custom weapon information to corpses?

Hi! I was wondering how to add information to corpses for custom weapons in TTT. I've noticed how Radar, disguiser, and body armor would show up when you checking the body. Saying something vague like "This person had technology that would hide his...

24th July 2016
by markusmarkusz Go to last post
1 124
Help

Custom Money Printer Help! URGENT!

So i am fairly new to lua scripting and id like to know more about it. But before that... I need some help with this error im getting. I would like a quick response please! And i dont want details on how i can learn to do it i just want to know whats...

24th July 2016
by VoXBox Go to last post
22 334
Help

Using Next() in lua. Help with for loops and spectator function.

I've been trying to figure out how to go the the next active player in a table using various loops and functions. I have a networked spectate function made which is activated by a button press on the client in a derma menu. The client button click...

24th July 2016
by typedef state Go to last post
7 239
Help

solved Need a log error solved!

Hello! I am a developer of a CW:HL2RP Server. I have an issue where in my server logs it shows this error } Calling GetCollectionDetails Response missing: {

24th July 2016
by typedef state Go to last post
1 117
Lua

SQL to MySQL issue (MySQLOO) Need help

Guys I don't understand what is the alternative for sql.Begin() and sql.Commit() in MySQLOO, can someone explain to me what can I do to replace them? Is it really needed or does MySQL works with them? Thanks for reading (Rated dumb on the way I bet) ...

24th July 2016
by typedef state Go to last post
3 141
Lua

F4 Menu Error

gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:27: attempt to call field 'toggleF4Menu' (a nil value) 1. Call - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:27 2. unknown -...

24th July 2016
by Klaes4Zaugen Go to last post
5 230
Help

Help with Basic GLua

Hi there, I'm currently learning to code lua, but I'm slightly stuck on how to get the GM:PropBreak to detect the prop broken. Here is my code: local function PropBreak( client, prop ) chat.AddText(client, " just broke the prop...

24th July 2016
by MPan1 Go to last post
7 180