Title / Thread Starter Last Post ByReverse Sort Order Replies Views
Help
2 Weeks Ago
by Belly136 Go to last post
2 120
Help
 

Gmod Publishing Utility "Not allowed by whitelist"

I trying to upload my weapon pack. Here my log, Looking in folder "H:/BKT Weapons/" lua/weapons/bkt_ak-47a/shared.lua lua/weapons/bkt_c-mac10/shared.lua lua/weapons/bkt_deagle/shared.lua lua/weapons/bkt_pistol/shared.lua...

2 Weeks Ago
by Drunk Combine Go to last post
19 449
Map
 

run client command on specific map startup?

Hey, I've got a small issue that I believe can be alleviated using lua, and as I haven't the expertise I would appreciate some help for a small script. I have a map that has the unit extents of 31744x31744, and as source's default r_farz value is about...

2 Weeks Ago
by Magman77 Go to last post
5 138
Help
 

Help with Burst Fire code

Hey there! I had this code working when it was like this: function SWEP:PrimaryAttack() if not self:CanPrimaryAttack() then return end local fire = function() self:EmitSound ( self.Primary.Sound ) ...

2 Weeks Ago
by Cowan108 Go to last post
5 207
Help
 

solved How to disable rendering of players gun?

I making an addon that in short terms, makes you invisible. I got the player to not rendering, but I cant seem to figure out how to stop the SWEP from rendering. Here is my code. target:SetRenderMode(RENDERMODE_NONE) //This works fine...

2 Weeks Ago
by Exho Go to last post
3 171
Help
 

Gamemode salary

