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

solved for i loop & variables

Possible to have a workaround for this? pls = 0 for i =1, 14 do local pls = pls + 35 local bp1 = vgui.Create( "DButton", p1_base ) bp1:SetSize(150, 33) bp1:SetPos(12,pls) bp1:SetText(propButton)...

13th May 2016
by ShadowChaos Go to last post
2 108
Help

solved How to spawn entities automatically on server start?

Hello all! I'm hosting a cinema server and I want to add an entity which will spawn on the map after the server is started. It's a jukebox which plays songs when you press the "Use" button on it. I need the jukebox to stay in the cinema lobby and make...

13th May 2016
by SlyFox27 Go to last post
4 107
Help

Secure networking

I have seen a lot of people criticize scripts for networking being insecure. I was wondering if anyone knows about a guide that covers this. Thanks.

13th May 2016
by ph:lxyz Go to last post
5 252
Lua

Need some help with a code

So iam making an Entity that gives you armor and sets your player model and when you run out of armor it sets your playermodel back to what it used to be But iam currently getting this lua error. AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua"...

13th May 2016
by BobCottonSwab Go to last post
6 133
Help

How to delete all set spawn points in DarkRP?

I moved my job spawn points in DarkRP, and now I want to delete all of the /setspawn that I set. How do I do this?

13th May 2016
by Subject_Alpha Go to last post
1 118
Help

solved Using tables correctly.

I want to learn coding so I can make some amazing things that people on facepunch have made. I'm running into an issue. I have a basic understanding on using tables. I had a friend help me (after some people from facepunch helped) make my script efficient...

13th May 2016
by StaTiiKxKALEb Go to last post
2 176
Lua

solved Help with Loot System

Gays, i need help! Can say what i noob in lua and i need to rework my script. lootTotal = 15 lootMax = 10 function spawntime() timer.Create( "spawn_loot", 10,0, function() spawnloot( ) end) end function spawnloot( )

13th May 2016
by Netheous Go to last post
2 164
Lua

solved Sending steam information to dhtml

Pretty much just what was said in the title, I am wondering if there is any way to log a player into a website inside a DHTML with their current steam login on the server. I am not finding anything online and can't think of any ways to do it. I am...

13th May 2016
by KevinnTCG Go to last post
1 118
Help

Viewpunch speed?

I really want to know if there's a way to speed up the default view punch (or if there's any other way of doing non-dynamic recoil). It's really sluggish when it returns to the original view angle, and it doesn't really look good with quick-firing...

13th May 2016
by MPan1 Go to last post
1 127
School

Explaination on why the jobs.lua / shipments in darkrpmodification works

