Ban/Kick User

Discussion in 'Rust Development' started by Rusty, Aug 7, 2015.

  1. how to ban/kick user with reason? LUA?

    player:Ban?
     
  2. Wulf

    Wulf Community Admin

    I'd recommend taking a look at existing plugins that do this such as Enhanced Ban System.
     
  3. Code:
    ServerUsers.Set(target.userID, ServerUsers.UserGroup.Banned, target.displayName, reason);
        ServerUsers.Save();
        Network.Net.sv:Kick(target.net.connection, reason)
    Having trouble making this work...any insight?

    ServerUsers is nill it says
     
  4. Wulf

    Wulf Community Admin

    What is ServerUsers from? Your answer is the Network.Net.sv:Kick(target.net.connection, reason), I'm not sure what the other portions are.
     
  5. I seen that in the plugin you mentioned, the kick part works but i cant figure out out to ban.
     
  6. Wulf

    Wulf Community Admin

    rust.RunServerCommand("ban", player.displayName, reason)
     
  7. Perfect. Many thanks. :) SOLVED