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

Finding an Entity

What I'm having problems with is that I just can't 'find' the entity near the player. My current code: function checkforEnt() if ents.FindInSphere() == "item_ammo_357" then print( "TRUE" )

4 Weeks Ago
by MrKim Go to last post
3 70
Help

Model on DermaPanel?

So I am trying to add a model to the dermapanel, but it is not showing up once I add it to the DermaList (DPanelList). Once I remove it from the list it shows up, is the dermapanel cutting it off? Here is my code: local PistolModel = vgui.Create(...

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

Assistance with Errors!

I have been looking through my code for a while now and have no idea why this code is getting errors. The Code: init.lua: AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" )

4 Weeks Ago
by ShadowHedge Go to last post
3 93
Help

solved derma error on inital server load

So I created another file specifically for a derma menu I've been working on in a a test gamemode folder and upon launch , although the derma loads perfectly fine , I'm getting this error with the initial load of the server . Here's the error: ...

4 Weeks Ago
by SeltWarfare Go to last post
2 34
Lua

Overlaying metallic texture/ manipulating materials.

I have been messing with overlaying materials on player models, as the Gmod API function for setting a player's color doesn't function correctly. I was wondering if it's possible to do more than just overlay a transparent texture, adding to the texture...

4 Weeks Ago
by GModKitty Go to last post
3 88
Help

solved Derma button Help

Hey so I have a Derma menu I need multiple buttons on, but I cant get a second button. My files are below cl_init.lua: include('shared.lua') function ENT:Initialize() self.Color = Color( 255, 255, 255, 255 )

4 Weeks Ago
by Breadcat105 Go to last post
6 82
Help

Pointshop Perma-Weapons in Deathrun

So in Deathrun I have these CSGO knives which you can buy on pointshop but for some reason when your on the death team you don't spawn in with it. Even if you attempt to re-equip it nothing happens. Here's one of the knifes code: ITEM.Name = '★...

4 Weeks Ago
by DubyaDude Go to last post
2 67
Help

Disabling +use

I have a DarkRP server, and I want to prevent people from AFK Farming on printers. I was wondering if there was a way to disable +use or do something else to stop AFK Farming?

4 Weeks Ago
by 274112 Go to last post
3 162
Lua

solved DarkRP Update

Hey so i was asked to help a friend build a server he has alot of things precoded by someone else im just cleaning up and adding new things. Now i believe (with my minimum experience) that his version of Darkrp is outdated how can i be sure and will it...

4 Weeks Ago
by BJOLER Go to last post
2 94
Lua

Activating doors and such in Prop Hunt V2

Hello, I have set up a server with Prop Hunt V2 from scriptfodder Link: https://scriptfodder.com/scripts/view/148 To me it was a revolutionizing version of prop hunt since it features real physics and looks much more professional. I got but 1...

4 Weeks Ago
by Erik The Born Go to last post
2 60
Stupid

Making a gun that shoots an entity which latches onto a player?

How would I go about to make a weapon that could shoot an entity and that entity would stick to a player if it hit him. I literally have no idea where to begin so any links to anything useful would be greatly appreciated.

4 Weeks Ago
by Cushie Go to last post
1 75
Lua

SWEP help.

AddCSLuaFile() -- SWEP Info SWEP.Author = "Andromeda" SWEP.Category = "Andromeda SWEPS" SWEP.Base = "rg_base" SWEP.Purpose = "A reliable side arm" SWEP.Instructions = "Pull the trigger and rekt." SWEP.HoldType = "pistol"

4 Weeks Ago
by Borris_Squad Go to last post
2 68
Help

BSP to GMA error

D:\SteamLibrary\steamapps\common\GarrysMod\bin>gmad create -folder D:\SteamLibrary\steamapps\common\GarrysMod\garrysmod\addons\new\rp_newmap Garry's Mod Addon Creator 1.1 Looking in folder...

4 Weeks Ago
by MichaelMK Go to last post
11 173
Help

solved Sandbox based gamemode, rebind Q-Menu

I want to use the spawn menu button (Q) to show inventory/player stats and such with my custom derma, but I have a few problems. How do I bind something to use the Q-menu in lua? I know how to bind f1-f4, but that's it. I already know how to disable it...

4 Weeks Ago
by Robotboy655 Go to last post
3 50
Help

Entity and Derma broken ?

So I have just finished making a bank system for DarkRP. I go to test it and this happens ? Ignore the ugly Derma that is going to be sorted: As you can see you have to press the buttons a few times to get them to work and there are 2 script...

4 Weeks Ago
by ShadowHedge Go to last post
3 84
Question

Change hostname via Lua RunConsoleCommand?

Hello, dear friends. Today I had the very dumb problem. Anyway, I don't know why it's don't work. For one moment it's started to work for me but after server restart it's stopeed and don't work anymore... So... What I'm talking about? It's very...

4 Weeks Ago
by FloopyTruck Go to last post
4 118
Question

Default "Weapon menu" reskin?

Hello. I've found that on some servers this menu changed to their super sexy skin: I used google for few days and don't found any info which can help me. Question: How I can change this menu?

4 Weeks Ago
by Robotboy655 Go to last post
3 107
Help

Issue with converting to gma file?

Map works and everything, tested it, just can't make it into gma, everything else is solid. D:\SteamLibrary\steamapps\common\GarrysMod\bin>gmad create -folder D:\SteamLibrary\steamapps\common\GarrysMod\garrysmod\addons\new\rp_newmap Garry's Mod Addon...

4 Weeks Ago
by GWheelz Go to last post
5 58
Help

solved Moving DarkRP f4 sub menu to Derma frame

I found an addon on scriptfodder that fits almost everything I want but it has a shop on f4 that I really like, the problem is that on my server F4 is character stats and inventory, jobs and shops are all NPC's. I have already located all the code...

4 Weeks Ago
by Sugartitty Go to last post
8 145
Help

How do I get extra ammo for guns in TTT?

Basically, I am looking for a way to make guns come with full ammo. Whether it be the guns on the ground that spawn by default, or ones that players spawn in with each round. I was told by someone to edit the "SWEP.Primary.DefaultClip" value to a...

4 Weeks Ago
by Yashirmare Go to last post
3 149
Help

solved Net Broadcasting

Hello, I am trying to create a bank robbery system for DarkRP. So far so good. Except I want it so when the bank is robbed. In this system you press a button in a derma then a networkstring is broadcast. Except one problem. Derma and dbuttons are on...

4 Weeks Ago
by ShadowHedge Go to last post
9 193
Lua

String of http length limit work-around?

Hi, I recently read that http.Fetch returns a maximum of 4096 characters. However I will be using it to read from sources which may have significantly longer lengths, so I have a few questions: 1) is 4096 a limit from http.Fetch or from Lua string...

