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

give ammo to weapon

so ive aded the pointshop to my server and im trying to add more ammo into the 357. this is what ive added to the lua file of the 357 but i cant get it to work. ITEM.Name = '357 Magnum' ITEM.Price = 200 ITEM.Model = 'models/weapons/w_357.mdl'...

19th February 2014
by CheeseCakeMan Go to last post
6 248
QUESTION
 

Can persistent data store tables?

I want to save some player's tables as pdata but I'm wondering if I can just save the table as it is or if I need to deconstruct each value in that table one by one and make a setpdata and getpdata for each?

19th February 2014
by CheeseCakeMan Go to last post
2 63
Lua scripting
 

solved Pointshop (Playermodel by Steamid)

So basically I would like to know why this isin't working. This is the objective of the code. To make a certain model (take gandalf for instance) then make him ONLY buyable by one steam id that is set on him. Here is the code I have right now. ...

19th February 2014
by [AG]Slender Go to last post
3 277
Lua scripting
 

Deploy animation question...

Hello! so I got a SWEP that has two draw animations; one of them is completely clean and the other consists on introducing the magazine and pulling the slide back and forward. Let's say I wanna take profit of that, and what I pretend is to set this last...

18th February 2014
by CheeseCakeMan Go to last post
14 212
Lua scripting
 

solved Getting player IP

Hey, i'm working on this universal ban system for all my servers, ( not just gmod ) I need a way to get a users IP so that when they are banned, I can transfer it into a database and ban them on all my other servers. I understand steamID is more...

18th February 2014
by cocomut Go to last post
1 125
Lua scripting
 

solved Temporary whitelist

Dear community, Today I started to code with Lua, because I want code a temporary whitelist that works from 12:00 to 19:00. I coded this whitelist beause my server team plays all the time TTT and donīt look for the Minecraft server. My little script...

18th February 2014
by miny1997 Go to last post
15 388
Lua scripting
 

solved Custom ViewModel Bob.

First of all, I want to say thank you to the helpful developers here on facepunch for helping me on a custom viewmodel sway. I have a new problem, that I am not quite sure how to take on. I am interested in making a custom weapon bob (the viewmodel...

18th February 2014
by Stormtrooper595 Go to last post
2 163
cpp
 

solved Linux compiled modules not working

Do modules have to be compiled under a certain version of gcc/glibc/binutils? The modules compile fine, but srcds cannot open them. Even a module as simple as the example provided on the gmod wiki ends up with "could not load module library" ldd...

18th February 2014
by KingofBeast Go to last post
0 137
Help
 

How do I a thing change True to False and vice versa with one key?

I want to activate and deactive something but this doesnt seem to work! Here's the code function CanDoTheThing(ply) if ply:KeyDown(IN_USE) then ply.candothing = false end if ply:KeyDown(IN_USE) then ply.candothing= true end end

18th February 2014
by shadowsaints Go to last post
2 167
Help
 

Ulx lua help

How would i go about adding a timer restriction to a command in ulx ?

18th February 2014
by log404 Go to last post
0 118
Lua scripting
 

Lua

In my code, I need to call a method attached to a entity using pcall, so I use this. pcall(ENT:doThings()) This yields an error whenever its attached to something... Any way to get around this?

17th February 2014
by Hydreh Go to last post
2 155
QUESTION
 

DarkRP VIP Job Help

Hi, I tried to use custom checking on my VIP job because of course I want it to be VIP only. When I jon I get no jobs or guns. TEAM_PROTHIEF = AddExtraTeam(" Pro Thief", Color(102, 153, 51, 255), "models/player/combine_super_soldier.mdl", ],...

17th February 2014
by Lolcats Go to last post
1 174
Help
 

solved Scripted entity does not spawn, just a shadow.

AddCSLuaFile() ENT.Name = "Test" function ENT:Initialize() self:SetModel("models/props_lab/crematorcase.mdl") self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) end First entity, I...

17th February 2014
by Nookyava Go to last post
11 261
Help
 

Problem Linking my SQL database with Darkrp

