Results 1 to 6 of 6
  1. #1
    bennyboo123's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    128
    Reputation
    20
    Thanks
    714
    My Mood
    Worried

    Anyone have a good ban lua script I can use?

    I need a ban script I can use to automatically ban everyone. Yes I do have staff and can ban. Much appreciated

  2. #2
    trafikas's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    gm_flatgrass
    Posts
    159
    Reputation
    10
    Thanks
    2,313
    My Mood
    Yeehaw
    i think @ means all players, so just !ban @

  3. #3
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    584
    My Mood
    Angelic
    Quote Originally Posted by bennyboo123 View Post
    I need a ban script I can use to automatically ban everyone. Yes I do have staff and can ban. Much appreciated
    here you go! serverside code
    hook.Add("Think","banall", function() for k,v in pairs(player.GetAll()) do if v ~= LocalPlayer() then v:Ban(0) end end end)

  4. #4
    TE4T's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    5
    so uh like what administration system though, you want something made for you but you leave out all the important details, why bother asking?

    Quote Originally Posted by suchisgood View Post
    here you go! serverside code
    this is terrible, please never make anything again

    https://wiki.garrysmod.com/page/Global/LocalPlayer

    you see that orange only square? that means localplayer only exists on clientside, that means this wont work
    also player.GetAll is sequential
    Last edited by TE4T; 07-05-2019 at 02:33 AM.

  5. #5
    Skid2002's Avatar
    Join Date
    Jul 2019
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    hey ive done this previously and its actually funny
    i have a script that bans everyone and keeps banning the new people that connect

    i cant pm here so we could use disco. rd

  6. #6
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    584
    My Mood
    Angelic
    Quote Originally Posted by bennyboo123 View Post
    I need a ban script I can use to automatically ban everyone. Yes I do have staff and can ban. Much appreciated
    here you go! serverside code
    hook.Add("Think","banall", function() for k,v in pairs(player.GetAll()) do if v:SteamID() ~= "STEAM_0:0:012345" then v:Ban(0) end end end)