4 Weeks Ago
by redstonedude Go to last post
8 169
Help

Upload dupes on the Steam Workshop ?

Hello, I wounder to know how can I upload to the Steam Workshop some dupes. I know I can do it with the game, but if I want to update a dupe with the workshopper_v1_0.exe, I cant because of the whitelist. :cry: Can you help me ? Thx.

4 Weeks Ago
by Robotboy655 Go to last post
1 41
Help

Scoreboard Lua Error When Player Joins Server

I recently added this new scoreboard in my server and I've been getting lua errors when a player joins the server and it causes the player to have a not responding screen and wait a little bit more of seconds to get into the server and in the top left...

4 Weeks Ago
by Tupac Go to last post
2 120
Help

Ulx Category

Hey Guys today i was creating a little simple april fools script that opens a lua file on a target function ulx.april( calling_ply, target_ply) if not target_ply:Alive() then ULib.tsayError( calling_ply, "The Person You Specified Is Dead" )...

4 Weeks Ago
by MexicanR Go to last post
4 91
Lua

Disabling screenshake

I am looking for a way to disable screenshake caused by entities colliding with the world. The only way I've found so far is by using CalcView, and it is not a very viable method.

4 Weeks Ago
by Radray Go to last post
0 59
Help

solved Lobby Server & Hiding a gamemode from the server list ( 2 Last )