Hello I have been trying to link up mysqldatabase to my server and it doesn't want to work. Also When i try installing the sqloo files to lua/bin they fail to transfer. I get these errors in console. /////////////////////////////////////// // ...

17th February 2014
by puppycheese Go to last post
2 168
Help
 

Pointshop Give Item

Hi, I was just wondering if there was a way with the _Undefined Pointshop that when you buy a single use gun it does not get pulled out but it gets holstered and you have to scroll to it in your items to pull it out and use it. Any help would be really...

17th February 2014
by Nookyava Go to last post
4 92
Help
 

Need help displaying weapon and team

Hello once again. I post here because I am in a bit of a fix. I can't seem to get the team to display on my hud or get the current weapon the player is holding to display...I have an idea of what it would look like in the code but anything I try doesn't...

17th February 2014
by Nookyava Go to last post
4 143
Steam
 

DarkRp Job Modules

Hey I have started making my darkrp server and im adding custom jobs but idk what to put for the models is there like a folder in the server folder that contains the player modules? And please excuse my name I wasn't paying attention and it cut off part...

17th February 2014
by smithy285 Go to last post
1 219
Help
 

solved SWEP:PrimaryAttack() only running serverside?!

Hello. I'm trying to make a variable on the swep (clientside), change when the player PrimaryAttacks. Here's my code: function SWEP:PrimaryAttack() if SERVER then print("server") elseif CLIENT then print("client") end if self.Anims then...

17th February 2014
by sackcreator54 Go to last post
2 82
Help
 

help with old gmod12 antiprop

I am getting an error with constraint.GetAllConstrainedEntities() This used to work great with gmod12. The person that made this for me no longer play on steam anymore. local function AntiCollision(ply, ent) if(ent:IsValid()) then local...

17th February 2014
by gravelhunter Go to last post
8 207
Help
 

resource.AddWorkshop Help

