• Prop Disguiser
    4 replies, posted
A fix up of Jon A Scone (or Jonascone idk)'s old Disguise SWEP [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=183743548"]http://steamcommunity.com/sharedfiles/filedetails/?id=183743548[/URL] and a TTT-compatible version! I originally had the idea to do this a couple months back (when I knew very little Lua) because a guy on my favorite TTT server said some other server had a similar addon and it was really cool and so I wanted to do the same thing. But because I sucked at Lua (still wing it half the time) it never got to a working state. Just recently I opened up the original Disguise lua file and went in there to recode it and add my own spin to the thing such as the timer and props having health and using chat.AddText which I love. So here it is! The Reload key selects the model you are looking at as the one you disguise as, Primary Fire creates the disguise, and then obviously Secondary Fire undisguises yourself! If the timer runs out it will also automatically undisguise you as well as add a small 5 second cooldown. Stuff is configurable except its all in the SWEP file because convars hate me. [t]http://cloud-4.steampowered.com/ugc/30719431548112357/7F6ECFECEA7E328A6F25B4B1E56C538E0364243D/[/t][t]http://cloud-4.steampowered.com/ugc/30719431548098367/F60820B88B1AB8EE90DB695603502CA3DF983B67/[/t] [t]http://cloud-4.steampowered.com/ugc/30719431548126462/09EB3FB8AC8010410EDB5824176908A1E0508E13/[/t] [t]http://cloud-4.steampowered.com/ugc/30719431548130017/54C458A3BC4E80D13400589E05917B926B82DEDD/[/t] [B]TTT Version[/B] - [url]http://steamcommunity.com/sharedfiles/filedetails/?id=310403737[/url] Github: [URL="https://github.com/Exho1/TTT_Prop_Disguise"]https://github.com/Exho1/TTT_Prop_Disguise[/URL] [B]Regular ol' Sandbox[/B] - [url]http://steamcommunity.com/sharedfiles/filedetails/?id=310403937[/url] Github:[URL="https://github.com/Exho1/Prop_Disguiser_Sandbox"]https://github.com/Exho1/Prop_Disguiser_Sandbox[/URL] Known Bugs: - Pressing 'q' hides the timer - Sometimes the SWEP's World model shows in a strange position above the disguised entity
Prop hunt now in ttt :v:
Pretty much lol. Also I updated the TTT one (not Sandbox yet) for what I figure is a fix for having a "ghost" of your player be over the prop
I quickly glanced at the code and found this. line 93 [lua] timer.Create(ply:SteamID().."_DisguiseTime", self.DisguiseTime, 1, function() self:SetNWBool("PD_TimeOut", true) self:SetNextPrimaryFire(CurTime()+self.Primary.Delay + 5) -- Small delay after timer going out self:PropUnDisguise() end)[/lua] line 276 [lua] timer.Simple(0.5, function() -- Wait a little bit if not IsValid(ent) and ply:GetNWBool("PD_Disguised") then -- Player is disguised but the disguise doesnt exist anymore print("[Prop Disguise Debug]") print(ply:Nick().." used wonky prop ("..dbug_mdl..") and was automatically killed!") print("Recommended you add this prop to the blacklist") ply:Kill() -- Kill the player net.Start("DisguiseDestroyed") net.Send(ply) end end)[/lua] Just a heads up, these can and will error very easily. You should also not use the timer library at all when doing anything for a swep/sent/etc as they have their own think methods.
I can see 9999 DarkRP servers using this
Sorry, you need to Log In to post a reply to this thread.