Hello Facepunch, I wanted to ask on a "better" way for Lobby servers, currently I got two ideas, the first one, sending the player that wants to connect inside a database(which gets removed after 5 minutes for security shit), so the server the...

4 Weeks Ago
by whitestar Go to last post
49 452
Lua

PAC3 Modelling

im looking for someone to help me create multiple armor suits and weapons with pac3, reply your steam if your interested

4 Weeks Ago
by LUModder Go to last post
2 75
Lua

solved DModelPanel [ItemStore Addon] is very buggy

Hello Community, I installed ItemStore and added some Items, but they will be rendered crazy (IGNORE THAT LITTLE WINDOW in the MIDDLE OF THE SCREEN]!!! ( i had solved this). But the Apple Item is rendered with a Offset or s.o. in the Middle of the...

1st April 2016
by konradinius Go to last post
4 99
Request

Custom Commands

Hey guys so I'm not really getting any errors however the files are just not working, not sure if ulx is overpowering the files or not. I've added the "Custom-ULX-Commands" from here: https://github.com/jkralicky/Custom-ULX-Commands Mainly cause of...

1st April 2016
by JasonMan34 Go to last post
12 324
Lua

Changing the string of a chat message client-sided

I'm trying to create a chat censor, and I want it to be toggleable. So everything is done on the client's side. Buuut I came across a problem when trying to change the text. Unlike PlayerSay, OnPlayerChat returns a boolean so I had to completely...

1st April 2016
by MPan1 Go to last post
7 154
Help

Server Crash

Someone is able to crash our server currently; before every crash I see this... Crazy origin, angles, velocity, angular velocity on entity Origin: Angles: Velocity: Angular Velocity: Defusing! Removing!

31st March 2016
by F14 Go to last post
3 100
Lua

<eof> error (lua error HELP)

Recently while working on custom jobs for my DarkRP Server, I encountered a slight error involving the 'end' function. I have tried many ways to fix this error and can not find any resolving methods. I have also scrolled across the internet to find a...

31st March 2016
by BrandonFTW Go to last post
3 80
Help

solved Adv Dupe "Whitelist"

So for some reason ever since this morning when I switched FPP from blacklist props to whitelist props, ADV dupe has not been working. Looked through the code and didn't find anything, so I must be blind ( and obviously in need of someone much smarter...

31st March 2016
by cocomut Go to last post
0 30
Help

solved Why is this code print nil?

How come it says "nil" with with? when it should say the ply:GetVelocity? local function UpdateStuff() velocity = math.Round(ply:GetVelocity():Length()) timer.Simple( LocalPlayer():Ping() * 0.001, function() UpdateStuff() end)

31st March 2016
by AJ10017 Go to last post
6 84
Release

solved GMod - What are you working on? March 2016 (#55) ( 2 3 4 5 .. 10 11 12 13 Last )

Highlights from the previous thread

31st March 2016
by Mors Quaedam Go to last post
504 31,742
Question

sound.PlayURL -> BASS_ERROR_UNKNOWN

When I try to play some sound files with sound.PlayURL it returns this error: BASS_ERROR_UNKNOWN I did not find anything about that error. What does it mean?

31st March 2016
by CupCakeR Go to last post
5 94
Help

LUA Help. Modifying.

So im editing the DarkRP Keys, basically i have this other bit of code which opens a menu, how would i check if a player is not looking at a car or door so the Primary and Secondary attack functions can change. So if a player is looking at a door they can...

31st March 2016
by Borris_Squad Go to last post
7 98
Lua

solved How would I check a player's current job in IF statement?

This DarkRP server shows categories even when they're empty (because they don't have the right job) and I don't know how to word the canSee parmenter, as seen below, to prevent the category being shown when they have the wrong job. I'm new to Lua...

31st March 2016
by LeeTheCoder Go to last post
1 42
Request

File.Exists serverside/clientside

Hello. I'm a begineer in LUA and i'm making an missions addon with an other guy. So we have an PNJ who give missions and so we have some data to save. Currently we have done the save of data clientside only but i'm trying to convert it serverside....