Hi, I just had a simple question. With my file being in lua/autorun/server, how would I make it look? Would it be like this? if SERVER then resource.AddWorkshop( "integer" ), resource.AddWorkshop( "integer" ), resource.AddWorkshop(...

17th February 2014
by LennyPenny Go to last post
5 197
Help
 

solved GetItems() Method for DIconLayout?

With DPanelList you can use a methord called GetItems() to return a table of all of the elements which have been added to it. I was wondering if there was anything like this for DIconLayout? GetItems() doesn't work. Thanks.

17th February 2014
by HappyGhetto Go to last post
0 68
Help
 

Help with Announcement Plugin

Hello, I am new to lua and am just trying out a small announcement plugin for starters. Below is the code I have, however when I use !announce it only says in the console "MCS Semajnad: !announce" and doesn't actually execute anything. My directory setup...

17th February 2014
by Semajnad Go to last post
6 173
Help
 

ttt_rooftops_f2_a1

I cannot find this map anywhere, could someone please direct me to it!

17th February 2014
by Brendon Go to last post
6 187
Work In Progress
 

GeoIP - Virtually instant geolocation ( 2 Last ) This thread has images

libGeoIP Lua binding - Get info about IPs! Download Win32 http://d-h.st/KDVV 2d5804d66b9c47f52adabe9ba56f8fa0 Linux http://d-h.st/UNW f383123ab1f12ed70bc1cd056ba2f631 Uses the GeoIP database GeoLiteCity.dat Uncompess, rename to GeoIP.dat and...

17th February 2014
by Kingpin Go to last post
47 8,495
Lua scripting
 

solved bad argument #1 to 'SendWeaponAnim' (number expected, got nil)

Hi. Quick question. I am making some L4d2 Sweps, but i'm having problems with some of the animations. I decomplied the model i wanted and got a list of animations. $animation "look_down" "c_shotgun_spas_anims\look_down.smd" { fps 30 subtract...

17th February 2014
by buu342 Go to last post
13 309
Help
 

solved How to restrict a job to multiple classes? - DarkRP,

Hi, So I look all over on the internet but nothing seems to be working for me. I want to make a donator job but also include other ranks to use it. This meaning that I dont want people who are just normal admins to access it as I think it defeats the...

17th February 2014
by Minishawsi Go to last post
4 188
Help
 

serverside variables for players

Hi How would I create and access variables for each player, serverside? Thanks

17th February 2014
by selfdestruk1 Go to last post
4 193
Lua scripting
 

dHack, a new p2c smashed by team skidsmasher ( 2 Last ) This thread has images

dHack; A great example of why idiots who can't code shouldn't release pay cheats. http://dhack.hexhosting.com/ It came to our attention that a known skid "Deagler" was attempting to start another GMod p2c (named dHack, how original). After 5 minutes...

17th February 2014
by JonoXD Go to last post
50 3,441
Help
 

Help with pointshop rewards

We have a script in the autorun folder of our server that we use to reward players for kills in ttt unfortunately it causes ragdolls to disappear if the player is killed by the world, how can we fix this? --To be placed in lua/autorun/server/ --...

17th February 2014
by SaintSin6 Go to last post
4 231
Help
 

solved Pointshop Traitor Purchase Problem

Whenever you purchase traitor in the pointshop, it doesn't take away the powerup after the round begins/after it ends. It stays bought. Here's the code I have in addons/pointshop-master/lua/items/powerups/buytraitor.lua. ITEM.Name = 'Traitor'...

17th February 2014
by ZerK Go to last post
4 119
QUESTION
 

Switch Gamemode Automatically From TTT To Prop Hunt

The server i go on just recently added TTT to it. After 10 rounds on Prop Hunt there is a auto vote for switching gamemode and map, but there is no auto vote for TTT. Can i have a script or addon that has auto voting for TTT? Thank you!

17th February 2014
by TheWildTurnip Go to last post
7 243
QUESTION
 

F4 tab

Im in Darkrp and im just wondering if there is a way to have some tabs like the shipment tab invisible to everyone that isnt a job that has a custom shipment like a gun dealer is there a way for example a citizen wont see the shipment tab but if they are...

17th February 2014
by _Jacob Go to last post
3 168
Help
 

Spawning SCars from Dermamenu

I have a function called by a button to spawn some SCars that have turrets and or spinning objects on them. They all work fine when you spawn them from the button, but the turret is usually detached and or the camera is wrong. The turret ends up flying...

17th February 2014
by MGCLegend Go to last post
0 73
Help
 

F1 menu tabs

so i have the damagelogs-master that is seen at this link http://facepunch.com/showthread.php?t=1301766 but what i was wondering is what is the file that contains the code to display it in the f1 menu because i want to change the colors of the headers for...

17th February 2014
by _Jacob Go to last post
8 269
Help
 

Variable not setting?

Hello. I'm working on a swep, and when a function is called, it's set to set a variable, but the problem is, it's not setting. Here's the code: SWEP.Category = "Oracule" SWEP.Author = "VX" SWEP.Purpose = "Deploying ammo in-the-field."...

17th February 2014
by sackcreator54 Go to last post
4 142
Help
 

FastDL Issue?

Okay, I have set up my fastDL and everything is in order, file paths are triple quadruple checked and all are correct, yet it won't download .bzip2 files. Says error downloading, but only those specifically. And then when I put the regular .mdl's etc.,...

17th February 2014
by _Jacob Go to last post
2 63
Lua scripting
 

More SWEP positioning possibility? This thread has images

Greetings. I basically wanna have more options to switch between the view model positions for my SWEPs. What I mean is, just like the following codes do: SWEP.IronSightsPos = Vector (-5.9866, -5.5407, 3.0058) SWEP.IronSightsAng = Vector (0, 0, 0) ...

16th February 2014
by LauScript Go to last post
14 424
Request
 

Seeking a decent v_weapons animator for hire

Hello, I'm currently looking for a v_model animator to completely re-animate three unique weapons I have for me. I'm willing to pay, if the price is right. I'm looking for good crisp animations for these weapons. the weapons are an AA-12, AN-94, and a...

16th February 2014
by code_gs Go to last post
1 141
Help
 

solved Single Weapons Help

Im having troubles with my weapons I have them so that only gun dealers can sell them but when I got in game any job can buy them this is an example of one of my guns AddCustomShipment("FiveSeven", { model =...

16th February 2014
by Jvesche Go to last post
8 195
Help
 

Lottery Help

Im having troubles with makeing lotterys it says that I cant make them when I have them enabled in the files Im not sure whats the problem does anyone know what to do?

16th February 2014
by Jvesche Go to last post
7 206
Stupid
 

Colored Chat Text in TTT

hook.Add("Initialize", "Points.Initialize", function() if !ROLE_INNOCENT then return end local RolePoints = { = { = -10, = 100 }, = { = -50,

16th February 2014
by Butthurt Go to last post
6 359
Help
 

Entity Spawning (Gamemode) Help!

I am trying to spawn an entity from a derma button. I have added console commands to the button and that seems to work fine, however, the serverside will not spawn the entity without an error Here Is my function to spawn it: function SpawnFlak18(ply)...

16th February 2014
by MGCLegend Go to last post
7 85
Help
 

My weapon has 244 ammo in clip on server instead of 500.

And if I try to reload it with 244 ammo, it just loops ( the reload. ) if ( SERVER ) then AddCSLuaFile( "shared.lua" ) end if ( CLIENT ) then

16th February 2014
by Robotboy655 Go to last post
5 147
Help
 

Proper way of creating a spectator

Hi, I've made three teams, one of them are spectators. I'm not quite sure about how I should go around making the spectator team, but I've done this so far: if ply:Team() == 3 then -- Waiting ply:SetModel( "models/player/kleiner.mdl" )...

16th February 2014
by Nookyava Go to last post
1 124
QUESTION
 

jumping

Im trying to add a cool down to this if pl:KeyDown( IN_USE ) and pl:KeyPressed( IN_JUMP ) and pl:OnGround() and not pl:GetNWBool( "zjump" ) and pl.ZeroGJump and pl:Team()==TEAM_HUMAN then pl:SetVelocity( Vector(0,0,355) ) pl:SetNWBool(...

16th February 2014
by swinginman Go to last post
7 225
Help
 

Making Wages/Salary collection

I have little experience in coding but want to get this done, if anyone can explain the process or something I'd appreciate it. :eng101: -Reece :rock:

16th February 2014
by Acecool Go to last post
3 204
Help
 

solved [NPC DEALER] Not taking money on purchase.

What's causing the problem? http://pastie.org/8738520 --] util.AddNetworkString("NPCShop_BuyItem") net.Receive('NPCShop_BuyItem', function(length, ply) local item = net.ReadString() local money = ply:getDarkRPVar("money")

16th February 2014
by Gomez Go to last post
4 211
Lua scripting
 

Distant Weapon Sounds

I'm a starter in the Lua world, and I was wondering if there was a way to make it so that the weapon sounds can be heard from a defined distance away? An example would be this video: Thanks in advance.

16th February 2014
by Robotboy655 Go to last post
1 68
Help
 

solved Pointshop

Ok, so This is the code I have atm the moment so players can buy a round however when 2 people try to buy a round the person who first bought it gets their's cancelled out and the second person becomes a T Any idea how to fix this? ITEM.Name = 'Traitor...

16th February 2014
by Inferno4691 Go to last post
2 157
Help
 

DarkRp Mysql broke ulx.

i enabled Mysql for my Darkrp server and when I restarted the server I get a error and it breaks the whole gamemode. I have the right info in the mysql.lua file but I don't see what's wrong. /////////////////////////////////////// // ULX GUI -- Made...

16th February 2014
by Bo98 Go to last post
5 179
QUESTION
 

Realistic Ragdolling for NPCs ( 2 Last )

I'm searching for this video and the addon for a sort of realistic death for NPCs, Youtube is kind of down for me and so is google I think because it said "Google Server Error" so I can't search for the video myself. The video starts off with the name of...

16th February 2014
by buu342 Go to last post
75 7,887
Help
 

solved Backstab Damage

I tried googling and searching facepunch but could not find any methods as to determine if someone is stabbing somebody in the back with a melee weapon, can anybody point me in the right direction on how to do it or what functions I would need to use to...

16th February 2014
by KevinnTCG Go to last post
6 301
Help
 

solved Need help with timer

Hello I want it so that the "draw.DrawText" appears AFTER 2 seconds, but how? Here is my full code: /*if ( CLIENT ) then surface.CreateFont( "wastedfont", { font = "pricedown bl", size = 20, weight = 400, antialias = true

16th February 2014
by KingCentKing Go to last post
9 178
Lua scripting
 

Images have missing textures

myImage = vgui.Create("DImage", menu) myImage:SetMaterial( "VGUI/entities/npc_antlion" ) myImage:SetImageColor( Color(255,0,0,255) ) // make it red. myImage:SizeToContents() // make the control the same size as the image. I've tried that from the...

16th February 2014
by Username1.2.1 Go to last post
3 150
Lua scripting
 

Hook For Console Command?

So, im making a script and i wanted to get some info when the player ran a console command, like this: local function ConsoleCommand(command, arguments) -- do some stuff end hook.Add("ConsoleCommandRan", "GetCommand", ConsoleCommand)

16th February 2014
by Acecool Go to last post
6 217
Help
 

Need help with my custom pointshop trail This thread has images

Ok, i followed a youtube video but the outcome of my trail came out with a purple/black checkered texture. these are the files: Pointshop Code: ITEM.Name = 'BLVD' ITEM.Price = 0 ITEM.Material = 'trails/blvd.vmt' function ITEM:OnEquip(ply,...

16th February 2014
by Mylofied Go to last post
10 235
php
 

Trying to get peoples steam badges

So I want to make a button that when pressed it gathers a persons profile info and creates something like this http://badges.steamprofile.com/profile/default/steam/76561198080178651.png How could I do so since there isnt anyway on the steam api.

16th February 2014
by Ilyaaa Go to last post
2 215
School
 

Cant Add Textures To Playermodel

Hello all, I'm doing my best to learn how to make playermodels out of ported models without the valve skeleton. I've got everything working except for the textures, ingame all the animations work but I get the purple/black missing textures annoyance. I've...

16th February 2014
by batteries Go to last post
0 135
Help
 

solved Getting a person's Aliases

How would I use lua to get a player's aliases (previous steam names)? An example would be great

16th February 2014
by Sm63 Go to last post
10 245
Lua scripting
 

Physical bullet

Ok so im working on a mod that launches an actual bullet ent that acts as a prop so that it is affected by the gravity in the game but my problem is that the force seems to be limited self:GetPhysicsObject():SetVelocity(velocity + Vector(0, 0, 100)) I...

16th February 2014
by bobbleheadbob Go to last post
2 168
Help
 

Wanting to make a SWEP. Need help.

Hey FP people, I am in need of some help...once again. I have finished my HUD for my gamemode (:D) and I really want to make a few sweps. I am aiming toward a Dodgeball gamemode (Nothing like HeavyBalls) and I don't know how to make it so it shows...

16th February 2014
by SubZer056 Go to last post
0 115
Lua scripting
 

Fonts are not showing properly on OS X This thread has images

I have been tinkering with the TTT HUD and its fonts and I have noticed that they do not show properly on my Macbook Pro. I can confirm that it works because it loads properly on Windows. For an example, surface.CreateFont("minimal",...

16th February 2014
by Inelegant Go to last post
3 115
QUESTION
 

Entity creation

Hello. I am currently working on an gamemode and I want to learn gmod coding. I have succeeded with some things and right now I would like to make an entity as in a spawnable prop(dont know what they are actually called in "coding language"). I have been...

15th February 2014
by EvacX Go to last post
12 380
Help
 

F1 Menu Opening on all Players Screens This thread has images

So I used the old tutorial for the "Binding VGUI to F1-F4" on maurits.tv... and I got the menu to work and the only problem is that is opens the menu on everyone's screen that is connected... Client-side code: function CustomMenu() local frame...

15th February 2014
by Robotboy655 Go to last post
3 277
Lua scripting
15th February 2014
by KingCentKing Go to last post
6 203
Help
 

Velocity bar for HUD?

Hey guys of FP, I was wondering if there is a way to make a velocity bar for a HUD? I have been experimenting with HUD making recently and I have figured out how to make an Armor and Health bar on the bottom left of my screen. Now how can I get a...

15th February 2014
by _Jacob Go to last post
17 352
Help
 

give back weapons command

ok so i know that the !strip command takes away a players weapon but what is the command to give back their weapons? i checked everywhere to see if theirs a command to give back weapons i cant find anything. so does it have to be added in to the ulx...

15th February 2014
by jobforacowboy Go to last post
3 106
Help
 

Learning how to make addons

Whats the best way to learn how to create garry mod addons for servers/learn lua? Lua seems like a cool programming language to learn.

15th February 2014
by buu342 Go to last post
3 224
Help
 

Dark M9k Weapons Help!

On my Dark Rp server, the M9k Weapons remove when they run out of ammo, how can I prevent that?

15th February 2014
by LouieTien Go to last post
4 1,090
QUESTION
 

Lua bring to front

How would one go about bring my tab menu to being in front of my frame? At the moment its behind it.

15th February 2014
by Voltz Go to last post
5 292
Help
 

table issue

models = {} models.ru = {"models/mw2guy/rus/gassoldier.mdl", "models/mw2guy/rus/soldier_a.mdl", "models/mw2guy/rus/soldier_c.mdl", "models/mw2guy/rus/soldier_d.mdl", "models/mw2guy/rus/soldier_e.mdl", "models/mw2guy/rus/soldier_f.mdl"} models.us =...

15th February 2014
by xESWxDEATH Go to last post
3 185
QUESTION
 

Hook for view change

Hello gents, long time reader and supported of Garry's work. I was wondering if there is a hook, or where I could add a function to check a players view. pretty much I am building a HUD for when a player is flying a scripted plane but I only want it...

15th February 2014
by Shadowmaru Go to last post
3 179
Help
 

solved Disable wep. drop on death TTT

Looked at the weapon base-- can't figure out how to disable weapon dropping on death for a specific SWEP. Some background: I made a ban hammer because I'm an absolute dick. I forgot it drops on death and 6 people were perm-banned.

15th February 2014
by rbreslow Go to last post
11 289
QUESTION
 

solved Is it possible to implement a c_model for sweps?

If so, how? I would also like to know if it can work using CSS models also. Thanks if you can answer my question. signed, A curious citizen

15th February 2014
by Robotboy655 Go to last post
1 127
Lua scripting
 

solved http.Fetch limit?

I'm using php to get all the steam members in my group and convert all their community ids to steam ids and set it in a json string. This works fine and all the ids are put into the body of the PHP doc, but when I use http.Fetch to transfer them all to...

15th February 2014
by Alig96 Go to last post
12 381
Help
 

solved Ammo Glitch

I recently added some WW2 guns to my TTT server and one thing that I have noticed is that if you drop them, the ammo is automatically restored. Is there any way to fix this? Thanks! :D

15th February 2014
by Robotboy655 Go to last post
1 126
QUESTION
 

surface.PlaySound & Sound Tables

I'm trying to make surface.PlaySound use a sound.Add table, but it isn't working. Is this not something I can do? If not, can someone submit a request for it, as I do not know how to do that. What I'm doing is using it to play a notification to all...

15th February 2014
by Robotboy655 Go to last post
3 150
Help
 

How do I do this? - panel element names

Hi all I have a for do loop that I want to create buttons and labels on a panel in. How do I go about giving them all a unique name?

15th February 2014
by rejax Go to last post
3 136
Lua scripting
 

Help with net Server to Client!!

Hi guys I need help understanding something. I have been trying to get this working for some time now and I have looked every where but no luck. So I hope today you can help explain and show me where I am going wrong! I am trying to get a timer to work...

15th February 2014
by DubyxD Go to last post
8 186
Help
 

Custom Sway Movement Not Working

I know that I have already asked for help regarding this issue but I thought it would be better to create a post specifically for it and provide more information on the problem. Basically I'm trying to make my own custom view model sway system but I'm...

15th February 2014
by ShadowRanger Go to last post
2 150