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

solved GM:PlayerHurt, attacker:TakeDamage not working?

hook.Add("PlayerHurt", "traitortest", function(victim, attacker) if (inuse) then if attacker == self.Owner and victim:GetRole() == ROLE_TRAITOR then victim:TakeDamage(200, attacker, self) elseif attacker == self.Owner and victim:GetRole() !=...

13th October 2015
by 343N Go to last post
5 264
Question

solved Does Gmod -debug flag impact performance?

Anyone know what this flag actually does and if it impacts performance?

13th October 2015
by Keosan Go to last post
6 508
Lua

Food issue

So I have the food and household items for my server and people can eat without a hp limit. How do I make it so people can eat until they get to a certain hp?

13th October 2015
by MPan1 Go to last post
5 216
Request
13th October 2015
by Keosan Go to last post
14 436
Lua

Script Error Help TTT

Keep getting this error: gamemodes/terrortown/gamemode/vgui/sb_team.lua:81: attempt to perform arithmetic on field 'Width' (a nil value) 1. unknown - gamemodes/terrortown/gamemode/vgui/sb_team.lua:81 There are no visual differences to the GUI...

12th October 2015
by Jayman47 Go to last post
0 178
Lua

SWEP not being registered

Hi, so im messing around a bit in gmod and lua with a basic gamemode. Problem is now that the SWEP i want to add is not registered . I dont really understand why because an entity which i created works flawlessly. if(SERVER) then AddCSLuaFile()...

12th October 2015
by xerox8521 Go to last post
5 268
Help

Error with AppleJack. - MySQL Tables we think.

So my developer is lost, and he does not have a facepunch account, so he asked me to post this. He is getting this error gamemodes/applejack/gamemode/metatables/sv_player.lua:654: attempt to concatenate field 'MySQL Table' (a nil value) 1....

12th October 2015
by Borris_Squad Go to last post
0 227
Help

solved Client file functions to server

So I'm working on a project, think something similar to GTerminal by Chessnut. I setup a system where people can connect to 'addresses' basically just checks to see if there is a folder serverside with the same name as the address, and all the contents...

12th October 2015
by Shoopdawhoop3 Go to last post
3 256
Stupid

CodeForage ?

I would like to know why a Staff of CodeForage send Message in French Forum to recruit a man to upload script in your market ? CryptAlchemyt please answer ... Thank

12th October 2015
by AIX-Who Go to last post
8 457
Help

Anticheat for bigger servers?

Hey guys, I realized most bigger communities such as Divinity RP and ZARP don't even use an anticheat, however, I refuse to get rid of mine. I believe the source of lag on my 60 slot server is Cake Anticheat, however, I cannot find another up-to-date...

12th October 2015
by Buzzkill_HABB Go to last post
17 1,176
Help

solved Need some help. Pretty easy however it won't work for me.

I'm trying to make it so only gun dealers can see this weapon in the F4 menu, but for some reason everytime it allows everybody to see it, and even buy it. Any ideas? DarkRP.createShipment("DC-17m Blaster Rifle", { model =...

12th October 2015
by falcons Go to last post
0 162
Help

Pointshop Steamid Buy?

I was wondering if its possible for only certain people to buy an item with a steamid Like is it possible to say ITEM.Allowuser = STEAM_0:0:90854780 Thanks

11th October 2015
by Nookyava Go to last post
9 1,646
Help

Trouble Making Effects Save

Hi, I'm editing a plugin for Clockwork (static entities by Kurochi). The plugin doesn't support effects, since they're basically entities with attached entities. I'm trying to fix that. Here's the sv_plugin file, containing most of the important code...

11th October 2015
by 0bama Go to last post
1 177
Lua

solved Unknown Error Need Help

https://gyazo.com/d970fe6e633dc1aef71882bdf2506340 I don't have much knowledge of what I'm actually doing when working on gamemodes. I kind of just test things, and if something isn't working I'll go and find a fix. I've tried multiple things to fix...

11th October 2015
by dannyf127 Go to last post
4 293
Lua

How do I fix this lua error?

A runtime error has occurred in "gamemodes/darkrp/entities/entities/spawned_shipment/init.lua" on line 45. The best help I can give you is this: Some smartass thought they were clever by setting the 'amount' of shipment 'Rope Restraint' to 0. What...

11th October 2015
by deadpotato363 Go to last post
2 294
Shitpost

solved Draw outside Panel

Hi. Can i draw (surface.DrawRect e.g.) outside DPanel?

11th October 2015
by Koji6ac9H Go to last post
2 146
Lua

Add player ent

local noobs = table.Copy(players) table.RemoveByValue(noobs, murderer) local magnum = table.Random(noobs) if IsValid(ent2) then ent2:Give("weapon_ent2") end local ent1 = table.Random(noobs) if IsValid(ent1) then ent:Give("weapon_ent1")...

11th October 2015
by Maravis Go to last post
9 341
Help

Jobs.lua Sectioning F4 Menu

Hello people of facepunch. Now I have been making jobs for a long time but never learned how to section them in the f4 menu. For example: CP (Under this would be all the CP classes). And so on. That way it is easier to find them and see what classes work...

11th October 2015
by PigeonTroll Go to last post
1 185
Help

solved Problems with directional sounds when emitting from an entity

The script I am working on plays a wav sound that emits from the player using Entity:EmitSound(). Some of my custom wav files, when emitted from a player, actually play from that player and it has direction as it should with a sound being played in the...

11th October 2015
by Mythikos Go to last post
0 163
Help

sendlua with playername sent without messing with the string unexploitable

local chattingplayer = string.PatternSafe(pl:GetName()) print(chattingplayer) print("chat.AddText("..chattingplayer.."\"Just called a raid\")") v:SendLua("chat.AddText(\""..chattingplayer.." Just called a raid\")") So i have this right...

11th October 2015
by meharryp Go to last post
17 809
Map

Has anyone considered implementing streaming terrain?

Effectively increasing map size... Is it even possible in gmod? I might give it a shot when I get home, surely it's possible..

11th October 2015
by Nak Go to last post
18 960
Lua

solved Need help letting other ranks see admin chat.

Hello, I've Googled this issue for a whilst now, but I can't find an answer. I'm trying to make a custom rank (Moderator) have access to viewing admin chat. I tried setting the inheritance to admin, which worked, but it also gave them access to all...

11th October 2015
by paladynne Go to last post
9 1,199
Help

SWEP Not appearing on draw when out of ammo

Whenever I run out of ammo on my sweps, and pull it out again, it doesn't appear. I get some ammo, pull it out again, and its fine.

10th October 2015
by GbrosMC Go to last post
10 431
Help

solved Tools not getting the player who is using it? everything is worldprop

All the items spawned by the toolgun on my server create world ents instead of ents for the players gamemodes/sandbox/entities/weapons/gmod_tool/stools/light.lua:141: attempt to call method 'SetPlayer' (a nil value) 1. MakeLight -...

10th October 2015
by kulcris Go to last post
1 176
Lua

Scripting multiple npcs to spawn on one flag

I've been trying to find out how to do like what is in the Humans+Resistance tab of the spawn menu. The rebels, citizens, and refugees all spawn with different heads and I would like to know how to take that knowledge and add it to other categories and...

10th October 2015
by lance2535 Go to last post
0 192
Help

60 slot DarkRP server lag spiking constantly

Hello guys, i've been running a DarkRP server on the map Downtown_v4c_v2 (typical, right?) and I never had any issues on the server, up until the point where I upgraded to 60 slots. Personally, my ping on the server hovers around 30-50 with up to 40...

10th October 2015
by Mikey Howell Go to last post
24 1,407
Help
10th October 2015
by boxvader Go to last post
1 172
Rant

EntityEmitSound and NPCs

function MoveToPosition( npc, ent ) if ( !IsValid( npc ) or !IsValid( ent ) ) then return end npc:SetSaveValue( "m_vecLastPosition", ent:GetPos() ) npc:SetSchedule( SCHED_FORCED_GO_RUN ) end function GM:EntityEmitSound( tbl )

10th October 2015
by MaximLaHaxim Go to last post
4 242
Help

solved Serverside ChatPrint, Help?!

Alright, I made a ChatBot that I called EDI for a Clonewars server, it uses Lua Regex to compensate for broken English, and is done with the PlayerSay hook. She is almost done! Though, I want to give her Color when she returns a message... I know that...

10th October 2015
by Dan, Go to last post
4 268
Help

Drawing issue?

draw.DrawText(DarkRP.getPhrase("lockdown_started"), "ScoreboardSubtitle", ScrW() * 0.5, ScrH() * 0.15, Color(cin * 255, 0, 255 - (cin * 255), 255), TEXT_ALIGN_CENTER ) That isn't drawing anything, neither is the default DarkRP lockdown text: ...

10th October 2015
by roastchicken Go to last post
25 716
Help

T-Man Models in GMOD please help!

I made some custom classes and for most of the player models they T-Man pose. https://gyazo.com/53c693b99e6a88e6900c5b4f376e5123 Please help ASAP

10th October 2015
by Haxxorz Go to last post
4 245
Lua

How to make teleporting SWEP in GMod?

So... How to make SWEP that teleports you to place where you aim?

10th October 2015
by MPan1 Go to last post
2 465
Help

How to get the reason someone left your server

Hey I was just wandering if there was a way to get the reason someone left your server. e.g if someone gets kicked it says Kicked: reason or if someone gets banned it says Banned: reason or if someone just left the server it says Disconnected by user or...

10th October 2015
by stev_ Go to last post
1 211
Lua

Learning LUA.

Dear, Today I decided to try to learn lua. I am familiair with PHP and I know the most basic code languages HTML and CSS. I' ve been using this tutorial, and lua doesn't seem to be too hard. Has anyone got a link for me on all the things that GLua adds...

10th October 2015
by MPan1 Go to last post
25 885
Help

Files are not downloading when joining

Hello, i'm having a problemwith some props/effects for pac3, i added them into my server, i made this file : if ( SERVER ) then AddCSLuaFile("classycutedl.lua") resource.AddFile(...

10th October 2015
by Nekomi Go to last post
17 548
Stupid

Function isn't running

Okay. So, I have a function called Round_Start. It's being include'd in my gamemode's init.lua file. However, it refuses to run. function Round_Start() GAMEMODE:OnRoundStart() print( "func has run" )

10th October 2015
by JasonMan34 Go to last post
12 529
Help

FastDL will not cooperate ( 2 Last )

I have read every possible guide on how to set up FastDL. It is set up, it works. Every file downloaded from FastDL ends up here: http://puu.sh/kDogf.png Now the first weird thing is that whenever a file is downloaded from my FastDL, it downloads...

10th October 2015
by whitestar Go to last post
55 814
Question

Run all hooks except the gamemode hook.

I'd like to override GM.DoPlayerDeath, but I'm not sure how to prevent the gamemode function from running while allowing all the other hooks to run. Does anyone know?

9th October 2015
by darkjacky Go to last post
10 427
Help

Entity rotation and YAW problem

hi, i want to rotate an entity by 90 degrees on the vertical axis. this is my code: angle = self:GetAngles() angle:RotateAroundAxis(Vector(0,0,1),90) self:SetAngles(angle)

9th October 2015
by ploy Go to last post
4 252
Question

solved Detecting whether a door is open or not

How do I detect whether a door is open or not?

9th October 2015
by YaYaBinks3 Go to last post
2 192
Help

solved Sorting tables by string key (which is a date) ?

I've been trying to do something simple but it's been taking me ages since I can't think of a way to solve this. I need the code below to show the user's screenshots on a panel, which it does perfectly fine. The problem is, I need them to be IN...

9th October 2015
by Zeh Matt Go to last post
4 264
Help

solved Encrypting files

Is it possible for me to encrypt a lua file so others cant read it but the server can still read and run the code just fine?

9th October 2015
by sasherz Go to last post
19 882
Help

solved GMOD | Timed Restart

Hey i have a quick question. I would like my server to restart every 24 hours at like 4am or something. How could i accomplish this ? Im guessing its going to have to be a external program as lua won't be able to do this ?

9th October 2015
by YaYaBinks3 Go to last post
19 711
Question

GMod wiki down for anybody else?

CloudFlare reports its down, is it just for me?

9th October 2015
by MPan1 Go to last post
4 249
Help

Server is crashing often

My server is crashing about 2 times a day. I'm running the server on Linux (Debian 7.8 wheezy) Gamemode is TTT The only thing I can find before the server is crashing is always something similar to this: CBaseEntity::SetAbsOrigin( -nan -nan nan...

9th October 2015
by Keosan Go to last post
17 802
Help

Entity colors in DModelPanel

Ingame, my playermodel looks like this http://i.imgur.com/N9lDpnX.png However, when I try and create a simulation of my player in a DModelPanel, it looks like this: ( this when I call DModelPanel.Entity:SetColor( col ) )...

9th October 2015
by Arizard Go to last post
2 257
Lua

solved Toggle derma panel with SetVisible

I must be using this wrong. It goes away fine but never comes back. I've read through a bunch of threads but am still not understanding why this doesn't work. I am creating this function just inside the create panel function at the very end. What...

9th October 2015
by Blakestr Go to last post
12 422
Question

Staff wanted (Super)admins

April 2013 268 Posts Steam Profile Hello FP'ers, A month or two ago, a friend of mine and I have started renting a GMOD server to use for development. We're both into (game) development. Sadly we've found our time for GMOD has been fewer than...

8th October 2015
by mib999 Go to last post
7 495
Shitpost

solved Help with mysqloo

Hi, i using mysqloo at my server and I need to make it: local db = mysqloo.connect( "127.0.0.1", "root", "", "dbname", 3306 ) function db:onConnected() local q = self:query( "SELECT 5+5" ) function q:onSuccess( data ) PrintTable( data ) end...

8th October 2015
by Koji6ac9H Go to last post
1 171
Help

Removing table with value of table?

Hello, i'm creating script but i ran into problem, if i remove entity which it is sticked to, i will have null entity and it will be useless to check stuff on it, so how would i remove table which is created like this: Entities = {id=id, ent=ent} ...

8th October 2015
by darkjacky Go to last post
1 203
Help

solved SWEP Customize-able

Hello, I have been stuck for the last day or two. I have made a SWEP that throws a prop. However I wanted to be able to customise it in game without editting the lua file. I have tried making it use a menu to select the color but I have not been...

8th October 2015
by Jimbo_ Go to last post
2 233
Help

Adding show keys to hud

Hey I was wondering how to make it possible to show what players keys are pressed on their hud e.g. on their hud off to the side you can see when they press wasd crouch and space? Thanks,

8th October 2015
by geferon Go to last post
9 490
Question

Adding a hotkey to concommand

So I almost had this work when I saw a guy said to use the hook think however that will not allow me to close it. hook.Add( "Think", "MenuKeyListener", function() if ( input.IsKeyDown( KEY_F5 ) and !menuOpen ) then createMenu() end end...

8th October 2015
by Astr0niiX Go to last post
10 682
Help

Couldn't include file 'include\modules\tmysql14.lua'

I'm getting this error in my console and I am not quite sure why (I mean I know that file is missing but where is that even squired?) I have libmysql.dll in my directory with srcds.exe like its always been and gmsv_mysqloo_win32.dll in the lua\bin

8th October 2015
by Flamingsword Go to last post
5 390
Help

Removing weapon crashes the server

function SWEP:Holster() if SERVER and self.Primary.Clips < 1 then self.Owner:StripWeapon( self.Weapon:GetClass() ) end return true end So essentially I have these disposable grenades, and once the player has used up their...

8th October 2015
by Empty_Shadow Go to last post
3 205
Stupid

solved Please explain hook.Call/hook.Run

Hello Facepunch, I wanted to create my own hooks, but whats the difference between hook.Call and hook.Run? Also, upon creating a new hook with those, will there be automaticly a function like GM:HookName(vargs)? Or how do I make such a function?

8th October 2015
by Z0mb1n3 Go to last post
9 806
Lua

MY first real work tasked by a friend

AddCSLuaFile("shared.lua") include('shared.lua') function ENT:SpawnFunction(ply, tr) if !tr.Hit then return end local SpawnPos = tr.HitPos + tr.HitNormal * 1 local ent = ents.Create("boxOfHealth") ent:SetPos(SpawnPos)

8th October 2015
by UndeadSold1er Go to last post
10 601
Lua

player.GetAll() except?

Can I do player.Getall() except for a SteamID? I want the "Highest Money" on the Elite F4 Menu to not include me.

8th October 2015
by roastchicken Go to last post
18 1,139
Help

Props auto disable collisions?

How would I make it so props automatically have their collisions disabled when being physgunned, and when inside another prop if both aren't frozen?

8th October 2015
by TheEmp Go to last post
27 895
Help

func_tracktrain not moving to path.

So I have a camera on the map that goes around pointing at Vector(0,0,0). At it has 10 path_track's setup and the 10th has its next target set to 11 on the map but the func_tracktrain ends at the 10th for some reason. After not getting it to work I...

8th October 2015
by Moka Go to last post
0 231
Help

solved ent:SetRenderMode(RENDERMODE_TRANSALPHA)?

I am trying to make a prop's alpha 200 while physgunning. This is what I have. local r,g,b,a = ent:GetColor() ent:SetColor(r,g,b,200) ent:SetRenderMode(RENDERMODE_TRANSALPHA) However it isn't doing anything. I know that is being run properly...

7th October 2015
by Sweepyoface Go to last post
3 250
Help

solved Reading a table of vectors from a file - is it possible?

Hey there. Now, I've wanted to make a system for one of my upcoming gamemodes that reads a table of vectors to spawn weapons at from a file, allowing for users to create their own coordinates to spawn on their maps. However, I don't know how/if it is...

7th October 2015
by MaximLaHaxim Go to last post
3 182
Lua

solved Useful Hooks/ functions you have found without proper documentation

I have been going through the gmod wiki now for a while and every now and then i come across entire sections that have no description and no examples on how to use them or what they do. I have heard "rumors" of hooks that are not even on the wiki. ...

7th October 2015
by kulcris Go to last post
3 250
Help

solved bzip for content pack?

Hello, I want to make a content pack players can download and place in addons in case they have problems with our FastDL. Can I simply make a zip of the fastdl directory (models, materials, etc)? They are all .bz2 compressed. Or do they have to be...

7th October 2015
by Sapd Go to last post
10 370
Shitpost

Developer - Recommendation(s)

Looking for a Developer here on FP who specializes in making custom and visually appealing VGUI/Derma. Any well-known developers who would meet that criteria?

7th October 2015
by Nookyava Go to last post
25 1,072
Help

Darkrp admin privileges problem

Hello to all of you guys i am on the making of a darkrp server every thins is going great i have add custom stuff i am not the best coder of all times but i am decent i can spot the erros and stuff but for this one i realy need help i have disable the...

7th October 2015
by Sweepyoface Go to last post
7 2,177
Help

solved shared.lua breaks server & client side

Hello Facepunch, I wanted to try myself on an own custom inventory system, want tried to make the "main" var (INV) globally shared, and include the file both in the client and server, console doesnt give errors, but _ANY_ client/Serverside doesnt get...

7th October 2015
by whitestar Go to last post
2 300
Help

Spawn tdm cars in lua

Hey I found out to spawn cars, but how do i spawn a tdm emergency car. This doesnt work I know how to spawn the regular jeep. local car = ents.Create("charger12poltdm") car:SetModel("models/tdmcars/emergency/dod_charger12.mdl") ...

7th October 2015
by tzahush Go to last post
10 1,279
Help

How do you copy an addon and make changes?

Let's say you have a vehicle addon. You download the addon and the you extract it using gma and then unsubscribe from the addon. You should still have the folder and it should still work. Check. You make changes to the skin.vmt/vtf files and make a...

7th October 2015
by Blakestr Go to last post
2 218
Help

Player trail not updating

I am trying to make it so on player spawn it will update the players trail rgb but I am getting some funny error. function GM:PlayerInitialSpawn( ply ) if (ply.Trail) then ply.Trail = util.SpriteTrail(ply, 0, Color(red, green, blue), false,...

7th October 2015
by PigeonTroll Go to last post
6 213
Question

Paypal's IPN slow recently?

Hey fellas, Has anyone else experienced Paypal's IPN being slow recently? Usually the purchases go through instantly put recently it seems like it can take as long as 20 minutes. Has anyone else suffered of this? What's weird is with the transaction...

7th October 2015
by Teddi Orange Go to last post
7 595
Help

logging question?

I'm making a program that captures the logs from rcon i have enabled logs on my server by putting these in my server.cfg. I know logging on that end is working correctly but someone told me i had to be added to the servers log address list. So my...

7th October 2015
by xESWxDEATH Go to last post
0 195
Help

How Can I add custom muzzle flashes to my SWEP?

Hey, so my swep uses the default weapon base (weapon_base) and i want to add custom muzzle flash effects (IN .VTF FORMAT) to it. What is the code or function that allows me to put in custom muzzle flashes? Thanks. 5th October 2015 anyone?

7th October 2015
by tzahush Go to last post
4 306
Question

First person hands not showing in server

So i've setup a server and am applying models through pointshop. The models are showing up, but the handmodels aren't. This is the model lua file. This is the pointshop file.

7th October 2015
by Mofu kun Go to last post
14 440
Question

m9k models

Is there any way to add support for other hand models as the css ones for the m9k weapon models. Is there some program which can do it?

7th October 2015
by deinemudda32 Go to last post
2 231
Question

solved Best way to get serverside information clientiside

Hey, So I have a function, running serverside. The function is checking something and returns a value. I need that return clientside, so I'm wondering how I can access it clientside?

7th October 2015
by code_gs Go to last post
1 171
Question

Donation through in-game

Hello, my name is Zeo Mause. I was wondering if there is any type of donation system that is right in-game and when you want to purchase such as amount of credits it will take you to the Paypal page. See, I am searching for a credit based donation system...

6th October 2015
by YaYaBinks3 Go to last post
3 292
Help

Understanding Entity - changing a vehicle's skin

I extracted an addon using GMA and was trying to edit the skin. I used VTFEdit and, if I remove the addon, it works. I'm trying to find a way to 'copy' so I can use this in addition. I discovered the SetMaterial command, but I have NO idea where I...

6th October 2015
by Blakestr Go to last post
0 190
Help

Rescource Crucher

Is their some way to tell what addon/thing is causing my server to overload and eat all the resources?

6th October 2015
by mib999 Go to last post
1 175
Help

Can you stop people from using bindings

On my server a lot of people spam stupid bindings all the time to the point where its just chat spam. I was just wondering if there is a addon or something that limits people from typing in chat or or makes it so they cant use bindings? Any help will...

6th October 2015
by Robotboy655 Go to last post
1 230