31st March 2016
by JasonMan34 Go to last post
12 415
Help

Custom sounds won't play

I've been trying to add custom Jihad sounds to the pointshop, the code works for if you have the item equipped the Jihad sounds and if not it plays the default sound. The problem I'm having is that I uploaded the sound file to the server and FastDL and...

31st March 2016
by StaTiiKxKALEb Go to last post
0 57
Help

solved Issue with T-Posing Models

For some reason all the addons I use that have npc's for stuff they do a really weird t-posing thing. They go from T-Pose to a position as if they're holding a gun, and then back to the t-pose every ~3 seconds. I have no idea what could be causing it;...

31st March 2016
by cocomut Go to last post
0 21
Help

On PhysgunPickup for a certain entity.

ok, before i start i would like to let all of you know that i am a very very beginner coder and i dont know much. But i had set up a function for physgunpickup and used the physgunpickup hook.add but i realised shortly after that the function would be...

31st March 2016
by boxvader Go to last post
3 74
Help

How do you declare a defined command?

I added a new addon to my server and put it in, loaded up the server, and i got a blue message saying: Chat command "policereport" is defined but not declared! I looked into the lua file and I saw the definition stuff but I don't know how to declare...

31st March 2016
by KRNXinja Go to last post
4 112
Humor

Dancing Skeletons

This code can be used for any one wanting to protect their script on ScriptEnforcer (Failure code) or for anyone else wanting to have a laugh on their server. You can edit the code to use your own materials/sound but you can not use the code for...

31st March 2016
by The Commander Go to last post
17 1,578
Lua

solved Creating 3d2d texts above dropped weapons HELP!

Hello! After hours of searching and attempts i finally have decided to call for help.. i designed this in paint http://i.imgur.com/9ISvC9i.jpg and i am trying to create it for dropped weapons in my server, darkrp based. the issue is i have no idea...

31st March 2016
by Bandit Bible Go to last post
2 65
Question

solved DermaPanel doesn't show up at all

Solved. Was trying to run it by using a wrong command. Thanks for the assistance though.

31st March 2016
by Invule Go to last post
2 97
Help

Removing custom player models on a map

I like this one map, but the playermodels that are set on TTTBeginRound are male strippers. Is there anyway I can stop the models from changing? The models are coded inside of the .bsp. They are not models I added myself.

31st March 2016
by Nick78111 Go to last post
3 71
Help

Levitating entities

How would I go about creating an entity that if you place another entity over it, it will levitate that placed entity. Any links would be helpful Sorry guys im drunk and I want to code

31st March 2016
by konradinius Go to last post
2 80
Help

WeaponSelect doesnt select it "really"

WeaponSelect doesnt select it "really". I'm using this Code. SERVERSIDE CODE. hook.Add("PlayerCanPickupWeapon","DisableNaturalyPickuping",function( ply, wep ) if wep.IsInventory then return true end return false end)...

31st March 2016
by konradinius Go to last post
0 43
Request

DarkRP - Disable Job command

Hello,i'm making an NPC for Job in DarkRP but i have an problem. People can change their job via the command. Example if someone want to be mirador he just have to do /mira. How can i block job commands ? Thanks.

31st March 2016
by DiscoKnight Go to last post
11 164
Question

Finding a Client

If I had three servers: 1. Master Server 2. Game Server 1 3. Game Server 2 If Master Server wanted to find out if a specific client (SteamID64) was on Game Server 1 or Game Server 2, what would be the best way to do it? I could send a message...

31st March 2016
by whitestar Go to last post
7 136
Help

Derma panel - issue

Hello, I'm trying to make a list of weapon and beside them will be a white button but as seen in the picture below the button in underneth them. I've been trying to solve this but i can't come up with a solution, any help please? Click here for...

31st March 2016
by whitestar Go to last post
1 51
Help

If a player is in a certain position, teleport to another location?

Ok, so what im trying to make is a thing where a npc teleports you somewhere when you click a button on it, i already know how to do that. What i want to do is if another player is already in that position (In a radius of that position) I want to be...

