Title / Thread Starter Last Post ByReverse Sort Order Replies Views
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...

2nd August 2016
by PizzaDoxy Go to last post
10 324
Lua

help with steam rewards addon

hi i have steam rewards addon on my server and i want when someone join our group he will get rank but i dont know the function any idies ? REWARDS.Settings.CustomRewardFunction = function(ply)

2nd August 2016
by whitestar Go to last post
2 148
Help

!redie command?

So I was wondering if anybody had already released a !redie command, or how I would go about making one if not? I bought a ghostmode script but it's bad and doesn't actually work right..

2nd August 2016
by Nookyava Go to last post
9 366
Lua

help with pointshop 2

im tying to add to my server pointshop 2 and when i added it this is the errors : addons/pointshop2/lua/autorun/client/noir.lua:5: attempt to call method 'PS_HasItemEquipped' (a nil value) 1. fn - addons/pointshop2/lua/autorun/client/noir.lua:5 ...

2nd August 2016
by soosy Go to last post
4 144
Help

Propper use of ShouldCollide

How exactly should one use ShouldCollide hook? Because everytime I try to use it, it breaks the physics, or crashes the server... We need better documentation! Also it doesn't break the physics instantly, but it happens overtime... For example: This...

2nd August 2016
by Phoenixf129 Go to last post
6 205
Help

solved OOC chat tags

