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

solved Couple of questions regarding vehicle scripts + keyvalues.

Hello, I ran into an issue the other day when trying to grab info about some vehicles I had installed. (serverside) I noticed that there were some really awesome commands added for vehicle entities such as: Vehicle:GetMaxSpeed and Vehicle:GetRPM (...

5th October 2016
by kpjVideo Go to last post
1 133
Help

solved How to create derma panel using ent:use

So I created a code that is giving me 0 errors but it doesnt want to work. I have it to open a derma panel when the ent is used but it doesnt want to work. FULL CODE: hook.Add( "InitPostEntity", "create_box", function() local box = ents.Create(...

5th October 2016
by Bkamahl Go to last post
6 231
Lua

Help with hp

i need help with my hp. if im joining the server i will be a cadet (bacause i wanne make a star wars RP server) then i have 100 hp but i join fleet i will still be 100 hp but if i kill my self i have 600 hp how do i need to fix that thank you for...

5th October 2016
by whitestar Go to last post
2 168
Lua

How can i remove some amount of chars from a string?

Okay, so let us say there is this string "TestString" I then wanna remove some of them like if there was a way like this: string.Remove(2, right) then the string would look like this "TestStri". If you need some more information please write down below.

5th October 2016
by Melonos Go to last post
3 209
Help

FindInSphere, GetPos. why.

local ply = LocalPlayer() local LocalPos = ply:GetPos() print (ents.FindInSphere(LocalPos,500)) returns a random table, something like this:] lua_openscript_cl find_test.luaRunning script find_test.lua... table: 0x362f0ad0 ] lua_openscript_cl...

5th October 2016
by NeatNit Go to last post
30 747
Lua

Want to learn how to make an oven addon.

I lack experience in coding, sad but true. I really want to learn how to make a very basic cooking system. An example is the baker job in 1942 roleplay. All I want to do is put dough in the oven, wait like 2 minutes for it to bake, then out pops bread...

5th October 2016
by darpeyface Go to last post
3 194
Lua

solved GetViewModelPosition not being called

Hello there, my problem is simple, I've got a SWEP base with the function GetViewModelPosition in order to make ironsights, but the function is not even getting called. I tried placing a 'print' but it just wont work. Code for the base (here I have...

4th October 2016
by AlbertoBC Go to last post
3 210
Help

solved Im not able to pool a message.

Hello, I have this problem where im not able to pool a message (I'v just started learning lua so im no expert). I can't get the server to send the "I Recieved The Message" text. Here is the server script to pool and recieve the message: ...

4th October 2016
by TESQUIL Go to last post
4 151
Question

Best place to learn Lua.

Yes this is pretty much my post in the programming section but with like 2 differences but I felt it needed to go into the gmod category because it was a gmod related question. As the title says what is the best place to learn Lua on the Internet and or...

4th October 2016
by Aeternal Go to last post
7 252
Lua

ULX Freeze Fix

I currently use this old script called Physgun Freeze witch allows admins on my server to freeze players just like props. Currently there is a bug i am wanting to fix but i don't know how to go about it. I have been looking into it but still can't figure...

4th October 2016
by Its Pawsative Go to last post
1 154
Stupid

solved I am failing to make a fixed aim at 90 degree.

Hey everyone of you awesome gmod guys! so basicly i want to fix the players aim so that he/she cannot look up/down. my trouble being that all the methods ive tried prevents the player to rotate around themselves. ive tried with SetEyeAngles, and i...

4th October 2016
by grunewald Go to last post
11 484
Help

solved TDM help

So I have recently used SVN checkout to get the TDM car files for my DarkRP server and have put it in my addons folder. But the cars aren't showing up in the Q>Vehicles menu. Please could anyone help me with my file placement if I have put the TDM folder...

4th October 2016
by JustBen1357 Go to last post
6 243
Work In Progress

Portal Gun Logic

So the current publicly available portal gun is pretty glitchy, and I aim to fix that. A few questions: 1. How does Valve make two different parts of the map (seem) attached? 2. How can I allow a player to walk through a portal with a brush behind it...

4th October 2016
by YeTenszi Go to last post
25 1,356
Question

best way to get keyboard input from the driver of an entity?

What's the best practice? (if it matters, it's a car entity and needs to check input from the driver, for things like acceleration, braking, steering, etc.) Should I just use the ENT:Think() function to check the driver's currently held down keys? or use...

4th October 2016
by Mornedil Go to last post
2 190
Help

Map Differs From Servers

Hello, I am currently running a server but unfortunately whenever people try and join it displays "Your Map Differs From Servers" and does not allow them to join. Are there any fixes that I could attempt to do?

4th October 2016
by The Commander Go to last post
7 289
Help

Create a playerclip ?

Hello guys, I am excited about this idea. // Entity information ENT.Base = "base_anim" ENT.Type = "anim" --ENT.Base = "base_entity"

4th October 2016
by kem008 Go to last post
0 158
Help

Ulx and Multiple groups

Hello there i'm working on a futur server and i block with Ulx groups.I want to make the TEAM_ALLIANCE = DarkRP.createJob("M.Shepard N7", { color = Color(75, 0, 130, 255), model = { "models/nikout/masseffect3/Shepard_OldN7.mdl" }, ...

4th October 2016
by Angryscot903 Go to last post
4 239
Help

Need help

Hey so im pretty new to gmod lua and im trying to make a double tap sprint scrpit to load onto my server this is what i have so far it does not seem to work so please help if (CLIENT) then end if (SERVER) then TestForChanges("+foward")

4th October 2016
by Skere_ Go to last post
4 180
Help

solved Keep getting error for Ignoring unreasonable position

So I have create a prop_physics and I have set the pos to 0,0,0 which I confirmed it is not clipping anything in the world/map. Still I keep getting the error "prop_physics:SetPos( -1.#IND00 -1.#IND00 -1.#IND00 ): Ignoring unreasonable position. Nav File...

4th October 2016
by Bkamahl Go to last post
0 193
Help

solved How to use world entity??

So I created a entity when all entities have initialized but when I place function box:Use(c , a) it keeps saying box is a nill value do I have to put the function in the hook? Full Code: hook.Add( "InitPostEntity", "some_unique_name", function()...

4th October 2016
by Bkamahl Go to last post
2 162
Question

[TTT] Telling client about their ragdoll?

Whenever a player dies, I would like to network their ragdoll to them. Currently, a client does not know which ragdoll is theirs until someone searches the body. I've attempted to send ply.server_ragdoll:EntIndex() as an unsigned 16-bit int, and then get...

4th October 2016
by serfma Go to last post
0 162
Help

Remove Toolgun Tracer shot and sound!

Hello! I am wondering on how to remove a tracer shot from a tool that is used by the toolgun. I have a tool that spawns in NPCS or whatever that is custom but I don't know how to add onto it to remove the tracer and sound when spawning them in, it...

3rd October 2016
by NeatNit Go to last post
5 299
Lua

a few questions.

i want to make an addon that has a bunch of diseases in it, not viruses. dont ban peas. all amazing jokes aside, i want it to be like the TVirus from Garry Bombs 5, you break it and if you go near it you get infected. so my questions: ○How can you tell...

3rd October 2016
by darpeyface Go to last post
21 490
Help

solved [NextBot] navmesh problem

Working on the navmesh of the map, and I can't seem to get this path to work http://i.imgur.com/AM8T5yY.jpg The bot just gets stuck there, while it should easily be able to pass. Garry's test NPC gets stuck as well (so its unlikely that its my bot...

3rd October 2016
by Skere_ Go to last post
2 160
Love

GetEyeTrace and healing

ok i am trying to heal the player i am looking at my attempt local eye = LocalPlayer():GetEyeTrace() if eye.Entity:IsPlayer() then eye.Entity:SetHealth(100) end

3rd October 2016
by JasonMan34 Go to last post
9 291
Lua

a little question

Hi, i was wondering if i could force a npc to play another activity instead of his native one, i mean is it possible to force the npc to play ACT_CUSTOM instead of ACT_IDLE something like that?

3rd October 2016
by Sillirion Go to last post
5 208
Lua
3rd October 2016
by beeteegee Go to last post
1 188
Stupid

Running useful lua with menu state.

So this is probably gonna sound stupid, but I am looking for a way to run SmartSnap through the menu lua state so I can use it on servers that don't necessarily have it. Also so !cake's anti cheat doesn't squawk at me when I do. Say what you will, but I...

3rd October 2016
by RileyGuy1000 Go to last post
5 297
Help

Demote menu error

Hey, im creating a demote menu in darkrp so the mayor can fire people, here is the code: local DemoteTeams = {TEAM_SWAT, TEAM_POLICE, TEAM_MEDIC, TEAM_SWATS} -- Teams the mayor can demote local MayorTeam = TEAM_MAYOR -- The name of the mayor team if...

3rd October 2016
by sannys Go to last post
1 162
Help

math.random not being random

I know nothing about lua. I'm looking to learn so I wanted to make a simple script that would spawn zombies around a map. I am having troubles using math.random to get a random pos. Here is my current code. local zList = { "npc_zombie",...

3rd October 2016
by Blueasharky Go to last post
2 211
Help

solved attempt to index global 'GAMEMODE' (a nil value)

Ive been trying to get my addon to print 3 lines but keeps giving me: addons/apbrjokerbox/lua/autorun/server/init.lua:1: attempt to index global 'GAMEMODE' (a nil value) 1. unknown - addons/apbrjokerbox/lua/autorun/server/init.lua:1 Ive tried...

3rd October 2016
by Bkamahl Go to last post
6 217
Help

Player Traceline

I have an addon that replaces sprays with a emblem the user creates and I'm attempting to make it if they are looking directly at the emblem it prints the sprayers name in chat. But when I use eyetrace it doesn't count the sent as an ent ? When looking...

3rd October 2016
by gonzalolog Go to last post
5 314
Lua

Logo On Hud Isn't Showing

I made a logo on hud script and it works if i execute it client side, but i made it an addon and it isn't working. It's just a lua folder then autorun then logo_client.lua in there and logo.png in it. I don't know what's wrong. local x = ScrW() local...

3rd October 2016
by Its Pawsative Go to last post
7 246
Help

How to use this GM correctly

https://wiki.garrysmod.com/page/GM/CalcMainActivity https://wiki.garrysmod.com/page/GM/UpdateAnimation Im not really sure how these two are supposed to be set up. How would i go about if I want my animation to be double the speed when running?

2nd October 2016
by NeatNit Go to last post
1 188
Help

Some questions about 3d2d's

So i've successfully learned the basics of 3d2d, but i have a problem, how can I move the derma backwards without it being all weird when I move the object around the map, ive tried local pos = self:GetPos() + Vector(5,0,0) but then it has the...

2nd October 2016
by NeatNit Go to last post
4 181
Help

Question how to set people to random class/job

So me and my friend are making a Tdm type server that have a theme of starwars battlefront (The new one). So we have been thinking about making hero classes, we didn't want it to be a pickup where you could find it randomly around that map. But have it...

2nd October 2016
by Reformed Go to last post
2 129
Help

How to test if a player is in a steam group error

Well, I want to make it so a player becomes a group if he is in the steamgroup. Is this how? http.Fetch( "https://steamcommunity.com/groups/dropdeadservers/memberslistxml/?xml=1", local meta = FindMetaTable("Player") function meta:CommunityID()...

2nd October 2016
by Nookyava Go to last post
15 497
Question

These two green blocks...

So, I made my nextbot able to jump or crouch for overcome some obstacles, but if it smashes into a corner, it exactly get stuck. In short, Is there a way to get some info, about upcoming obstacles, from these two green blocks?

2nd October 2016
by gonzalolog Go to last post
6 249
Lua

vON: Vercas' Object Notation [Release for developers] ( 2 3 Last )

GitHub Repository Why? Well, the current serialization method available in GMod - GLON - is slow. And some trials with (extremely) complex data structures have failed miserably. I also don't like the idea of using non-printable characters. What I...

2nd October 2016
by vercas Go to last post
112 13,686
Help

Help with using table methods please.

Hello facepunch, I'm just curious to ask if anyone is willing to help me, I'm trying to figure out what are the differences of these tables below and when/why would you use these methods. local = myMethod1 ={ = true -- what's the actual use of...

2nd October 2016
by Chickengbs Go to last post
6 189
Help

solved Lua error causing "unassigned" job in darkrp

so when i get into my dark rp server, it says there is 1 lua error in console. here it is gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:470: attempt to index local 'jobTable' (a nil value) 1. unknown -...

2nd October 2016
by FaZe_Melvin Go to last post
4 178
Work In Progress

solved GMod - What are you working on? September 2016 (#61) ( 2 3 4 5 6 7 8 9 Last )

Highlights from the previous thread

2nd October 2016
by Mors Quaedam Go to last post
329 28,414
Art

Prop Hunt HUD Aesthetics

I've been playing around with creating a better end round notification for Prop Hunt on and off, nothing complicated, but I can't help but agonize over the appearance. How does this look to you guys?

2nd October 2016
by Monkey4TL Go to last post
1 245
Lua

solved External Webpage Command

Hello everyone. So I've being trying for a couple hours now to get some chat commands to work how I want them to work. Basically my server uses Discord for communication, and I want to set up a command when you say !discord it launches discord and...

2nd October 2016
by Angryscot903 Go to last post
5 249
Help

Team Setup won't work

Hi, so as the title says parts of my team setup script wont work. It sets teams up properly but wont set values I put. Help? teams = { name ="Genesis", color = Vector( 0,0,1.0), weapons = {"sfw_prisma","sfw_eblade","sfw_vectra"} Health = (350)...

2nd October 2016
by whitestar Go to last post
8 200
Help

Awarns not working

Awarns used to work but now when i type !warns this pops up: addons/awarn2/lua/autorun/client/cl_awarn.lua:660: Calling net.Start with unpooled message name! http://goo.gl/qcx0y] 1. Start - :-1 2. unknown -...

2nd October 2016
by MrPresident Go to last post
9 279
Help

solved Is there any documentation on custom sounds?

I'm trying to make a SWEP play a custom sound, but I have no idea what directory to put the .WAV files in. I tried several different methods, all came to console printing out "file probably missing from disk/repository". I tried the wiki but I only see...

2nd October 2016
by whitestar Go to last post
1 109
Lua

Door Model Lua Error in start.bat startup

When i start up my darkRP Server, i get this error apartment1f3btrm has Door model (models/props_c17/door01_left.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file apartment1f4entr has Door...

1st October 2016
by FaZe_Melvin Go to last post
3 176
Help

Need help making a GUI on an entity

Im trying to make a interactive ATM which you can deposit and withdraw money from, I cant code that, but I'm having a hard time trying to figure out how I could put a gui on the ATM machine and have it so if i were to click the deposit menu, it would...

1st October 2016
by whitestar Go to last post
3 149
Lua

DarkRP Pocket problem

hi, i pickup meth in darkrp pocket. 20 lbs. I took out of his pocket meth. Please help me.

1st October 2016
by gonzalolog Go to last post
9 391
Lua

solved Network variable not updating on client?

Trying to keep this short but I have a entity that has a price on it, stored with Entity:NetworkVar. When the user changes the price, it only updates on the most recently spawned entity. I'll attach a video showing exactly what I mean. Also, it...

1st October 2016
by LeeTheCoder Go to last post
18 586
Help

I need help with this, im really stuck

I have been doing some editing to a gamemode and i need to be able to change the walk speed of classes and the health when they change to the class. This is the document for it ------------------------------------------ -- PLAYER CLASSES --...

1st October 2016
by kieran23101 Go to last post
0 125
Help

Help on Pricing Things

So I have this Gmod DarkRP server where everyone starts out with 25k cash and I need a way of pricing things on the server. For example: my guns. I've listed out what guns I want to be the cheapest and which ones I want to be the most expensive and for...

1st October 2016
by YoutoYokodera Go to last post
5 254
Help

Can you use CSS with Gmod's DHTML, and how do I send Lua code via Javascript?

I am an absolute beginner at Lua, but I got pretty good experience with web development. I've done research, and this is what I got so far. I know the onclick is used completely wrong, but I want it to activate the Panel:Remove() function on...

1st October 2016
by mijyuoon Go to last post
1 169
Help

Distance and vector issue.

Hi, how would I get the distance from a player to the ground? I tried: local pos = ply:GetPos() local dist = pos:Distance( Vector( pos.x, pos.y, 0 ) ) However this is pretty much useless as each map could have/has a different location for 0, 0,...

1st October 2016
by Dj6619 Go to last post
4 177
Help

solved Making input.IsKeyDown not spam

Alright is there anyway to add a delay to input.IsKeyDown because when i use it with a print statement it spams the console.

1st October 2016
by Fresh~ Go to last post
15 390
Lua

Need help with Noclip

Hello Guys My server is resetting sbox_noclip 0 if im turn him off in my server and if im restarting it it will reset pls help me Hello guys i need help with my hp. if im joining the server i will be a cadet (bacause i wanne make a star wars...

1st October 2016
by Skere_ Go to last post
12 423
Help

How Would I Go About Scaling an Entity?

Hey, I'm wondering if anyone is able to help me with a lua issue I'm having. I have an entity created, with physics. I want it so that when it is created, it starts at a size of 1 then scales to a size 3 times as big over the course of 3 seconds....

1st October 2016
by whitestar Go to last post
2 235
Help

Camera fixed on Front View? | Help

local function PlayerSpawn( ply ) ply:Freeze( false ) CalculateFrontView( ply, ply:GetPos(), 90, 100 ) end hook.Add( "PlayerSpawn", "PlayerSpawn", PlayerSpawn ) function CalculateFrontView( ply, pos, angles, fov ) local view = {}

1st October 2016
by Mikey Howell Go to last post
6 372
Help

NPC Spawner

Okay, well I need help with this addon it's needs revaping it's simple things but here are the requests on it. 1. Allow NPC's to be spawned that are seperate addons not apart of HL2 (because when I spawned in a Clone Trooper it came up as a citizen.)...

1st October 2016
by Keosan Go to last post
4 263
Lua

solved User Say Variable in Chat command

Alright so I'm having trouble with a command to make the user say in chat. Right now i have this. ply:ConCommand( "say Help Please." ) but I want a variable to be posted in there. The Variable is made when a button is clicked, my variable...

30th September 2016
by xsickxskills Go to last post
3 194
Request

Need Help with Prop Model for Prop Hunt Gamemode.

Hi everyone, I am here asking for help for a project that I have been working on for a while. What I currently am trying to do is to force the "prop" models to load a custom pre-defined model over the Kliener model. What I do know is that in...

30th September 2016
by soggy Go to last post
0 109
Help

solved Increasing the damage of NPC_grenade_frag

I need to increase the damage of a default entity (NPC_grenade_frag). How would I do that? I didn't find anything useful in ent:GetTable()

30th September 2016
by _AMD_ Go to last post
6 222
Help

RT Scope Issues

I've got some various issues with my RT scopes that have popped up since I transferred to my own base. I'm trying to code my own variable zoom with the FoV on the scope. The old base I was using changed it via a think hook in the autorun file. ...

30th September 2016
by Lucky9Two Go to last post
0 138
Question

Panel bounce-in and out transitions?

Hello, Has anyone worked out a way to make a bounce-in and out transitions for showing or hiding a panel yet, much like Discord's panels or animate.css's bounce-in and out transitions? If so, I'd like to hear about that. The only way I can...

30th September 2016
by Tenrys Go to last post
8 364
Help

solved Custom Ammo Types Breaking the HUD

I'm running into an issue with custom ammo types. If I use a custom ammo type, the default HUD ammo counter will not display unless the game is out of focus or there's a menu open; if the menu does display in these cases, it flickers rapidly. If I...

30th September 2016
by Lucky9Two Go to last post
3 191
Help

egh, networking questions.

first question, in the wiki (http://wiki.garrysmod.com/page/net/Receive) it says function callback is "The function to be called if the specified message was received." what does this mean, do i put in a function here or do i put in the name of a...

30th September 2016
by darpeyface Go to last post
9 180
Help

Fuckin. ENT:GetPos struggles. (storing vector to a word)

I cant figure out how to store a vector to a word, as GetPos is a function value. 29th September 2016 AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self:SetModel( "models/props_c17/doll01.mdl" )

30th September 2016
by nedredl Go to last post
6 210
Help

solved DarkRP error message

Warning: Unhandled usermessage '_Notify' How do you fix this? I can't seem to spawn in Vehicles and switch to some jobs.

30th September 2016
by Tarvik Go to last post
5 179
Help

Table.Insert help.

Hello, I'm wondering if someone could help me, I'm wanting to know how i can insert things into the table below with 'table.insert.' local ModelTbl = { {Item = "Katlan", Amt = "1"}, {Item = "Aurora", Amt = "1"}, {Item = "Slice of...

30th September 2016
by Chickengbs Go to last post
2 172
Help

Killstreak Addon | Error? or not?

sv_init.lua include( "config.lua" ) -- Don't touch anything below this! Seriously, it will break everything! -- Streaks -- function RKM_Streaks( ply, inflictor, attacker, team, msg ) local streak = {}

29th September 2016
by jacobcooper18 Go to last post
7 265
Help

Process for replacing a swep's model

What would be the process of replacing a swep's model?

29th September 2016
by SoggyWontonz Go to last post
8 226
Lua

solved Entity not solid to player

Can someone tell me, why this Entity doesnt collide with the player? AddCSLuaFile() ENT.Type = "anim" ENT.Model = Model("models/props/cs_italy/bananna.mdl") AccessorFunc( ENT, "thrower", "Thrower") local planted = false

29th September 2016
by Robotboy655 Go to last post
8 231
Lua

ENT:StartTouch

So I am here again the "Noob". I am working on my addon and I want it so when my "cooking_pot" touches my cooker it will go onto of the cooker it will remove its self. Part from my Init.lua function ENT.StartTouch(ent) if ent:GetClass() ==...

29th September 2016
by mijyuoon Go to last post
12 323
Help

Entities Spawning too Close (Killing You)

Hey guys, I have an issue. The tank addon I have works via the entities menu. I am creating a MilitaryRP server, and I need to use the F4 menu, and the entities section to be able to spawn the vehicles for people playing the jobs. When the tank...

29th September 2016
by Strength2000 Go to last post
7 207
Question

Your Opinion: Coding systems within systems

Iím writing a crafting system as an exercise for experience and fun but it is becoming tedious to go through all the motions to get to and test what Iím coding. When you guys code how do you skip straight to the section being developed? How do you code...

29th September 2016
by Skere_ Go to last post
9 405
Help

Can someone help for modify Stupid TDM round system ?

Hello, I just want to modify Stupid TDM Round System. I don't know how to do that, but i want make Rounds end when one of team is alive, like CS. The last team alive win the round and have 1 point. The team who have most of points win the game. I...

29th September 2016
by Skere_ Go to last post
3 184
Help

Group System? Help, how to test?

Well, I am making a Group System for my server aka invulnerable to each other but its like a clan. Anyway, I was looking into "SetNWInt or String" and "GetNWInt or String" but doing this: for k,v in pairs(player.GetAll()) do -- something here ...

29th September 2016
by Skere_ Go to last post
26 727
Lua

Creating Vehicle Addon

Recently I have been trying to create a boat vehicle with a model I found on the workshop. The model owner stated that if anyone wants to use the model to actually make a working vehicle, then they can. Their are no tutorials to try and get you started in...

29th September 2016
by Fresh~ Go to last post
4 202
PC Games

/buy is disabled and other help needed.

Whenever i try to buy something in the weapons tab. It says /buy is disabled. If i try to buy something in the ammo tab it says ammo is disabled.

28th September 2016
by smithy285 Go to last post
2 170