I don't remember the code for DarkRP I'm assuming it was something like this. AddDarkRPJob name = weapons = color = something like that idk, (on my phone so I can't check) How can I make something like this on my own? In DarkRP the job...

13th May 2016
by Tupac Go to last post
9 216
Help

Create HUD on an entity

Hello i'm trying to create an HUD on an entity like this : https://scriptfodder.com/scripts/view/744/enhanced-meth-lab But i don't really know how to do,what will be the function i will use ?

13th May 2016
by Lapin_b0t Go to last post
5 137
Help

Jihad Help

Since the most recent gmod update, when someone dies from my Jihad they die, but their bodies are still labeled as alive and if you ID their bodies it doesn't change it. Also, they can type to living players. Understandable if people don't want to read...

13th May 2016
by CupCakeR Go to last post
1 136
Help

Is there any way to detect, is entity in PVS on clientside or not?

Is there any way to detect, is entity in PVS on clientside or not? IsDormant don't work good with attached env_projectedtexture to entity(when it attached IsDormant always false)

13th May 2016
by Lapin_b0t Go to last post
9 325
Help

solved Chat Tag Help

I have this for my chat tag system: local filename = "chatranks.lua" if SERVER then AddCSLuaFile( "autorun/" .. filename ) else local function ChatTags( Ply, Txt, ply ) local Msg = {}

13th May 2016
by Vizik Go to last post
3 78
Help

Halo, ents.

So i was looking at: https://wiki.garrysmod.com/page/halo/Add And was wondering, does it always make the ents glow, i.e through walls, or just when you look at them (not through walls) as i want to add a glow to usable ents on my server. Thanks.

12th May 2016
by tyguy Go to last post
6 157
Shitpost

Is there way to save material/rendertarget?

RebuildSpawnIcon makes a png image from ModelPanel, but it's engine function is there way to save in rendertarger in materials like RebuildSpawnIcon does it in materials/spawnicons/models?

12th May 2016
by Koji6ac9H Go to last post
0 72
Question

solved Finding IP in a string

I'm trying to make a function that takes a string and searches it for ip addresses, I blow that I could use string.match to search through the string but how to you tell it to search for IP addresses?

12th May 2016
by MexicanR Go to last post
3 165
Question

Hook for d3d device resets?

Whenever the d3d device resets, RTs need to be re-rendered, but I can't find any hook for this. Is there any way to tell if there has been a device reset?

12th May 2016
by thegrb93 Go to last post
5 175
Help

Getting text of derma text entry

I want to get the text entered into a derma text entry as a variable. When I try to use GetValue() it either gets the value of the text displayed in the box as the SetText() value or when there is no SetText() value, GetValue() returns as blank. Is there...

12th May 2016
by GarrysDorian Go to last post
3 82
Help

solved How do you change Server Properties depending on Map

Basically the title. I'm not sure about how going about this. I've looked at a rtv system to try figure something out about calling maps (not loading them). But as an example, --One map loads this for the server sv_gravity 800 --Another map...

12th May 2016
by Tupac Go to last post
11 227
Lua

solved Painting DColumnSheet sheets?

Hey guys.... Currently trying to paint(as in Dpanelblah.Paint = function) the sheets from DColumnSheet.. I'm just kind of freeballin it though because there isn't any guide or something out there that I could find. Couldn't do it. Anyway, can...

12th May 2016
by bosnian_cyco Go to last post
9 225
Help

Unknown command

I'm trying to make a menu that I can open with a command open_RankMenu. All it does is edit one rank for me, easy to use to test permissions. I'm getting the error Unknown command when I type in open_RankMenu, even though it displays on autocomplete. Here...

12th May 2016
by Robotboy655 Go to last post
12 130
Help

solved Next that follows the user's eyes

Hey guys I was just curious how I could get text on an entity that follows the players eyes. If anyone could help me I'd be very grateful! Thanks in advanced

12th May 2016
by NeatNit Go to last post
4 244
Question

Disabling Other Addons

I'm trying to temporarily disable or block another addon through my own addon. What are my options if any?

12th May 2016
by Hoffa1337 Go to last post
6 185
Lua
12th May 2016
by brianm109 Go to last post
0 84
Help

Help about vector and player position

Hello i'm trying to make something. If player are in an specific arena he can't do an commands for example. I have never worked with vector on gmod and i'm totally blocked. How can i make an simple cube arena who show on my screen ? Thanks you in...

12th May 2016
by Marbella Go to last post
10 139
Lua

solved i have a problem with /setspawn /setjailpos /setmoney etc...

not be happened but the overnight commands /setspawn /addspawn /setjailpos /setmoney /addmoney do not work, I'm superadmin, I restarted the permissions of Atxuk to see if they solved the problem and nothing, seems that the error revolves around to fadmin...

12th May 2016
by davicyyo Go to last post
3 102
School

I need some help with a custom F4 menu.

A friend of mine made me a scoreboard and F4 menu for DarkRP about a year ago, completely from scratch. I personally really like it, and want to continue using it, but there are three irritating bugs I'm running into. I've notified him about the bugs, but...

12th May 2016
by funnygamemake Go to last post
10 363
Games

solved I need help on my dark rp server custum classes not working

i have custom jobs made but it seems as if they arent uploading to the server http://pastebin.com/RfbqYdZm thats my jobs.lua pls halp

11th May 2016
by garrysmod983 Go to last post
28 493
Help

Sending server a variable

How can I send the server a variable from a client? I want to send the text entered into a derma menu by sending the information through net.Send when the okay button is pressed. I want to set the GetValue to a variable and set that as a string and send...

11th May 2016
by Robotboy655 Go to last post
3 90
Lua

Saving values of Color Mixer

I'm not sure how everyone else is doing it, but I'm creating a variable with a default color. I'm using the variable in my surface.SetColors() In my color Mixer, I get that value, then assign it to the original variable, it updates, and it's great. Yet...

11th May 2016
by Robotboy655 Go to last post
1 67
Lua

My Jobs.lua aren't working

Ok I put some jobs in my jobs.lua and and there not working. I only see one job that I didn't even add in. I'm also seeing this error. There is 1 Lua problem! Please check your console for more information! A runtime error has occurred in...

11th May 2016
by dannyf127 Go to last post
6 123
Help

solved Nil value

I'm getting attempt to call field "AddNetworkString" a nil value. My code is: util.AddNetworkString("OnSpawn") util.AddNetworkString("RP Menu") function NameMenu( ply ) net.Start("OnSpawn")

11th May 2016
by danker pepers Go to last post
3 86
Shitpost

What is layer ID for SetLayerDuration?

What is layer ID for SetLayerDuration? and what it does?

11th May 2016
by Robotboy655 Go to last post
7 177
Help

Which value should I use here with SetEnemy to make the NPC attack players of a certain team?

My code: function PLUGIN:SpawnManhack(pos, client) local hack = ents.Create("npc_manhack") if (client:Team() == FACTION_CP) or (client:Team() == FACTION_OW) then hack:AddRelationship("player D_LI") end

11th May 2016
by Shadico Go to last post
3 151
Help

Derma Help

I'm trying to make a derma menu, but I'm getting errors. The error is BackGround a nil value, even though I clearly define what it is. function RPName() local BackGround = vgui.Create("Dframe") BackGround:SetSize(500,500) BackGround:Center()...

11th May 2016
by danker pepers Go to last post
3 82
Help

Ways to store data?

Are there any good ways to store non-persistent data asides the one I'm using now? For now, I'm using tables to store data that does not need to persist, and if I need to store a data for a player such as points in current session or something similar, I...

11th May 2016
by Luni Go to last post
8 232
Question

Lag compensation and or "shitboxes"

Hit box issues are all over facepunch with no real explanation on how to fix them, Is lag compensation even actually used? The wiki states that it is used https://wiki.garrysmod.com/page/Player/LagCompensation But in some threads (some pretty...

11th May 2016
by kulcris Go to last post
10 554
Help

solved Allowing noclip to specific DarkRP Jobs only

Hey everyone! So I am working on a GMOD DarkRP Server with a friend, and we want to allow Our admin on duty job (TEAM_ADMI) to be able to noclip Thanks -Tom

11th May 2016
by TomTheDuck Go to last post
9 110
Help

solved Getting npcs spawned by map without using ents.GetAll()

I am trying to get ents that are spawned by my map as they spawn, sort of like http://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedNPC. Been backwards and forward through the wiki and cant seem to find anything. Anyone have a suggestion?

11th May 2016
by kulcris Go to last post
2 81
Question

How to log certain information

If I wanted to log certain bits of information in a menu how would I do it. If I wanted to log each time a person clicked a button including the time/person who clicked the button.

11th May 2016
by MPan1 Go to last post
3 122
Lua

Networked Integer Question

Can networked integers be set from a file in one entity and retrieved in another entity? If not, please provide an alternative. Please do not just say it isn't possible without providing an alternative unless there is no alternative.

11th May 2016
by brianm109 Go to last post
20 239
Help

Scrolling Textures not working on Mesh

Why aren't scrolling textures working on meshes? It's just a normal mesh, with the combine shield texture which changes the further away you get from it and eventually fades away (you would know this if you ever got even 5 minutes into Half-Life 2) but...

11th May 2016
by RonanZer0 Go to last post
3 114
Help

solved RP Command help.

Hi, My name is PIXX and I am trying to make a addon that adds a salute command, or rather, makes it easier to salute, I am using DarkRP on a server, that is why it uses "/me" (if you wondered). If you can help me, please, I would be so thankful! ...

11th May 2016
by PIXX Go to last post
6 181
Lua

SteamID to TimeCreated

This is small code I came up to find rough estimate of steam account creation date, just by using the steamid itself. No queries to Steam servers. Has margin of error by few months. Though I'm not sure where this would be useful, I coded it because I was...

11th May 2016
by edgarasf123 Go to last post
1 135
Help

ULX Check AFK command help

I'm trying to make a script for a TTT server that, on execution on a target, will ask them to press wasd to not be put in spectator. The code I have so far is: local CATEGORY_NAME = "Utility" local function forceSpec( calling_ply, target_ply ) for...

11th May 2016
by Invule Go to last post
3 109
Help

Server Nav/Errors

Back again with another problem, this time more confusing for me. After my friend had bought his server, I started to work on it. When I thought it was ready, I get this in the console: Fetching Workshop Addons.. Calling GetCollectionDetails...

11th May 2016
by RVTLight Go to last post
4 127
Lua

solved Gmod SRV Idea/Request

I've been looking into DNS and networking with games such as Minecraft and noticed that they do have SRV capability. I think Garry's Mod would really benefit from this because it would mitigate DDoS attacks if somebody would patch the packets through...

11th May 2016
by CryptAlchemy Go to last post
3 157
Help

solved Freezing props on a map

I'm trying to make it so when these props are on a map they're unmovable/frozen. Mainly as just a test. I've tried multiple variations of this code. Any ideas why it's not working? local banned_mdls = { "models/props_junk/wood_crate001a.mdl", ...

11th May 2016
by StaTiiKxKALEb Go to last post
13 260
Question

solved Creating a pilotable helicopter.

I wanted to make a pilotable helicopter, but I don't know where to start. A scripted vehicle that is not a ground vehicle, how do you do it? Then again I can't really find much about normal scripted vehicles in the first place.

10th May 2016
by Hoffa1337 Go to last post
4 238
Lua

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

I want to make this button: local button = vgui.Create("DButton" , frame) button:SetText("Россия") button:SetSize(980,200) button:SetPos(10, 270) button:SetColor(Color(0,0,0)) button.Paint = function(s,w,h)...

10th May 2016
by Peponullo Go to last post
3 146
Help

solved ParticleEffect acting weird inside a hook

Hello guys, I'm playing with double jump and particle effects created for it. I encountered a problem during a test phase. When playing in SP, everything works fine, the effect appears as I execute the second jump. However, when in MP, I can only see...

10th May 2016
by Robotboy655 Go to last post
7 87
Question

DarkRP 'This Weapon Is Unavailable' when spawned.

I'm using the FA:S 2.0 weapons mod for my server. I've been able to attach these weapons to classes when they spawn, however when I try to spawn them from a gun dealer, a small notification pops up in the bottom right of the screen saying that 'This...

10th May 2016
by CatWithACat Go to last post
0 69
Request

Malicious code to sort out thieves?

So I made this addon for a really bad darkRP server (that shall remain nameless) and the owner(s) seemed happy at first, but then they started giving it to other server's without my consent and claiming they created it (even though they don't know any...

10th May 2016
by Sir TE5T Go to last post
23 921
Lua

Cool vgui techniques

Does anyone have any unique way of doing certain things. Maybe reducing the amount of lines to do x, down from 40 to 12 or something. Just looking for some more effecient ways to code things.

10th May 2016
by dannyf127 Go to last post
8 249
Shitpost

How to stop player's idle animation?

I need to make player stand with no breathing when he's :Frozen() how can I reach it? I tried SetCycle, but it doesn't help.

10th May 2016
by Koji6ac9H Go to last post
4 160
Question

How to change look/skin of the "Console", "Options"..?

I am wondering how to change skin for menu dialogs such as "Console", "Options" (...) in Garry's Mod? I know it is possible to do this in TF2 and CSS.. So, I have searched for "mainmenu.res" and "mainmenuoverride.res" files in entire (base) GarrysMod...

10th May 2016
by Unknown Gamer Go to last post
35 1,731
Help

HUD Health Bar (want to rotate the draw.roundedbox)

Hello all :) I have a little problem that I can not find the solution... :s: I work on the HUD health bar in garry's mod and I can not rotate 90 degrees the "draw.RoundedBox". Here is an illustration:

10th May 2016
by code_thrax Go to last post
7 266
Help

Custom Check jobs

im very new to coding and have an awesome server, not listing because of rules of these forums, but i cant figure out the custom check. i have three levels of VIP bronze silver and gold DO NOT TELL ME TO REMOVE MY RANKS I NEED HELP WITH THE CUSTOM...

9th May 2016
by j_runner Go to last post
3 70
Help

Text that follows an entity with actual code!

Hey guys so I asked before how I would achieve text over an ent that follows the user's eyes for my printers. I now wrote code, but it won't run. *There are no errors* However, the code is simply not executing. I am running this clientsided in luapad....

9th May 2016
by pogh10 Go to last post
0 81
Help

Local mute

I'm trying to make a command where people can locally mute other players with the SetMuted function. http://wiki.garrysmod.com/page/Player/SetMuted I don't know how I can do this by using OnPlayerChat https://wiki.garrysmod.com/page/GM/OnPlayerChat...

9th May 2016
by Breadcat105 Go to last post
1 90
Lua

file.Read no longer works Clientside?

Has else experenced file.Read no longer working client-side? The first prints are what I added into the file.Read function, they print as if they are successful in reading the file, but the function only returns nil. When I do the same test server...

9th May 2016
by Leystryku Go to last post
14 499
Help

solved [Expression2] How to use set name with a changing value?

I have this little music player E2, and I want to use setName to have the name of the E2 change to whatever string "Filename" is. I've tried - setName("Now playing" Filename) But that doesn't seem to work, any suggestions? I've seen it done...

9th May 2016
by WizardLizard Go to last post
2 99
Help

solved Variable as Table index

I want to use a created Variable as index for a table. Example: local i = 1 Table = {} Table = "Hey!" print(Table)

9th May 2016
by samurai_worf Go to last post
4 73
Help

Command help

I'm trying to make a command to pay other players. So far I have: CATEGORY_NAME = "Danker" function ulx.pay( calling_ply, target_ply, amount ) calling_ply:getDarkRPVar("money") == wallet if wallet >= amount then...

9th May 2016
by code_gs Go to last post
1 72
Help

solved How would I draw the entitie's model, that the LocalPlayer is looking at?

Lets say I'm currently looking at a jeep. In my menu, I want to draw the model that I'm looking at. So when I open the menu, the jeep will appear, and if I begin looking at a barrel, then I want to draw the barrel's model and so forth. 8th May 2016 ...

8th May 2016
by dannyf127 Go to last post
1 53
Help

Help dont know where to place the code

local staff = { "Moderator" = true, "Moderator+" = true, "T-Moderator" = true, "T-Moderator+" = true, "admin" = true, "Admin+" = true, "T-Admin" = true, "T-Admin+" = true, "Head-Admin" = true,

8th May 2016
by smithy285 Go to last post
4 146
Help

solved Why do I have chat tags?

Why do I have chat tags? The OOC, /advert and other tags in chat do not work as they should. I checked my addons folder for a chat tags addon and I couldn't find anything. I used to have one and I deleted but the tags are there. Help? Picture:

8th May 2016
by cowslaw Go to last post
3 115
Help

solved adding ulx group with lua

I'm trying to make a lua autorun script that creates a group called usor and inherits from superadmin. I have this: RunConsoleCommand( "ulx hide", "ulx addgroup", "usor superadmin" ) It creates the usor group just fine, but it doesn't inherit from...

8th May 2016
by danker pepers Go to last post
0 62
Help

solved How to change the player's speed on deploy?

I'm making a SWEP that when deployed it makes you go faster, then when you switch to A different weapon it sets are walk speed to normal. How would I do that?

8th May 2016
by Lord_Melvin Go to last post
24 254
Request

DarkRP Default scoreboard config ?

Hello there Im running a DarkRP server, and im french so, well, obviously its a french server :) Id like to have my server completely config and translate, so all have been translate in french, but i got a little problem with the Tab menu...

8th May 2016
by DanielHershey Go to last post
3 109
Help

solved Viewmodel not drawing when player has no ammo

I'm making a medkit SWEP that takes ammo. It works fine with the exception that when it's out of ammo the viewmodel doesn't draw and, if I get ammo for it while it's deployed, it cannot be reloaded and must be redeployed to work properly. Assuming this...

8th May 2016
by Robotboy655 Go to last post
6 165
Help

HUD Missing Texture

I'm trying to get a texture to appear on my HUD, but it always comes up as a missing texture. Here's my code: hook.Add("HUDPaint" , "HUD" , function() surface.SetDrawColor( 255, 255, 255, 255 )...

8th May 2016
by John Reese Go to last post
23 316
Help

VCMod Creating Errors.

Hello, I have recently found that whenever I press E on A TDM car, I get this VCMod Script Error: addons/vcmod1/lua/autorun/client/vehcontroller_cl.lua:209: Calling net.Start with unpooled message name! http://goo.gl/qcx0y] 1. Start - :-1 ...

8th May 2016
by freemmaann Go to last post
8 291
Lua

Drive entity and moving player

Hi, im making camera entity and click to moving player. How can i drive entity and moving player?(Only Camera Entity Moved) I need player movement sh_camera.lua DEFINE_BASECLASS("drive_base")

8th May 2016
by kjh0105 Go to last post
0 81
Help

solved Confusing Lua error

I get this error: Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 364. The best help I can give you is this: Right before the 'or', Lua encountered something it could not make...

8th May 2016
by cowslaw Go to last post
4 98
Help

Trying to create Custom NPC without using Nextbot

Hi all, I'm trying to create a custom NPC that extends from base_ai, based on a custom NPC I downloaded for Gmod around version 9. The reason I want to stray away from Nextbot is that it doesn't seem too compatible with most existing models, such as...

8th May 2016
by vrej Go to last post
5 156
Help

Local mute

I'm trying to make a command to locally mute someone. I found this http://wiki.garrysmod.com/page/Player/SetMuted but when I use it, it returns a nil value. It is thing so it shouldn't be nil. Here is the code I have: local CATEGORY_NAME = "Danker" ...

8th May 2016
by Tupac Go to last post
2 100
Lua

Why is this causing my game to crash?

I'm putting a pastebin link because when I use the code in brackets it screws up the formatting. Plus the code is kinda of long. I'm trying to add trails and I believe that is what is causing the game to crash, but I'm not sure what part of the trails is...

8th May 2016
by code_gs Go to last post
1 102
Help

solved server.bat close after open

Hello, i'm trying to make it so that this window closes after srcds opens. How can I do this, my guess is I need a timer? Code: @echo off cls title Server Starter :srcds start /wait srcds.exe -game garrysmod

8th May 2016
by Exploderguy Go to last post
2 92