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

solved Help with DDOS and RCON Password Theft!

Hey, today my linux root server got DDOSt the first time. I added the attackers to iptables etc and I thought it would be fine now. The DDOS was over and the conenction was stable again( ping was normal etc ). Then, about 1 hour later, someone...

3 Weeks Ago
by P4sca1 Go to last post
2 250
Help

solved Creating Ranks System Help

EDIT: I fixed this part... I need some help creating a ranks system for my gamemode. Technically I already have the ranks system it'self ( RANK_HUMAN, RANK_ZOMBIE, RANK_MASTER, RANK_NONE ) my problem is that I can't get it to choose the master like it...

3 Weeks Ago
by Zoeo Go to last post
5 231
Help

DPanel:GetSize() problem

local v_SceneView = vgui.Create("DPanel", v_Main) v_SceneView:Dock(FILL) v_SceneView:DockMargin(0,0,-2,-2) local w,h = v_SceneView:GetSize() print(w,h) v_SceneView.s_TexRenderTarget = GetRenderTarget("HoloMod", w, h, false) After last...

3 Weeks Ago
by LRED Go to last post
5 154
Help

FA:S 2 Weapons - Reload sounds are broken in multiplayer

I run a dedicated server with FA:S 2 Alpha SWEPS installed, but the reload/draw sounds for them don't always play properly. This only seems to happen in multiplayer, not singleplayer. I've been pulling my hair out all day trying to correct this bug....

3 Weeks Ago
by huntingrifle Go to last post
1 79
Question

solved Number mean script- how to simplify?

I made a rather long function to calculate the mean of any amount of numbers, or a table of numbers, and this table can also contain numbers or more tables with numbers. I'm thinking about pull-requesting it on GitHub to math.lua, but first I'd like to...

3 Weeks Ago
by MPan1 Go to last post
5 116
Question

How do I make an HUD wobbles around?

I've made a little helmet overlay thingy addon but now I want it to like, wiggle around if you know what I'm trying to say. I want to accomplish something similar to Halo 4 with the visor helmet thing, but I'm not sure what command to use for that.

3 Weeks Ago
by TFA Go to last post
2 273
Help

solved Starship troopers playermodels

