Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
spraying in ttt server
#21
Hi, here is a very small little useful part of lua code that will disable the spray feature for anyone that isn't a superadmin on the server. 

Code:
hook.Add( "PlayerSpray", "DisablePlayerSpray", function( ply )
    return not ply:IsAdmin()
end )

Here is a link to the original post on the facepunch wiki. Perhaps this should be considered to be added? I know sprays are scary (serious) and loopholes/exploits are even scaryer lmao. I hope this helps  :D


For anyone that wants to try it on a test server the code just goes in a lua file in the addons folder then make a new folder with any name then make a folder within that new folder named "lua" then make a folder in that named "autorun" then make a txt file and name it anything then open it and paste the code and go to file and click save as and change the file type to all and in the file name box change that to whateveryouwant.lua and save it and that's all. I'm bad at explaining shit but yk it's easy I promise.
[Image: 955ef7a32696f2e506ea3319fcb5017a.png][Image: Banned-Gravity-Small.jpg]
Resigned prop hunt trusted 4/16/2021 - 1/1/2022 <3
#22
(07-25-2021, 10:40 AM)Here lies Eggroll's reputation. Wrote:
Code:
hook.Add( "PlayerSpray", "DisablePlayerSpray", function( ply )
    return not ply:IsAdmin()
end )
This works fine in my server but IsUserGroup would work better because IsAdmin only checks for admin (co-owner, "adm" is actual admins) and superadmin (owner).. alternatively just saying "return true" would block it for everyone

Other alternatively, doing absolutely nothing would be a good option because people seeing a spray on the server once every two weeks by coincidence has never really been a problem
#23
(07-25-2021, 11:41 AM)RussEfarmer Wrote: -suh nip-
That's fair, I mean... it's there if it's needed. I literally just live here
[Image: 955ef7a32696f2e506ea3319fcb5017a.png][Image: Banned-Gravity-Small.jpg]
Resigned prop hunt trusted 4/16/2021 - 1/1/2022 <3
#24
Is there where i go to vote for turning on sprays
#25
(07-25-2021, 04:13 PM)CloudySkies Wrote: Is there where i go to vote for turning on sprays
How about NO.
#26
haha I am going to post nsfw in 67thway
#27
(07-25-2021, 04:13 PM)CloudySkies Wrote: Is there where i go to vote for turning on sprays
That won't ever happen because people cannot control themselves
[Image: 955ef7a32696f2e506ea3319fcb5017a.png][Image: Banned-Gravity-Small.jpg]
Resigned prop hunt trusted 4/16/2021 - 1/1/2022 <3


Forum Jump:


Users browsing this thread: 7 Guest(s)

About Us
    This is Dinkleberg's GMod, a gaming community based in Garry's Mod. We have a Trouble in Terrorist Town, Prop Hunt, Murder, and Deathrun Server. Come check them out sometime.