• What do you need help with? V3
    6,419 replies, posted
[QUOTE=lokienjaku;39221214]yes snpc are broken at this moment[/QUOTE] Well that's unfortunate, now I can't make my gamemode. Has garry given any eta on a fix?
Attempt to index global 'cider' a nil value [CODE]self:DrawInformation(cider.configuration["WebsiteURL"], "ChatFont", ScrW(), ScrH(), Color(255, 255, 255, 255), 255, true, function (x, y, width, height)[/CODE] Thanks for any help, I'm clueless,
[QUOTE=ds;39221277]Attempt to index global 'cider' a nil value [CODE]self:DrawInformation(cider.configuration["WebsiteURL"], "ChatFont", ScrW(), ScrH(), Color(255, 255, 255, 255), 255, true, function (x, y, width, height)[/CODE] Thanks for any help, I'm clueless,[/QUOTE] 'cider' is nil. That's all we can tell you without any context.
[QUOTE=lokienjaku;39221214]yes snpc are broken at this moment[/QUOTE] Silverlan's SNPCS work, however I think he uses his own base from scratch.
So uh, hypothetical question here. For GM:GetFallDamage, I know I can set the fall damage to whatever (say, 1 million). Is there any way to determine the speed the player has to be falling in order to trigger it? Like if I wanted to apply fall damage at absolutely any speed they hit the ground at?
[QUOTE=Ericson666;39222144]So uh, hypothetical question here. For GM:GetFallDamage, I know I can set the fall damage to whatever (say, 1 million). Is there any way to determine the speed the player has to be falling in order to trigger it? Like if I wanted to apply fall damage at absolutely any speed they hit the ground at?[/QUOTE] Returning 0 makes the fall damage completely negated, Including the sound. You can return 0 if the speed is <= 1000, This lets players fall from 80% higher and still not take damage, But if you return the speed from falls after that, you'll have to take into account the 1000 extra speed.
[url]http://pastebin.com/d73dACK1[/url] Anyone know why this just spams out [ERROR] lua/skins/default.lua:350: attempt to perform arithmetic on local 'w' (a nil value) 1. SkinHook - lua/skins/default.lua:350 2. OPaint - lua/vgui/dframe.lua:214 3. unknown - lua/autorun/client/motd.lua:19 I guess it's something to do with [url]https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit[/url] the first thing. But I have no idea how to fix it.
Change it to: [lua] MenuFrame.Paint = function(self, w, h) MenuFrame.OPaint(MenuFrame, w, h)[/lua] But you should just use PaintOver, that's what it's there for.
[QUOTE=.\\Shadow};39223609]Change it to: [lua] MenuFrame.Paint = function(self, w, h) MenuFrame.OPaint(MenuFrame, w, h)[/lua] But you should just use PaintOver, that's what it's there for.[/QUOTE] Thanks!
Can I make it so, when somebody says something specific in chat (e.g. /somethingspecific hi etc etc etc...) to show up in a derma menu (e.g. !specificmenu) (without the /somethingspecific of course) Also, is it able to make a tab (using DPropertySheet) in a derma menu accessible to only one steamid/person/UserGroup/whatever?
[QUOTE=Cobra Bukkake;39224344]Can I make it so, when somebody says something specific in chat (e.g. /somethingspecific hi etc etc etc...) to show up in a derma menu (e.g. !specificmenu) (without the /somethingspecific of course) Also, is it able to make a tab (using DPropertySheet) in a derma menu accessible to only one steamid/person/UserGroup/whatever?[/QUOTE] Yes, it's possible and easy !
I'm trying to call a function from an addon inside a main gamemode function and when that function is run it is returning nil. Do I have to include the file in some way or am I going at this completely wrong?
[QUOTE=ZachPL;39225881]I'm trying to call a function from an addon inside a main gamemode function and when that function is run it is returning nil. Do I have to include the file in some way or am I going at this completely wrong?[/QUOTE] are you running that gamemode
Yeah i'm running the gamemode. When the gamemode function gets called the addon function inside the gamemode function returns nil. I'm going to give it another shot, I was really tired at like three in the morning last night lol.
Where can I find where burning effects the player? I'd like to decrease vision for someone on fire
[QUOTE=Orgy;39231106]Where can I find where burning effects the player? I'd like to decrease vision for someone on fire[/QUOTE] Its hard coded.
[QUOTE=Magenta;39231450]Its hard coded.[/QUOTE] Is there any way for me to detect it and add an effect?
I guess I don't fully understand certain things when making SENT's. I'm running into a problem with getting itself in the code. I have this function in shared: [lua] if SERVER then function ENT:CheckRemoveItem() print(self) --returns a number instead of self(entity) local str = net.ReadString() local amt = net.ReadUInt(8) if type(str) != "string" then return end if type(amt) != "number" then amt = 1 end self:RemoveItem(str, amt) --doesn't work, attempt to index local 'self' (a number value) end net.Receive("RemoveItem_loot", ENT.CheckRemoveItem) end [/lua] My question is why self is a number instead of the entity. I thought you could define custom functions like this on entities and self would return itself? How can I get self in this function? Edit: I've fixed it by just sending the entity with it in the net message instead of trying to get self from the function. Seems like there should be a better way though.
Does anyone know how I can change the color of the background in a DCollapsibleCategory? I believe it's some weird color of blue by default. Is there a way to change it without making a skin?
Also, how can I detect exactly what killed someone? I'd like to detect if someone killed someone else by falling on them
[QUOTE=Orgy;39231826]Also, how can I detect exactly what killed someone? I'd like to detect if someone killed someone else by falling on them[/QUOTE] Falling on top of someone doesn't kill them. Do you have some sort of goomba-stomp mod?
[QUOTE=fairy;39231838]Falling on top of someone doesn't kill them. Do you have some sort of goomba-stomp mod?[/QUOTE] It certainly does in TTT, and I haven't added any goomba stomp mod. I'd like to detect if it were a goomba stomp
In my gamemode, I need to catch the CalcView hook before all other hooks are ran (and, by association, before GM:CalcView(), which is the source of my problem; I would just use GM:CalcView() if it wasn't ran last). The only way I can think of doing this is replacing the hook.Call function and run my code before actually running the other hooks myself. I could easily do this, however, I don't know what/if there is a hook is called when the gamemode is shut down/the map changes/etc. to remove my hook.Call modification, and it would be awful hacky anyway. Basically, is there a way to call a hook/run code when CalcView is called before all the other hooks? I hope that made sense, seems awful confusing from my vantage point :s [editline]15th January 2013[/editline] [QUOTE=Sparky-Z;39231642]I thought you could define custom functions like this on entities and self would return itself?[/QUOTE] You can, that's how it works (as far as I know). [editline]15th January 2013[/editline] [QUOTE=Orgy;39231106]Where can I find where burning effects the player? I'd like to decrease vision for someone on fire[/QUOTE] Ply:IsOnFire(), or, if you're feeling ambitious, hook into EntityTakeDamage and check if the DamageType is fire or if the damaging entity class is enntityflame.
[QUOTE=DarkShadow6;39233723]In my gamemode, I need to catch the CalcView hook before all other hooks are ran (and, by association, before GM:CalcView(), which is the source of my problem; I would just use GM:CalcView() if it wasn't ran last). The only way I can think of doing this is replacing the hook.Call function and run my code before actually running the other hooks myself. I could easily do this, however, I don't know what/if there is a hook is called when the gamemode is shut down/the map changes/etc. to remove my hook.Call modification, and it would be awful hacky anyway. Basically, is there a way to call a hook/run code when CalcView is called before all the other hooks? I hope that made sense, seems awful confusing from my vantage point :s[/QUOTE] The point of hooks are to be triggered when something happens, I don't think I understand what you mean by "Running a hook before other hooks are ran". What are you ultimately trying to accomplish? There's probably an easier way.
It's really a problem with the nature of hooks - they are designed to stop the base hook from running if you return something that evaluates to true. CalcView requires you to return the table to make your changes take effect. There's not really anything you can do about it aside from detouring hook.Call, which would reset after map change automatically. So something like: [code] local oldhook = hook.Call function hook.Call( name, gm, ... ) local t = { } local z = { ... } if ( gm == nil && gmod != nil ) then gm = gmod.GetGamemode() end if name:lower( ) == "calcview" then t = gm:CalcView( ... ) oldhook( name, gm, z[ 1 ], t.origin, t.angles, t.fov, t.nearz, t.farz ) else oldhook( name, gm, ... ) end end[/code] I don't know if it is nearz or nearZ, but you get the idea.
DrawEntityOutline doesn't seem to work. I didn't find anything about this error anywhere. It says it's a nil value
[QUOTE=Didileking;39224678]Yes, it's possible and easy ![/QUOTE] I'm new to derma, can someone tell me how? [Quote] Can I make it so, when somebody says something specific in chat (e.g. /somethingspecific hi etc etc etc...) to show up in a derma menu (e.g. !specificmenu) (without the /somethingspecific of course) Also, is it able to make a tab (using DPropertySheet) in a derma menu accessible to only one steamid/person/UserGroup/whatever?[/quote]
[QUOTE=Ensaides;39235182]DrawEntityOutline doesn't seem to work. I didn't find anything about this error anywhere. It says it's a nil value[/QUOTE] pretty sure it was replaced with halos
[QUOTE=Banana Lord.;39235225]pretty sure it was replaced with halos[/QUOTE] Thanks
How would I center this text? [lua] function GM:DonateTab() local lines = {} lines[30] = "VIP: $15" -- Requires Centering, Bold, Italic -- lines[45] = "Five E2 Chips\n" lines[60] = "$25000 Ingame Money\n" lines[75] = "Donator Jobs\n" lines[90] = "Donator Forums Rank\n" lines[105] = "Donator Entities\n" lines[120] = "Donator Cars\n" lines[135] = "Gets Access to the Beta Test Server\n" lines[200] = "E2 + Money: $6.50\n" -- Requires Centering, Bold, Italic -- lines[215] = "Four E2 Chips\n" lines[230] = "$15000 ingame Money\n" lines[245] = "Some Extra Jobs\n" local DonateTab = vgui.Create("DPanelList") DonateTab:EnableVerticalScrollbar( true ) --Snippity due to my friend would like to keep this code private dueto he writ it himself.-- [/lua] (Inb4 stop trying to make money of your servers) it's my friends he asked me to post it.
Sorry, you need to Log In to post a reply to this thread.