1. Hey, how can I register command with exclamation mark instead of / ?
     
  2. Wulf

    Wulf Community Admin

    There is no registration for those, you'd have to listen with the OnPlayerChat or OnUserChat hooks. There are existing threads on the forum regarding this as well, which can be found using the search box.
     
  3. Thanks.. :)
    [DOUBLEPOST=1529799350][/DOUBLEPOST]And i have a question how can i change this code to show total sleepers on the server?
    Code:
    void OnPlayerChat(ConsoleSystem.Arg arg)
            {
                var message = arg.GetString(0);
                if (message.Contains("!players"))
                {
                    var playerCount = BasePlayer.activePlayerList
                    if (playerCount > 1)
                        rust.BroadcastChat($"On this server is currently {playerCount} players online.");
                    else
                        rust.BroadcastChat("On this server is currently 1 player online.");             
                }
            }
     
  4. Take a look at a plugin like InfoPanel see how it handles it
     
  5. Okey.. thanks
     
  6. How to fix this error? Error while compiling: sleepers.cs(22,246): error CS1525: Unexpected symbol `end-of-file'
    With this code:
    Code:
    using Rust;namespace Oxide.Plugins
    {
    [Info("sleepers", "qw", "0.1.0")]
    public class sleepers : RustPlugin
    {
        void OnPlayerChat(ConsoleSystem.Arg arg)
            {
                var message = arg.GetString(0);
                if (message.Contains("!sleepers"))
                {
                    var sleepingPlayerCount = BasePlayer.sleepingPlayerList
                    if (sleepingPlayerCount > 1)
                        rust.BroadcastChat($"On this server {sleepingPlayerCount} players sleeping right now.");
                    else
                        rust.BroadcastChat("On this server 1 player sleeping right now.");             
                }
            }
    }
     
  7. Wulf

    Wulf Community Admin

    Your file is encoded oddly else however you uploaded it to your server changed it.
     
  8. And what can I do?
    I'm new with this so. :/
    And i really want these commands to vanilla :D
     
  9. Wulf

    Wulf Community Admin

    Why do you need ! for commands? You can use / in "vanilla", even Rust listens for /.
     
  10. cause i want the vanilla server a little bit different than other community servers.. :)
     
  11. Wulf

    Wulf Community Admin

    Sounds more like you want to hide that you're running a modded server. ;)

    I can't really explain how to fix your issue aside from changing how you upload to your server and making sure that there isn't any odd symbols at the end of your file, hidden or visible. If you're using an FTP client, make sure the transfer mode isn't changing the file in any way.
     
  12. I don't know if it's hard to create this plugins !players, !sleepers, !discord i tried and i had the Unexpected symbol `end-of-file' and i don't know what can I do :/
    [DOUBLEPOST=1529807795][/DOUBLEPOST]okey i'll look at that
    [DOUBLEPOST=1529808062][/DOUBLEPOST]I uploaded the plugins in filezilla, and when i upload other plugins from the plugin list so they works.. but the mine don't :/
    [DOUBLEPOST=1529808117][/DOUBLEPOST]And I'm in protocol SFTP in the filezilla options
    [DOUBLEPOST=1529808497][/DOUBLEPOST]Oww i fixed it but now i have this error: Error while compiling: Sleepers.cs(20,16): error CS1525: Unexpected symbol `else'
     
  13. You should consider installing visual studio...

    On line
    Code:
    var sleepingPlayerCount = BasePlayer.sleepingPlayerList
    you are missing ;
     
  14. It's working now.. thanks all for help!
     
  15. It compiled, but it's not working.
    Code:
    BasePlayer.sleepingPlayerList.Count;