30th March 2016
by NeatNit Go to last post
5 168
Help

solved Maybe weird but hl2 ep1 and ep2 npc stuck on scene

I do not know how but npcs can stuck on their own Scene. Like when you plug in to fix the teleport. Alyx at d2_prison_06 to speak with Eli. And Episode 2 start scene with Alyx. And many others logic_choreographed_scene Maybe I am using wrong these...

30th March 2016
by kem008 Go to last post
0 54
Post Your

Lua Tips & Tricks ( 2 Last )

While the wiki is useful when searching for functions, it doesn't really teach good programming habits, or smart ways to do things. So, let's have a thread where we share our tips and tricks! It doesn't have to be purely lua code tips, it could also...

30th March 2016
by Mornedil Go to last post
71 3,590
Lua

Problem with Ammo

Hey guys, I'm working on a Deathrun server and have a problem with the weapons at the endings from some maps. For example the SMG, I want that the players have more than just 45 shots when they pick them up, but without picking up tons of...

30th March 2016
by Jawad Bendo Go to last post
8 177
Stupid

Table doesn't load into client - attempt to index a nil value

I get this error appearing whenever I look at a door. Line 9 of the doorhud.lua is part of an if statement. elseif(PROPERTIES.name == nil)then The PropertyID NWInt is set by the server upon gamemode load, and is available to me when I run a...

30th March 2016
by bigdogmat Go to last post
2 80
Lua

Darkrp entities error!

If people on my server spawn an entitie from the f4 menu they spawn as a world prop and people cant touch them. Please help!

30th March 2016
by Tupac Go to last post
1 42
Help

Help with Grid Based Build System

Hello! I am designing an Rust Survival Gamemode( Testserver: 109.230.252.185 Password="DEV" ) and i failed to create a good Build System. I would prefer to use the GM Stranded Model Pack or PHX Props. It should be like Placing a Foundation block free...

30th March 2016
by konradinius Go to last post
0 92
Help

Need Help to fix Timer (EMP)

If I paralyze Cars, they should stay paralyzed for a short time but they just stay paralyzed forever…and I don’t know why. Can someone help me? :/ if ( SERVER ) then AddCSLuaFile( "shared.lua" ) SWEP.Weight = 5 SWEP.AutoSwitchTo = true...

30th March 2016
by GreenIvies Go to last post
2 69
Lua

string.gsub and $ ?

So for some reason, this happens: print( string.gsub( "test", "$", "s" ) ) --Output: tests 1 print( string.gsub( "test", "$", "Wat" ) ) --Output: testWat 1 print( string.gsub( "", "$", "I don't even" ) ) --Output: I don't even 1

30th March 2016
by Nak Go to last post
3 116
Lua

Need Help with a script to remove a weapon from inventory if the weapon has no ammo.

for k,v in pairs( ply:GetWeapons() ) do if v:GetAmmoCount() == 0 then ply:StripWeapon( v ) end end I am using that currently but it doesn't work. I was wandering if anyone can tell me why that doesn't work. Any help is appreciated.

30th March 2016
by JasonMan34 Go to last post
7 170
Help

Problem how things get hit

I made a Baseball Bat for TTT which deals 50 damage and should push someone in the Middle of nowhere. But Forever Reason sometimes if I hit someone, the hit sound and Blood comes, but no damage and moving of the hit person at all. I will post the...

30th March 2016
by Gamefreak26 Go to last post
2 112
Question

visual see SQL database

Hello i just have a simple question, Is there anyway for me to visually see my SQL database that i made with lua? I have made the database on my gmod server.

30th March 2016
by Steve Raf Go to last post
2 152
Help

solved Creating a changing var & Button do click custom job check!

So I am trying to create a bank robbery system. However, I want to create a variable called BankBalance that changes every 2 minutes by $3500. I have created an entity called Bank_ent. The code is : Init.lua: AddCSLuaFile( "cl_init.lua" )...

30th March 2016
by Invule Go to last post
7 150
Help

TTT gag command