Hey, i am having some problems can someone tell me why this isn't working: The problem is i don't get any money. Salary.lua: local jobUpdateTime = 10 local jobSalary = {} function AddJobSalary( team, time, amount ) jobSalary = { time,...

2 Weeks Ago
by xAl3xTh3K1nG Go to last post
2 112
Help
 

solved Odd value behavior

I've run into a very odd scripting error. This is just a very basic script I've made to show it: local original_angles = Angle(10,10,10) local angles_backup = Angle(10,10,10) local new_angles = original_angles ...

2 Weeks Ago
by jespercal Go to last post
4 108
Help
 

solved Simple way to play sounds to all players?

How can I set that a player via a menu can activate a sound that the rest of the players can hear? I tried these: sound.Play() player.EmitSound() But when I try them no sound comes out and no errors either.

2 Weeks Ago
by Author. Go to last post
7 164
Help
 

Pointshop Crosshairs

With the help of facepunch a while back, I tried to make pointshop crosshairs but still haven't managed to get it to work. The code is: ITEM.Name = 'Crosshair Test' ITEM.Price = 0 ITEM.Material = 'crosshair/crosshair_001.vmt' ITEM.AllowedUserGroups =...

2 Weeks Ago
by Baron von Hax Go to last post
26 409
Help
 

solved hook.Call & hook.Add - not being called at all.

I created a Derma Menu with hook.Call which is client side & a server side file that has all the hook.Add. The Menu(clientside): function ph_tm_p1() local base = vgui.Create( "DFrame") //Menu Frame base:SetSize(176, 571) base:SetPos(1728,...

2 Weeks Ago
by LUModder Go to last post
3 130
Lua scripting
 

NEED HELP WITH '=' expected near 'function'

addons/oicw-hl2_beta/lua/weapons/oicw_beta/shared.lua:70: '=' expected near 'function' 1. unknown - addons/oicw-hl2_beta/lua/weapons/oicw_beta/shared.lua:0 Thats appear on my console. I checked all of code and nothing, so help me CODE if (...

2 Weeks Ago
by JakusPL Go to last post
6 145
Help
 

solved How to change deaths speed in deathrun server

I need help I want to change the default speed of the deaths so that can at least keep up with runner I have searched through the gamemode folder and can't find the code what sets the speed of the deaths

2 Weeks Ago
by Charlie1996 Go to last post
7 100
Help
 

solved Custom gamemode salary not working

Anyone has an idea why this is not working? local jobUpdateTime = 180 local jobSalary = {} function AddJobSalary( team, time, amount ) jobSalary = { time, amount } end

2 Weeks Ago
by xAl3xTh3K1nG Go to last post
10 272
Help
 

PointShop - Coloured hats.

Hello everyone, I'm having a problem with my pointshop. I need to make my hat coloured, but everything works except the colour doesn't appear, here is my code: ITEM.Name = 'Unusual Fedora' ITEM.Price = 15000 ITEM.Model =...

2 Weeks Ago
by Ryanrc Go to last post
4 153
Lua scripting
 

solved ConsoleCommand Cooldown This thread has images

Hey guys, does anyone know how one would create a ConCommand Cooldown? function cooldownexample(ply) ply:ChatPrint("Wait 5 seconds before doing this again...") end --Cool Down here? Thanks in advance!

2 Weeks Ago
by SwikCoder Go to last post
20 384
Help
 

solved Workshop URL?

Hi, I've been using URL in my addon's description for a long time, and it's been working until now.. I have this: SS And it shows as an SS text and a link, but when I click it for some reasons links me to http://%22puu.sh/c6J4K/5c5fd62256.rar%22 and...

2 Weeks Ago
by The Beta Go to last post
2 102
Lua scripting
 

solved Having issues with DFrame and DButton, SetParent() not working properly.. This thread has images

I am trying to create a Derma Menu, but for some odd reason I can't set the DFrame as Parent to the DButton. Screenshot: Now the button only shows when I set local b1 = vgui.Create( 'DButton', 'base' )//Only when the base is in quotes the button...

2 Weeks Ago
by Robotboy655 Go to last post
4 128
Help
 

solved FastDL isn't working? Help us Garry.

So first of all - Back story. I've set up a server on linux deticated hosting (DigitalOcean, really good) my server addons are from my workshop collection and some are ulx ulib and etc that are on the server. Everything is working great but then I've...

2 Weeks Ago
by Robotboy655 Go to last post
13 310
Lua scripting
 

Return to original function after calling hook.

Is it possible to add a hook for a function, do something then return to the normal function? Instead of completly overriding that function I just need to add something but want it to continue on.

2 Weeks Ago
by nettsam Go to last post
7 206
Lua scripting
 

Specify "Who" in OnOtherKilled

In a nextbot, if i want my bot to respond to different NPCs dying, is there a convenient way within OnOtherKilled? If i wanted my bot to say something like "Ally is down, fall back" if one of its kind is killed, but i want it to say "Enemy is down" if...

2 Weeks Ago
by bitches Go to last post
3 170
Help
 

cl_init.lua <nowhere>? This thread has images

Sorry I'm really new to this so I'm hoping I'm posting this in the right section. If not I would like to be pointed where I could go. Anyway, I'm attempting to make a prophunt server for my friends and I and I'm running in to errors and out of ideas and...

2 Weeks Ago
by digitalalmond Go to last post
4 198
Help
 

solved How/where to get a list of all available bones for Player/NPC?

Hello. I can't figure this out, so, how or where can I find a list of all available bones for entity such as player or non-playable-character (NPC)? I have searched google and wikis, and I found nothing about this; just copy/pastes of several without...

2 Weeks Ago
by OmegaExtern Go to last post
4 125
Help
 

solved GetPrimaryAmmoType (nil value) when player has no weapons

My players are given a menu to select their loadout on initial spawn. But, my HUD doesn't seem to like it (at all) when the player has no weapon equipped. It says GetPrimaryAmmoType is a nil value of course because there is no weapons equipped. if...

2 Weeks Ago
by RonanZer0 Go to last post
2 102
Lua scripting
 

solved Cant use my SWEP in Garry's Mod?

I spent about a hour trying to figure this out but still cant, basically my weapon(based off the chair throwing gun tutorial) wont show up in the Q menu. I tryed using SWEP.Category but no luck. Here is the code: http://pastebin.com/Tz3b2gwU I also did...

2 Weeks Ago
by CodModz Go to last post
3 121
Lua scripting
 

Npc Damaging entities.

Hey guys, I was wondering if you knew a way to get an npc to attack an entity if it is obstructing the way to a player, in my case "prop_ent"

2 Weeks Ago
by RonanZer0 Go to last post
4 207
QUESTION
 

solved Lock Player Movement but not Look

Hi All, What is the most appropriate function to use for freezing a Player's movement but not their look. I want the player to still be able to look around, but not be able to move. It doesn't seem like Freeze or Lock are what I'm looking for. ...

2 Weeks Ago
by chromecide Go to last post
2 102
Help
 

solved Per-Player tables that *don't* save across map changes

local choice = vgui.Create("DComboBox",choicepanel) choicep:SetSize(125,25) choicep:SetPos(62.5,40) choicep:SetValue("Primary") choicep:AddChoice("M4A1") choicep:AddChoice("AK-47") choicep:AddChoice("G36C")...

2 Weeks Ago
by RonanZer0 Go to last post
6 170
Lua scripting
 

DarkRP Chat Box.

How do I disable the default Chat Box to add a new one?

2 Weeks Ago
by Tolee Go to last post
11 259
Help
 

Job switching npc [darkrp] This thread has images

hey so i'm making a npc that is supposed to make a window come up and display 1 job at a time until i click the next button to display the next job in the list. so i made the npc and the vgui but now im stuck and idk how to get the job list into a tabel...

2 Weeks Ago
by TrippleT Go to last post
35 483
Help
 

Code that can release a prisonor in darkrp if they "escape?"

Hello, I was just wondering if there was a type of code that allows users to be released from prison if they were to exit out of the PD building, therefore "escaping." I've seen this code on other servers, and it seems to be pretty cool. Would there...

2 Weeks Ago
by ph:lxyz Go to last post
8 382
Lua scripting
 

solved PrintTable(concommand.GetTable()) issue This thread has images

Hello. I've found an issue with the following LUA code for some reason(I am not familiar with, as on wiki it state that PrintTable() function takes table as the first argument/parameter, and concommand.GetTable() returns a table) it output this (weird)...

2 Weeks Ago
by Kamshak Go to last post
3 157
Help
 

solved AX Slot machine bet money to pointshop help

The code i have function meta:SM_GetPlayerMoneyM() if GMD == 0 then -- 1 for DarkRP return self:PS_TakePoints() end end Error I get addons/pointshop/lua/autorun/slotmachine_shared.lua:7: function arguments expected near 'end' 1. unknown -...

2 Weeks Ago
by MasterKenneth Go to last post
0 84
Lua scripting
 

HL2RP Models

Some of you may know, when you change someones name to say "DvL" or "GHOST" on Clockwork: HL2RP, it automatically sets their model to the default one. I'm wondering, is there any way to override this with a plugin. Editing sv_hooks isn't working, if...

2 Weeks Ago
by Apple_Bloom Go to last post
2 163
QUESTION
 

solved Looking for hook to reconnect players if server reboots?

I want to write a script to reconnect players if the server reboots, but after searching I can't seem to find the hook again. If someone knows it please tell me. :smile:

2 Weeks Ago
by Winter Go to last post
4 163
Help
 

how to get between values.

Some reason i been getting errors with a between lua script... if k=<1000 and k=>800 then is there a problem with this?

2 Weeks Ago
by RonanZer0 Go to last post
1 114
Help
 

Gmod Variable Help?

Ok so i am like brand new to coding, and I'm seeing the variable "Self" everywhere, and i can't find anything about it. Is that equivalent to ply? or what. sorry if it is a nebbish question but i need help.

2 Weeks Ago
by wh1t3rabbit Go to last post
3 134
Help
 

Can't fix iron sights on my custom SWEP. This thread has images

I tried flipping the view model, but that didnt work. If your going to tell me to use Clavus's SWEP Constructor then............. and

2 Weeks Ago
by Mr.Vane Go to last post
6 187
QUESTION
 

solved Get how many spare clips/mags player has?

Perhaps the title was misphrased. What I mean is how much ammo is in the CURRENT clip, and how much spare ammo in total there is also. nvm After searching again with various different queries, and looking at another person's code, I've managed to find...

2 Weeks Ago
by RonanZer0 Go to last post
0 122
QUESTION
 

solved Print the indexes in a table?

How can I print the indexes in a table? For example, I want to print "milk" and "eggs" found in the for loop. tbl = {} tbl = 1 tbl = 2 for k,v in pairs ( tbl ) do

2 Weeks Ago
by Winter Go to last post
4 131
Lua scripting
 

Fixing Playermodel Names

How would I fix playermodel names that have caps. I tried using this modified bit of code from GmodLegs but it does not work. (I have already added Valkyrie to ask for permission to use this bit of code in my swep, and will not be using it till I have...

2 Weeks Ago
by Robotboy655 Go to last post
3 131