ive been working on a gamemode and this is the ooc system that is used by the gamemode -- Chat system local gKeys = {} gKeys = {} gKeys = function( ply, text, tc, isDead, space ) if ply:GetUserGroup() == "developer" then chat.AddText( Color(...

2nd August 2016
by ItsMoney Go to last post
5 198
Help

How to scale fonts for other resolutions.

I'm making a HUD, I'm having an issue, the rectangles/materials scale correctly with different resolutions, but how would I make a font scale with other resolutions? I play on a native resolution of 1920x1080, I'll post a picture of my native res with the...

2nd August 2016
by bigdogmat Go to last post
2 182
Help

ConCommands, what am I doing wrong here?

So heres my code: concommand.Add( "NovaSuperSpeed", function( ply, cmd, args ) RunConsoleCommand("walkOnWater", "1") game.SetTimeScale(0.03) player:SetLaggedMovementValue(38) player:SetJumpPower( 443 ) -...

1st August 2016
by tcmaxwell2 Go to last post
4 201
Lua

How make a little portrait panel on a HUD?

I wanted a little portrait of the model the client has at the bottom left so I used this hook.Add( "InitPostEntity", "hud_portrait", function() local portrait = vgui.Create( "DModelPanel" ) portrait:SetPos( 10, ScrH() - 80 ) portrait:SetSize( 60,...

1st August 2016
by Klaes4Zaugen Go to last post
10 181
Help

Help with setting classes

Okay so I'm a bit confused and can't see where this, here is the code. local HunterClass = {} HunterClass.WalkSpeed = 300 HunterClass.RunSpeed = 400 HunterClass.MaxHealth = 200 HunterClass.StartHealth = 200 HunterClass.TeammateNoCollide =...

1st August 2016
by whitestar Go to last post
2 142
Lua

How can i open a vgui panel on every player ingame?

So i am working on a tax system so i was wondering how i could open a vgui panel on every player ingame without having to send info from client to server to client. I am making a system that work like this: mayor open a vgui menu Mayor press a button...

1st August 2016
by Klaes4Zaugen Go to last post
1 120
Help

DListView permanent lines?

I have it so every time damage gets given to a player, it adds to the list. I have a custom button so that every time the panel closes, it uses Hide() instead of Close(). I don't get any script errors, but if let's just say I use a slow bullet (like a...

1st August 2016
by Robotboy655 Go to last post
9 244
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?

1st August 2016
by MPan1 Go to last post
10 267
Lua

solved Grabbing a message and adding Tags with color.

Okay, so what i wanna do is take the players message and add a little tag. But the problem is from what i know colors are Clientside. So if i wanna add colors, i will have to do some cross stuff. And i normally don't use the client, so how would...

1st August 2016
by MPan1 Go to last post
1 137
Help

Changing font height on the fly

I'm looking to change the size of some surface.DrawText() on the fly without trying to call surface.CreateFont() constantly. Is there a way to do this? I'd appreciate any help anyone would be willing to give me.

1st August 2016
by bitches Go to last post
3 188
Shitpost

Do dx80.vtx, .phy, sw.vtx, etc do anything to the client?

On my server, I have FastDL and a lot of files that go *.dx80.vtx, *.phy, *.sw.vtx, etc in my FastDL files. I was wondering if they actually do anything. I know .mdl actually does but can anyone list the files types I only need to keep in my FastDL?

1st August 2016
by code_gs Go to last post
6 270
Help

DarkRP hud errors

So im learning lua and im making a hud for dakrp. but after some hours making my hud i got some errors but i dont get whats wrong. does anyone know whats wrong? http://pastebin.com/JtY0VdDR ...

1st August 2016
by timz9 Go to last post
2 113
Help

solved 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_...

1st August 2016
by louie123 Go to last post
11 311
Lua

DComboBox On certain option chosen if statement

How would I make it so if a certain choice from the DComboBox is selected it would for example draw a rounded box Heres the code for the ComboBox local combo = vgui.Create("DComboBox", DermaPanel) combo:SetSize(100,20) ...

31st July 2016
by whitestar Go to last post
1 140
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)...

31st July 2016
by Coffeee Go to last post
13 342
Question

solved 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...

31st July 2016
by dannyf127 Go to last post
13 412
Lua

Stay safe server files from lua thiefs ( 2 Last )

Who can help? How to defend my server files from lua thiefs

31st July 2016
by MrKuBu Go to last post
51 2,686
Lua

solved I need help with this lua error [ERROR] lua/420.lua:15: ')' expected (to close '(' at line 3) near '

print ("test") concommand.Add ( "Open", function () local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( 100, 100 ) DermaPanel:SetSize( 500, 400 ) DermaPanel:SetTitle( "Derma ) DermaPanel:SetDraggable( true ) DermaPanel:MakePopup()

31st July 2016
by Obi-one Go to last post
3 143
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 :)

31st July 2016
by tcmaxwell2 Go to last post
7 481
Lua

solved 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...

31st July 2016
by hghg1 Go to last post
3 187
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

31st July 2016
by poepel Go to last post
6 263
Help

solved Uber Addon Help

Hello I am making a UBER addon and I need help, because I am lazy to fix it myself and I belive it is not possible because I have just been coding for like one or two month in gmod lua... not darkrp lua... it's diffrent. So I get this error: ...

31st July 2016
by PIXX Go to last post
2 99
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...

31st July 2016
by Banana Lord. Go to last post
10 255
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.

31st July 2016
by roastchicken Go to last post
10 325
Help

Using ClientsideModel inside pre-existing DModelPanel

Hello, currently I use a system in PostPlayerDraw that renders other models onto players. I want to allow these to be draw inside a DModelPanel, the same way they're draw onto players. So far I've had no luck getting it to draw properly. I've tried...

31st July 2016
by Robotboy655 Go to last post
3 140
Help

Custom chatbox question

So tonight I began working on a custom chatbox and I wanna do emoticons, colors, and chat tags all set up in a config file, and I'm not a lua expert at all so I was wondering how I set up a config file to do so? Any help? I'm very interested because I'm...

31st July 2016
by Rori Go to last post
5 142
Lua

How would I check if someone has been kicked using Player:Kick() or banned using Player:Ban()?

Is there an event I can hook my function on to or how would I go about doing this?

31st July 2016
by code_gs Go to last post
3 199
Lua

DarkRP Entity Take Damage help

Hi, I've been trying to get a GM:EntityTakeDamage function to work in darkrp but no matter what I try I can't get it to work and I keep getting lua errors. This is what I have so far. PlayerLoadout = function(ply) function GM:EntityTakeDamage(...

31st July 2016
by zefine Go to last post
3 243
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?

31st July 2016
by andreblue Go to last post
8 217
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...

31st July 2016
by ncc360 Go to last post
2 166
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...

31st July 2016
by Robotboy655 Go to last post
5 164
Help

solved 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...

31st July 2016
by Woodehh Go to last post
6 258
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() ...

30th July 2016
by jacobcooper18 Go to last post
6 186
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: ...

30th July 2016
by wh1t3rabbit Go to last post
3 170
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...

30th July 2016
by RandyButter Go to last post
21 568
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.

30th July 2016
by code_gs Go to last post
9 256
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...

30th July 2016
by whitestar Go to last post
6 131
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...

30th July 2016
by EpicCreeperHD Go to last post
6 246
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?

30th July 2016
by skullorz Go to last post
8 317
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...

30th July 2016
by meharryp Go to last post
35 695
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...

30th July 2016
by bosnian_cyco Go to last post
2 113
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...

30th July 2016
by Rori Go to last post
4 141
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()...

30th July 2016
by roastchicken Go to last post
7 167
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)...

30th July 2016
by soosy Go to last post
0 96
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 =...

30th July 2016
by jacobcooper18 Go to last post
8 410
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...

30th July 2016
by Sir TE5T Go to last post
12 608
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...

30th July 2016
by COMBOBREAKER Go to last post
8 180
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...

30th July 2016
by Netheous Go to last post
1 127
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?...

30th July 2016
by Blinkenn Go to last post
10 285
Help

tmysql3 & tmysql4

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

30th July 2016
by code_gs Go to last post
1 124
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?

30th July 2016
by Rori Go to last post
2 103
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'...

30th July 2016
by code_gs Go to last post
4 98
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'...

30th July 2016
by The_Lord Go to last post
0 94
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...

29th July 2016
by whitestar Go to last post
1 135
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.

29th July 2016
by Gmod4phun Go to last post
21 328
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.

29th July 2016
by roastchicken Go to last post
6 147
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!

29th July 2016
by PureCTRL Go to last post
9 178
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 =...

29th July 2016
by PizzaDoxy Go to last post
5 200
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

29th July 2016
by poepel Go to last post
13 385
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.

29th July 2016
by lvivtotoroyt Go to last post
6 124
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?

29th July 2016
by Gmod4phun Go to last post
8 149
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...

29th July 2016
by lvivtotoroyt Go to last post
6 108
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...

29th July 2016
by TheNooblycore Go to last post
8 247
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...

29th July 2016
by roastchicken Go to last post
3 154
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...

29th July 2016
by jacobcooper18 Go to last post
9 183
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 ...

29th July 2016
by jacobcooper18 Go to last post
12 198
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...

29th July 2016
by Predda Go to last post
4 149
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?

29th July 2016
by MooreTwisted Go to last post
4 219
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.

29th July 2016
by MPan1 Go to last post
1 112
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?

29th July 2016
by YoutoYokodera Go to last post
0 96
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...

29th July 2016
by Darkblizzard Go to last post
0 114
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...

28th July 2016
by FirstOrder Go to last post
10 520
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)...

28th July 2016
by ZombieKingAAA Go to last post
27 327
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...

28th July 2016
by .0mega Go to last post
9 346
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

28th July 2016
by overki11 Go to last post
1 101