Hi everyone, Just wondering if there is an easier way of making some playermodels for a server (being as though i'm not really very good at making playermodels). Or if someone could point me in the right direction of some substitute models for Starship...

3 Weeks Ago
by hayche88 Go to last post
0 99
Help

solved Setting Different Walk Speed on guns Then No Guns

So, I'm trying to make it so if you have a glock you have 200 walk speed and with no glock 250. I tryed coding this but it didnt work what how did I go wrong? Code: weapon_glock/shared.lua local function Test( ply ) if ply.GetActiveWeapon then...

3 Weeks Ago
by FiBzY Go to last post
0 95
Help

Sound for NPC

hello How to replace the default sounds on your zombie?

3 Weeks Ago
by godred2 Go to last post
0 84
Lua

HUD Help This thread has images

I posted something on this a while ago, then I thought I figured it out. Apparently not :/ Basically, I'm trying to draw an Avatar Image on my HUD which draws on the player's spawn, and destroys on the player's death. Here's my code atm: Client Side |...

3 Weeks Ago
by James xX Go to last post
5 163
Question

How to..

Hello, I have seen on a gaming community they can check for specific conditions, and I checked the wiki for a similair function to return these, but I didnt find anything, therefore I am asking: Is it possible to: ..Check if connected with Steam...

3 Weeks Ago
by James xX Go to last post
2 224
Help

solved ps2 spawn

Hello, I'm having problems with the addon PointShop2 It does not work, this part of the script (no error.) function ITEM:PlayerSpawn( ply ) print( "00000000000000", ply, self:GetOwner( ) ) print( "00000000000000" ) end Pointshop2.AddItemHook(...

3 Weeks Ago
by godred2 Go to last post
4 210
Help

Noob gLua help not changing sizes.

Hi, I'm new to gLua and I started with making a gamemode called "Fat Simulator" where you can get fatter by eating, however, I have a problem. When ever the fatness goes up by another 100 it thinks the fat is a new variable, so it prints the new fat while...

3 Weeks Ago
by Zet0r Go to last post
7 256
Help

DarkRP - Spawn with ammo AND lower hunger taken in HungerMod

So I was trying to use this command in jobs.lua = PlayerLoadout = function(ply)ply:SetArmor(100) ply:GiveAmmo(120, "pistol", "ar2") end, but it did not work. So what code works? :/* And second of all, how do you lower the hunger in HungerMod, it goes...

3 Weeks Ago
by Dexyer Go to last post
0 78
Help

solved Anyone know what this could be?

Hello I'm using a host called GMCHosting and when I use scripts from scriptfodder 80% of the time I will get a "Nil Value" error for example: addons/sf4/lua/sf4/vgui/ship.lua:155: attempt to concatenate field 'category' (a nil value) 1. unknown -...

3 Weeks Ago
by dbrbb Go to last post
0 94
Help

Help with ULX Physgun!

Okay, so I have ULX, but I cant pick up other players on my ded server with my physgun, can someone link me to a walkthrough for how to set it up? Cause I have no clue, and didnt set it up properly obviously.

3 Weeks Ago
by SteppuFIN Go to last post
4 134
Help

DIsable CP team damage, but keep self inflicted damage.

Hey guys. I made a little script using "ply:isCP()" to stop team damage between Cops on DarkRP, but because of the way I have it set up how could I disable team damage, but keep self inflicted damage like fall damage, missed grenades, rockets etc. Here...

3 Weeks Ago
by BeZerk Go to last post
6 197
Beta

Pill pack hook?

Hey - I have a gamemode that allows you to build, but once you pull out a weapon, you lose godmode. Is there a way to make it so that if a pill from Parakeet's Pill Pack is used, it'll change a networked variable? thanks

3 Weeks Ago
by MadParakeet Go to last post
1 142
Request

How do you limit the player loadout to three? This thread has images

Okay, so I am (obviously) new to coding lua. As of now, the only thing that I have coded without help was a strip weapon file that only spawned you with one gun of my choosing. Now I am trying to code a file that only allows the player to have three...

3 Weeks Ago
by YourStalker Go to last post
8 282
Question

Easy Lua Problem

I have a question, probably easy to answer, however, I am stuck in a piece of lua because I can't find the answer, I need someone to describe relative positions of ovals originating from a real algebraic curve and as limit cycles of a polynomial vector...

3 Weeks Ago
by thegrb93 Go to last post
4 210
Question

solved How does a server manage RAM usage?

Long story short, I am making a DarkRP server and the computer I am hosting it off of has 24GB of RAM. I was wondering if the server automatically uses more RAM when needed, or do I manually have to change the amount of allocated RAM. If so how? ...

3 Weeks Ago
by jonnyswboy Go to last post
2 124
Help

Nextbot flanking This thread has images

Red dots - chasers. Green dot - target. Blue dots - waypoints. Greenish area is navmesh. First chaser goes straight to the target. Second one must flank, but he goes straight on the same path. The way to make second chaser go to another path is...

3 Weeks Ago
by MysticLlama Go to last post
4 281
Help

Using SetupDataTables / NetworkVars on players This thread has images

Hey guys, I feel kinda dumb on asking this since Networking Entities is pretty well documented and explained on the wiki. But no where in there does it explain how to set these up for players. I figured you could do this through the metatable. I am...

3 Weeks Ago
by Chessnut Go to last post
10 437
Help

ULX Motd URL This thread has images

now for some reason, I cannot enter a site link for a motd. When I got and check the box, the second box does not become check able and I cannot paste in a link. I even tried using the console command. Once I did that, the ulx motd just turns grey. Heres...

3 Weeks Ago
by dence47 Go to last post
3 135
Help

solved Problem with this little script

So for some reason I get this error: addons/testaddon/lua/autorun/modelviewer.lua:28: bad argument #1 to 'SetSize' (Panel expected, got number) 1. SetSize - :-1 2. openF1Menu - addons/testaddon/lua/autorun/modelviewer.lua:28 3. func -...

3 Weeks Ago
by BeZerk Go to last post
2 86
Lua

Sprint Addon

Hello all! I'm asking those of you on the Facepunch forums to help me out. I've spent hours looking for a sprint/stamina system addon for a TTT server that I work with. So far, none of the sprint systems have worked out for us. I'm looking for a system...

3 Weeks Ago
by glarkon Go to last post
2 188
Love

solved Image above players head This thread has images

Hello, I wanted to draw a image above the players head, I thought about using ToScreen(), and DImage, but that would probably just create infinite images in the HUDPaint hook, I've seen in this thread( http://facepunch.com/showthread.php?t=1420495 ) to...

3 Weeks Ago
by James xX Go to last post
6 256
Question

solved Problem with MySQL

Hello, I have a little problem with mysqloo. So I want to get the points from pointshop 1 from database and give them the players connecting to pointshop 2. So the console says: 'Database linked', so the connection is successful, but I don't get any data...

3 Weeks Ago
by Maksimo007 Go to last post
6 264
Lua

CAMI - Common Admin Mod Interface ( 2 3 Last ) This thread has images

We've wanted this for years. There are too many conflicts between the admin mods and the solutions implemented by individual admin mods are not sufficient. I've made a pre-alpha draft super WIP document:...

3 Weeks Ago
by FPtje Go to last post
98 5,181
Help

solved How do I know if a player has the pause menu open?

Is there a hook, function, or variable I can look at that tells me when/if a player has a pause menu open or not within the client realm?

3 Weeks Ago
by Robotboy655 Go to last post
1 104
Lua

RunJavascript & Soundcloud Methods

I really suck with javascript and I've never use p:RunJavascript() before. Is there any way to control the methods listed here? https://developers.soundcloud.com/docs/api/html5-widget#methods Is there any way to store the results of the getters in a...

3 Weeks Ago
by YesBacon Go to last post
2 186
Help

http.Fetch read data before EOF?

Hello, I'm using http.Fetch to call a PHP web-page which performs an action. This action can take anywhere between a few seconds, and a couple of minutes to complete. While the PHP action is running, it "echo"'s the percentage of completion. However, I...

3 Weeks Ago
by TylerB Go to last post
5 226
Help

Teams and Gamemode need help.

So I was trying to make custom teams and classes for a gamemode I wanted to make but the classes won't load at all and I am not sure why. Shared.lua GM.Name = "Vampires" GM.Author = "Ari Draconia" GM.Email = "N/A" GM.Website = "N/A" function...

3 Weeks Ago
by Ari_Draconia Go to last post
6 172
Stupid

solved [ERROR] expected near ',' 1. unknown - addons/scents/lua/entities/sc_shit_npc/init.lua:0

I don't even know what this error is. Here's my code: include( "shared.lua" ) AddCSLuaFile( "shared.lua" ) AddCSLuaFile( "cl_init.lua" ) function ENT:Initialize() self:SetModel( "models/monk.mdl" ) self:SetHullType( HULL_HUMAN )...

3 Weeks Ago
by meharryp Go to last post
1 116
Help

solved I can't hear sound when i fire this weapon (TTT)

AddCSLuaFile() if CLIENT then SWEP.PrintName = "AWP" SWEP.Slot = 2 SWEP.Icon = "vgui/ttt/icon_awp" SWEP.IconLetter = "r" end -- Always derive from weapon_tttbase

3 Weeks Ago
by jeepingviini Go to last post
6 112
Help

FA:S DarkRp CAn't set maximum clipsize.

Hello everyone! i'm creating DarkRp server and try to use FA:S weapon. The problem is that i couldn't set max clipsize (i tried to use SWEP.Primary.ClipMax but it isn't working). I even can't get weapon to spawn without additional clip. Every time when i...

3 Weeks Ago
by overlorder2 Go to last post
1 106
Lua

DarkRP Job change function

I am creating an add-on for darkRP and one feature of the add-on is changing the users job which works fine buttttt... the job change is not recognized by the default DarkRP HUD or tab menu (it still says citizen even if you are a gangster). Here is the...

3 Weeks Ago
by BlazinPanda Go to last post
1 93
Question

solved Buy Function to Spawn an Entity at a Certain pos.

Hey guys. Sorry if this is a stupid request / question, but I am fairly new to lua and programming in general. The addon for my darkrp server NPC Shop uses a similar add item system like DarkRP's addentities.lua. It requires a buy function to spawn the...

3 Weeks Ago
by YakS Go to last post
3 104
Help

Help with Drug dealer NPC

Hey, I made a Drug dealing npc with a simple function to make it work. I manged to create the npc and everything the problem is that I cant figure out how to make my function work. The idea of the function is to make it so you drag the entity into the npc...

3 Weeks Ago
by MrAnarchy Go to last post
6 129
Lua

Set ULX Rank via Lua

Hey - how would I go about setting someone's ULX rank via lua in a serverside file? Thanks.

3 Weeks Ago
by TylerB Go to last post
5 200
Help

Bad argument for 'GetMapCreatedEntity'?

Hi, so I have the table: Doors ={ = 0, --//PRISON - not openable = 350, --//Mayors house (front door) = 0, --//Mayors house (back door) not openable = 150, --//Small house next to mayors house = 200, --//police

3 Weeks Ago
by Zet0r Go to last post
5 132
Help

solved Problem with View Model Bodygroups

Hello. I've been trying to get view model bodygroups working with the FA:S 2.0 SWEP models(ported by Spy). Now, I've run into a weird situation. Here's a function from FA:S 2.0 Alpha SWEPs(it's a clientside function FYI). Please note that I extracted the...

3 Weeks Ago
by MegaTronJohn Go to last post
0 81
Help

solved Help - Trying to remove jump falling angle This thread has images

When you noclip and unnoclip when you hit the ground, you're whole screen moves, I looked if it the code was in the base gamemode but I can't find anything if you know where it is please help, thanks.

3 Weeks Ago
by FiBzY Go to last post
4 117
Lua

[DarkRP] Disabled defaults not doing anything?

Here is excerpts from my disabled defaults file.. http://pastebin.com/C1CSiGeb After doing that, all the listed items are still in game. There are no errors to indicate what the issue might be. Any ideas?

3 Weeks Ago
by sirlenopow Go to last post
0 75
Help

Player Start Model This thread has images

Hey! I need help with a Lua script, ive been told its easy, so maybe im just a dumb fuck, but I need a script for specific playermodel to use on start. Like I want to always have the exact same skin in my server, and want to give my admin a custom skin he...

3 Weeks Ago
by Breadcat105 Go to last post
10 171
Lua

solved Anyone willing to share m9k shipment codes?

I was coming to ask if anyone would be willing to share their shipment codes for the M9K guns. All the codes I have must be old, because they sort all guns into "other"

3 Weeks Ago
by sirlenopow Go to last post
9 230
Lua

Player Model Within HUD

What would be the method of going about drawing a the local players model onto a HUD?

3 Weeks Ago
by whitestar Go to last post
9 1,523
Help

ULX MOTD Problems This thread has images

How do I fix it to where I can use a website as my motd? This is a jailbreak gamemode btw if that means anything

3 Weeks Ago
by SwiftMJ Go to last post
5 132
Help

Creating an entity This thread has images

Hey guys so i am a noob with lua, How would I go about making a mininuke with the big explosion effect. It will be shot and when it lands & touches the ground it explodes. Could anyone help me or give me a video to help :)

3 Weeks Ago
by whitestar Go to last post
1 113
Lua

Split a X value

Hi I recently decided to optimize a script, and I want him to like split an amount of money between allowedteams here is a part of the code :) if BANK_Custom_DropMoneyOnSucces then for _, ent in pairs(ents.FindByClass("paddy_bank")) do...

3 Weeks Ago
by PaddyFloch Go to last post
0 103
Help

Particle Effects?

So i want to learn how to do particle effects for addons and stuff but i cant seem to find any tutorials where do i start?

3 Weeks Ago
by zippy36jr Go to last post
2 106
Lua

Gmod: Player Rejoin Spam fix?

Hey! I'm LOT, and I'm extreamly new to FacePunch. (Registured 5 minutes ago) Anyways, I'm in inquiring about a fix for this problem I'm having. (and I cannot find anything about this anywhere) Occasionally I'll see a Mingypoo or two rejoin my...

LOT
3 Weeks Ago
by tyguy Go to last post
16 396
Question

Help with DFrame This thread has images

Hello, I have a DFrame with a DNumberWang and a DComboBox inside. I'm using Panel:SetVisible( true ) to show the Panel and gui.EnableScreenClicker( true ). This makes it possible to move around, while interacting with the mouse with the dframe. I...

3 Weeks Ago
by P4sca1 Go to last post
6 136
Help

Server CPU Always 100%

So I know it's my addons, no argue there. We upgraded our server to a virtual dedicated server with 6 core/processors and 7 GB. There are the addons I have in the server: http://gyazo.com/74fb9d164ba672522a12341e1c4eccd3...

3 Weeks Ago
by Busan1 Go to last post
8 291
Lua

solved CreateSound serverside not networking to clients. This thread has images

For some reason when I call CreateSound in my SWEP then Play on the returned audio channel it sporadically networks to clients. As in sometimes it works and sometimes it doesn't, the latter more often than not. I've looked through the sandbox code and...

3 Weeks Ago
by mcd1992 Go to last post
6 207
Help

solved Expected to close?

Hello, I have this code: Doors ={ = 0 --//PRISON - not openable = 350 --//Mayors house (front door) = 0 --//Mayors house (back door) not openable = 150 --//Small house next to mayors house = 200 --//police

3 Weeks Ago
by Zet0r Go to last post
2 88
Lua

Need help - model isn't set up properly

hey guys. So I'm trying to learn what is hexing, when to do it, and to what models. I took this skin from game banana - http://css.gamebanana.com/skins/136959 I set the view model from the skin. The world model is set from another swep because...

3 Weeks Ago
by kapach333 Go to last post
0 72
Question

solved Need help with table.insert

Hello, I want to have a table like this: twinnerBetAmounts = { name = points, name2 = points2, name3 = points3, etc }

3 Weeks Ago
by P4sca1 Go to last post
0 66
Lua

Preventing doors from being blocked by props This thread has images

Hello, I am attempting a slight rework of the Door STool (if you're not aware, it is a tool that creates 'prop_door_rotating' and 'prop_dynamic' doors that can be triggered by the player via binds or opened by pressing E while aiming on them). I...

3 Weeks Ago
by DevKin Go to last post
5 248
Lua

Models are shown as a big ERROR

hey guys So I was coding ak47 wasteland rebel for TTT. I hexed the models and the sounds. Now when I spawn the gun its world model shown as a big error, also when you pick it up there are no hands and there's a giant error sign above where my hands...

3 Weeks Ago
by kapach333 Go to last post
6 218
Help

solved Create NPC Template

Hi guys, I'm trying to make Dropship functional, I made everything working, except one thing that I don't know how to make. I'm trying to flag a Combine soldier NPC entity with flag NPC Template (code: 2048), I tried this: local ent = ents.Create(...

3 Weeks Ago
by Ehsan Go to last post
5 113
Help

Capture Points Addon Missing Server Side File This thread has images

So I have this capture points addon for DarkRP and it is missing the key component to make it work which is the server side file. I would really like this solved so I can use the addon. I was wondering if anyone can code the server side file for me. Below...

4 Weeks Ago
by meharryp Go to last post
9 331
Help

Can Someone look over this code please?

Can someone look over this code and comments next to them to see if I'm grasping what functions and statements do ? I tried to lable it in my own way that i'd understand so bear that in mind. FYI: This is a file I made for myself so it's not actually...

4 Weeks Ago
by James xX Go to last post
6 164
Help

attempt to index global 'Player' (a function value)

I was wondering as to how I could reference the player function without recieving this error? SetGlobalInt( "hunger", 0) local food = 1 function GameInitialize() timer.Create( "Food", 2, 0, function() if food >= 100 then ...

4 Weeks Ago
by crazyscouter Go to last post
9 253
Lua

attempt to call method 'SteamID64' (a nil value)

I can't use pl:SteamID64() even though it exists. Maybe it is because I am using a local player? ( local pl = LocalPlayer() ) If it is, are there any other ways I can get around this? (This is client side)

4 Weeks Ago
by isnipeu Go to last post
3 208
Lua

attempt to index a string value with bad key

Note: I am very new to lua and glua So I save a number to a file, and when I try to read the file again, I get this error: gamemodes/rpg/gamemode/init.lua:66: attempt to index a string value with bad key ('class' is not part of the string...

4 Weeks Ago
by tiffit Go to last post
8 196
Lua

solved Tried to use a NULL value! (Timer Failed!)

So I am modifying this vehicle health script, yes I know I didn't make it, but I am changing it to my likings. In doing so I have hit a problem I can't seem to figure out. The only thing I really changed was that first the vehicle ignits, then it gives...

4 Weeks Ago
by Bazoogle Go to last post
2 106
Help

Bone Position Return-Values Twitching This thread has images

I'm rendering models attached to a player's bones. I've been doing this for years, and it's pretty straightforward. But there's this issue coming from within the gmod code that I can't account for and that I don't know how to correct or circumvent. Both...

4 Weeks Ago
by ThrowAwayAcct Go to last post
1 93
Help

DListView Paint?

Hello, Running Paint on a DLiewView item will change the background coloring/styling, how can I change the coloring and styling of all of the lines, and the headers? local DermaListView = vgui.Create( "DListView" ) DermaListView:SetParent(...

4 Weeks Ago
by crazyscouter Go to last post
1 91
Lua

unusual gun hold types.

i am running a zombie survival server and I'm having this very odd bug that i can not figure out. for some reason often players will hold their gun pointed down. ( as if it is resting at their side) this bug does not happen all the time or to all the...

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

solved Entity:GetPos()

How would i use Entity:GetPos() in a script to to get the position of an entity iv placed in the game. Thanks for the help.

4 Weeks Ago
by 0bama Go to last post
1 99
Request

How to get into gLua? This thread has images

I have little to no experience with lua but I have experience in editing gLua files. I really want to understand and code gLua but i don't know where to start. I want examples of things I should try and make. One thing I don't understand when looking at...

4 Weeks Ago
by MarcusBrown Go to last post
20 492
Help

Clientside SetColor() help

Clientside SetColor(Color(0,0,0,255)) reverts back to Color(Color(255,255,255,255)) as soon as target entity moves. function ClientColor() for k, v in pairs(ents.GetAll()) do if v:GetModel()!=nil then v:SetColor(Color(0,0,0,255)) end end...

4 Weeks Ago
by baldursgate3 Go to last post
2 105
Lua

solved bobs_gun_base lua errors when shooting (help needed)

so when I shoot the m9k_deagle I recieve this lua error: gamemodes/darkrp/entities/weapons/bobs_gun_base/shared.lua:356: attempt to index a nil value 1. ShootBullet - gamemodes/darkrp/entities/weapons/bobs_gun_base/shared.lua:356 2....

4 Weeks Ago
by shadeofdoom Go to last post
5 84
Help

Lua Help

Hey, im new to this so if this isnt the place im sorry. But I just scripted my first swep, it will not show up in sandbox, can anyone tell me a specific file path I need to place my mod in, in order to spawn it in sandbox single player?

4 Weeks Ago
by Zet0r Go to last post
4 137
Help

solved file.Read

Hello, facepunch. How to read from a file only the first line? http://wiki.garrysmod.com/page/file/Read --Find file local files = file.Find( "ps_key/" .. net.ReadString(), "DATA" ) --Read file local contentss = file.Read( "ps_key/" .. files,...

4 Weeks Ago
by godred2 Go to last post
7 208
Lua

Lua problem

Error: gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:185: attempt to index a string value with bad key ('function: 0x31e1ad80' is not part of the string library) 1. checkValid -...

4 Weeks Ago
by Kaieggy Go to last post
2 181
Help

Check if Pointshop is active?

Hola, Basically i'm making a navigation type menu and includes rules, donate etc.. one in particular tab is pointshop.. Now for all the others such as rules and donate I can click and sets the other invisible so there's no overlapping.. This however is...

4 Weeks Ago
by Handsome Matt Go to last post
1 97
Help

solved Getting index of a value in table ?

is there any function for thing i wrote in title ?

4 Weeks Ago
by Busan1 Go to last post
1 73
Lua

DarkRP Jobs

Hello :) Quick question again. How do you give someone ULX god when they choose a certain job, then when they change jobs they Loose ULX God ?

4 Weeks Ago
by code_gs Go to last post
1 110