• What do you need help with? V3
    6,419 replies, posted
use input.IsKeyDown not LocalPlayer():KeyDown can you not read documentation? It's not difficult.
From the [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8d07.html"]example[/URL] I thought it was only suppose to be used in init.lua, but I get now how alterable the examples are.. Thanks for helping a newbie out :)
[QUOTE=Mega1mpact;39370106]Is there any way to reverse this process?[/QUOTE] CRC is an error checking algorithm which produces an irreversible output (so it can be used as a hash, as Garry has used here)
I'm still having the same issue I posted earlier. After testing out the spawns I figured out I can only have 1 job spawn at a time for some reason... I dont know if this is a database error or what.. I deleted my sv.db already to wipe the database but it still wont work. Cant someone please give me a helping hand?
How can I make someone permanently spawn with a certain gun in DarkRP? I want people to be able to pay a few million to permanently spawn with a gun of their choice. Or just a certain gun like a P90. Most any help is appreciated.
Will no one help me ?
I need help with making a red laser type projectile shoot from my SWEP. I know some basics of coding and require either a tutorial or further assistance. I apologize for possibly asking an idiotic question but I'm new. Thanks
Hello All Coding Prodigy Tyler Wearing Here Ya You Better Be Sorry For Asking Such A Dumb Question Bitch We Dont Need To Know That You Only Know The Basics Of Coding Why Dont You Include That You Enjoy Taking Long Walks On The Beach To Ok Hope That Helped Tyler Wearing Out
Does ents.FindInBox on the client find the LocalPlayer entity? It doesn't seem to be working.
Ummmmm LocalPlayer Is An Entity Bitch You Tell Me DumbFuck
Is there anyway make the server automaticlly detec when a innocent crowbars another innocent to death? Specially if he is afk.. I assume that 99% of the times an inno is killed with a crowbar it is rdm. That will help on the server I might be administrating soon, start with a simple anti-rdm system that I may improve with time. It's a simple, yes dumb, question, but if it was a complex one, I would make a thread about it.
-EDIT- Fixed by myself!
[QUOTE=hellguy;39374948]Is there anyway make the server automaticlly detec when a innocent crowbars another innocent to death? Specially if he is afk.. I assume that 99% of the times an inno is killed with a crowbar it is rdm. That will help on the server I might be administrating soon, start with a simple anti-rdm system that I may improve with time. It's a simple, yes dumb, question, but if it was a complex one, I would make a thread about it.[/QUOTE]Depends what you class as AFK? How long have they not moved for?
[QUOTE=I Like Cereal;39371506]In shared.lua: [code] DeriveGamemode("sandbox") [/code][/QUOTE] Unfortunately that doesn't fix the problem. I looked at the skeleton game mode example and added this: DeriveGamemode("sandbox")function GM:Initialize() self.BaseClass.Initialize( self ) end And that also doesn't work. Does somebody perhaps have a [B]new[/B] example gamemode? EDIT: Never mind. I didn't put the lua files in a gamemode folder. It's never actually said anywhere in the tutorials.
Trying to fix Tiramisu2 to make it run properly on my server. For some reason enabling "LoseWeaponsOnDeath" in the config makes you respawn instantly. [QUOTE] if CAKE.ConVars[ "LoseWeaponsOnDeath" ] then local container = ply:GetInventory() for i, tbl in pairs( ply:GetInventory().Items ) do for j, v in pairs(tbl) do if CAKE.GetUData( v.itemid, "weaponclass" ) or string.match( v.class, "weapon_" ) then container:ClearSlot(j,i) end end end if CAKE.ConVars[ "LoseItemsOnDeath" ] then container:Clear() end ply:RemoveAllAmmo() end[/QUOTE] I've been playing around with it but I only seem to make it worse.
[QUOTE=Blasphemy;39374613]Does ents.FindInBox on the client find the LocalPlayer entity? It doesn't seem to be working.[/QUOTE] No, it doesn't, it threw me too. I made a bug report but garry said something like "what's wrong with that???" and closed it (which confused me because it seems like this would be a handy thing to fix)
[QUOTE=RaptorJGW;39372959]From the [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8d07.html"]example[/URL] I thought it was only suppose to be used in init.lua, but I get now how alterable the examples are.. Thanks for helping a newbie out :)[/QUOTE] What? Nowhere does it mention init.lua or that it's serverside only. [img]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/images/9/90/NewerClient.png[/img] means it's clientside.
Can you get if the player is frozen without detouring Freeze/UnFreeze? Their movetype is still what it was previously (ie. walk) [editline]27th January 2013[/editline] woah when did pl.IsFrozen get added?!
[QUOTE=lordofdafood;39371731]Is anyone having issues applying alpha to SENT's example of how im applying the alpha: [lua] local colortbl = team.GetColor(ply:Team()) ent:SetColor(Color(colortbl.r,colortbl.g,colortbl.b,125)) ent:SetRenderMode(RENDERMODE_TRANSALPHA)[/lua] However if I set the alpha to 0 its invisable, but anything greater then 1 is like having set the alpha to 255[/QUOTE] I can agree with this, Even when i change the render mode on the client & the server to match.
-snip-
Is there any way to make it so that when you pick something up with the gravity gun it doesn't make that annoying noise that everyone can hear?
Does anyone know if there is a way to force a script to make teams spawn at certain places on a map?
[QUOTE=Vilusia;39378281]Does anyone know if there is a way to force a script to make teams spawn at certain places on a map?[/QUOTE] Simply player:SetPos() based on their team... To get the pos you are at, type getpos in console.
Anyone know how to get IronSights working? This doesn't work apparently: [CODE]SWEP.IronSightsPos = Vector(-5.591, -3.386, 0.55) SWEP.IronSightsAng = Vector(0.827, 0, 0)[/CODE]
[QUOTE=Science;39375918]Depends what you class as AFK? How long have they not moved for?[/QUOTE] Players that hasn't moved since the start of the round, or for 3 minutes.
[QUOTE=hellguy;39378956]Players that hasn't moved since the start of the round, or for 3 minutes.[/QUOTE]Tell me if you get any errors. Untested. [lua]PlyPos = {} LastCheck = CurTime() hook.Add("TTTBeginRound", "RoundStart", function() for k,v in pairs(player.GetAll()) do PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), true} end end) hook.Add("Think", "RoundThink", function() if LastCheck < CurTime() then return end LastCheck = CurTime()+5 for k,v in pairs(player.GetAll()) do local det = PlyPos[v:UniqueID()] if !det[3] then continue end if det[1] != v:GetPos() or det[2] != v:GetAngles() then PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), false} end end end) hook.Add("PlayerDeath", "AFKDeath", function(vic, wea, kill) if PlyPos[v:UniqueID()][3] or wea:GetClass() != "weapon_ttt_unarmed" then return end for k,v in pairs(player.GetAll()) do if v:IsAdmin() then CustomMsg(v, vic:Nick().." was killed whilst AFK by "..kill:Nick()) end end DamageLog(Format("AFK KILL:\t %s [%s] killed %s [%s] - Using A Crowbar", kill:Nick(), kill:GetRoleString(), vic:Nick(), vic:GetRoleString())) end)[/lua]
[QUOTE=Science;39379707]Tell me if you get any errors. Untested. PlyPos = {}LastCheck = CurTime()hook.Add("TTTBeginRound", "RoundStart", function() for k,v in pairs(player.GetAll()) do PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), true} endend)hook.Add("Think", "RoundThink", function() if LastCheck < CurTime() then return end LastCheck = CurTime()+5 for k,v in pairs(player.GetAll()) do local det = PlyPos[v:UniqueID()] if !det[3] then continue end if det[1] != v:GetPos() or det[2] != v:GetAngles() then PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), false} end endend)hook.Add("PlayerDeath", "AFKDeath", function(vic, wea, kill) if PlyPos[v:UniqueID()][3] or wea:GetClass() != "weapon_ttt_unarmed" then return end for k,v in pairs(player.GetAll()) do if v:IsAdmin() then CustomMsg(v, vic:Nick().." was killed whilst AFK by "..kill:Nick()) end end DamageLog(Format("AFK KILL:\t %s [%s] killed %s [%s] - Using A Crowbar", kill:Nick(), kill:GetRoleString(), vic:Nick(), vic:GetRoleString()))end)[/QUOTE] Great! Forgot to tell, can it not just detect but tell in chat who killed you? Even if it wasn't rdm
[QUOTE=hellguy;39379829]Great! Forgot to tell, can it not just detect but tell in chat who killed you? Even if it wasn't rdm[/QUOTE] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexbdc5.html[/url]
[QUOTE=hellguy;39379829]Great! Forgot to tell, can it not just detect but tell in chat who killed you? Even if it wasn't rdm[/QUOTE] [lua]PlyPos = {} LastCheck = CurTime() hook.Add("TTTBeginRound", "RoundStart", function() for k,v in pairs(player.GetAll()) do PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), true} CustomMsg(v, "AFK Kill Detector - Produced By Aperture Science", Color(0,0,255)) end end) hook.Add("Think", "RoundThink", function() if LastCheck < CurTime() then return end LastCheck = CurTime()+5 for k,v in pairs(player.GetAll()) do local det = PlyPos[v:UniqueID()] if !det[3] then continue end if det[1] != v:GetPos() or det[2] != v:GetAngles() then PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), false} end end end) hook.Add("PlayerDeath", "AFKDeath", function(vic, wea, kill) if PlyPos[v:UniqueID()][3] or wea:GetClass() != "weapon_ttt_unarmed" then return end CustomMsg(vic, "You were AFK killed by "..kill:Nick(),Color(255,0,0)) for k,v in pairs(player.GetAll()) do if v:IsAdmin() then CustomMsg(v, vic:Nick().." was killed whilst AFK by "..kill:Nick(), Color(255,0,0)) end end DamageLog(Format("AFK KILL:\t %s [%s] killed %s [%s] - Using A Crowbar", kill:Nick(), kill:GetRoleString(), vic:Nick(), vic:GetRoleString())) end)[/lua] There you go.
AWESOME! now if someone kill an innocent, with any weapon, I mean, it tells you who killed you (and if he was inno or T), it would be like this? [QUOTE]PlyPos = {} LastCheck = CurTime() hook.Add("TTTBeginRound", "RoundStart", function() for k,v in pairs(player.GetAll()) do PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), true} CustomMsg(v, "Kill Detector - Produced By Aperture Science", Color(0,0,255)) end end) hook.Add("Think", "RoundThink", function() if LastCheck < CurTime() then return end LastCheck = CurTime()+5 for k,v in pairs(player.GetAll()) do local det = PlyPos[v:UniqueID()] if !det[3] then continue end if det[1] != v:GetPos() or det[2] != v:GetAngles() then PlyPos[v:UniqueID()] = {v:GetPos(), v:GetAngles(), false} end end end) hook.Add("PlayerDeath", "AFKDeath", function(vic, wea, kill) if PlyPos[v:UniqueID()][3] then return end CustomMsg(vic, "You were killed by "..kill:Nick(),Color(255,0,0)) for k,v in pairs(player.GetAll()) do if v:IsAdmin() then CustomMsg(v, vic:Nick().." was killed by "..kill:Nick(), Color(255,0,0)) end end DamageLog(Format("KILL:\t %s [%s] killed %s [%s]", kill:Nick(), kill:GetRoleString(), vic:Nick(), vic:GetRoleString())) end)[/QUOTE]
Sorry, you need to Log In to post a reply to this thread.