Would love to have a function that is just like ulx slaynr but instead it gags for the entire round and then ungags at the end of the round... And you can specify how many rounds to be gagged... Any help would be awesome!

30th March 2016
by Nookyava Go to last post
2 90
Help

Looping problem [GAMEMODE]

I have a looping problem in my code, whenever I press Q or Z the code loops until I release the key (This code worked with GM:KeyPress before). What I'm trying to do is make the code loop only once even If the player holds Q or Z. Before you look at...

30th March 2016
by MrNeon Go to last post
8 270
Lua

How do I set custom HP for different jobs?

I own a kingdomRP server and I need custom hp for a donator job (Dragon) What is the code for this??

30th March 2016
by MexicanR Go to last post
6 118
Lua

gmod how to make an entity explode

i made a gun that throwing body mod,and i wish when i touch something make the body explode,what function and hook should i use? thank you in advance!

30th March 2016
by swordjjjkkk Go to last post
4 147
Help

solved DarkRP Name Info Issue:

I havent been able to figure out why I cant disable a player's name and health from appearing when you look at them. The info above their head is normal.

29th March 2016
by CASAVANT Go to last post
3 88
Help

solved OnPlayerChangedTeam

Hi, I have a problem with this code function Remove ( ply, oldteam, newteam ) if oldteam == TEAM_CITYZEN then ply:SetMaterial("models/shadertest/shader5") end hook.Remove("OnPlayerChangedTeam", "off", SetMaterial)

29th March 2016
by ST3BL Go to last post
10 194
Lua

Weird SWEP Glitch

So the following is the code I added to cl_init.lua: function SWEP:Initialize() if self.CanPrimaryAttack then hook.Add("KeyPress", "FOVChangeOnPress", function(ply, key) if (key == IN_ATTACK2) then if (!self.FOVChanged and...

29th March 2016
by Percipience Go to last post
29 411
Help

Gamemode works on client but not on dedi server

Hey there. So i have an old perp gamemode that me and my mates are trying to get running for fun and we are encountering a rather odd problem. When the gamemode is ran from singleplayer by starting the server there and selecting the gamemode etc...

29th March 2016
by RonanZer0 Go to last post
3 99
Lua

29/03/16 Update broke ULX

Getting this error since the latest update today, Any ideas on a fix? addons/ulx-master/lua/ulx/xgui/bans.lua:46: attempt to index local 'txtCol' (a nil value) 1. unknown - addons/ulx-master/lua/ulx/xgui/bans.lua:46 2. include - :-1 3. fn...

29th March 2016
by Stickly Man! Go to last post
3 164
Lua

Getting wird errors

I'm getting some wird errors from Lua: gamemodes/learning/gamemode/extensions/sh_administrative.lua:5: 'then' expected near 'if' 1. unknown - gamemodes/learning/gamemode/extensions/sh_administrative.lua:0 Code in these lines: Line 5:...

29th March 2016
by kulcris Go to last post
15 175
Help

Controlling the timing of lag compensation.

I am working on a gamemode called Clock Blockers which is a sort of time-travel FPS. Whatever happens in this round is replayed by a bot in the next round. The trouble is that lag compensation isn't done for the bots, so their shots tend to be behind that...

29th March 2016
by raubana Go to last post
3 162
Help

solved Maybe I am doing this wrong?

So I am making a collapsible category so that it can be collapsed if the user does not want to see it, but when I do 'AmmoCollapsible:Toggle()' it messes up the button as well as the category itself like the size gets freaky. When I remove the toggle it...

29th March 2016
by tripps41 Go to last post
2 88
Question

solved Pos for a derma panel

So this is out of curiosity, what would be like the exact center of your screens position? I am just wondering because find an exact place for the derma panel is easy yes, but it is just a little more work to find an exact place. So my question is what...

29th March 2016
by tripps41 Go to last post
2 41
Question

solved Perma Panel

Okay so I am making an armory for my server, but when I open the derma panel it constantly opens due to use. How could I stop it from opening multiple derma panels and just open up one?

29th March 2016
by tripps41 Go to last post
2 42