1. if you use the quotes the entire thing will be one argument, if you don't use them then every time a space is encountered a new argument starts so what you would do is loop the entire arguments array and add them to a single string.
     
  2. When I use it in "" it just gives out the Syntax error:

    Code:
    function PLUGIN:cmdAdminMsg(player, cmd, args)
        if player.net.connection.authLevel > 0 then
            if args.Length > 1 then
                local BroadcastText = tostring(args[0])
                rust.SendChatMessage("LaserHydra", "ADMIN", "" .. BroadcastText)
            else
                rust.SendChatMessage(player, "ADMIN", "Syntax: /say TEXT")
            end
        else
            rust.SendChatMessage(player, "ADMIN", "" .. self.Config.NoPermissionMsg)
        end
    end
    
     
  3. Which part exactly do you mean? the , "" is because if I dont use it, it just co,bines the broadcastText with the Prefix.
    Then it does not say "ADMIN: TheText"
    but "ADMINTheText:"
    or what do you mean?
    If I replace that first SendChatMessage with a BroadcastChat without a playername it doesn't work either.
    So which part do you mean?
     
  4. rust.SendChatMessage(player, name, message, userid)
    rust.SendChatMessage("LaserHydra","ADMIN","".. BroadcastText)

    Also you are appending "", basicly nothing, to the BroadcastText so that doesnt do anything.
    If your BroadcastText is "Hello World!"
    ""..BroadcastText will still be "Hello World!"
     
  5. Ehm sorry i cant follow you so really... I have set the BroadcastText its the arg as you can see... Normally if im using SendChatmessage it like that im getting a Message like that:
    ADMIN: HereWouldAppearTheBroadcastText
    if Im using it without the ,"" it just looks like
    ADMINHereWouldAppearTheBroadcastText:
     
  6. Your first SendChatMessage() function is missing a player argument. The player argument needs to be of the BasePlayer type, so using "LaserHydra" as the player argument wont work because thats a string.
     
  7. Yeah but as I said I also tried:
    Code:
    rust.BroadcastChat("ADMIN", "" .. RequestText)
    
    and it didn't work either...
    RequestText is same as BroadcastText just replaced it...
     
  8. Code:
    function PLUGIN:cmdAdminMsg(player, cmd, args)
        if player.net.connection.authLevel > 0 then
            if args.Length >= 1 then
                local BroadcastText = tostring(args[0])
                rust.SendChatMessage(player, "ADMIN", BroadcastText)
            else
                rust.SendChatMessage(player, "ADMIN", "Syntax: /say TEXT")
            end
        else
            rust.SendChatMessage(player, "ADMIN", self.Config.NoPermissionMsg)
        end
    end
     
  9. Now im still getting errors in this line:
    Code:
    rust.SendChatMessage(player, "ADMIN", self.Config.NoPermissionMsg)
    error:
    Code:
    [Oxide] 1:04 AM [Error] Failed to call hook 'cmdAdminRequest' on plugin 'AdminRequest'
    File: adminrequest.lua Line: 26 invalid arguments to method call:
    at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in :0
    at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in :0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 
     
  10. Post the code where you set self.Config.NoPermissionMsg
     
  11. Code:
    function PLUGIN:LoadDefaultConfig()
        self.Config.NoPermissionMsg = self.Config.NoPermissionMsg or {"You have no permission to use this command!"}
        self:SaveConfig()
    end
     
  12. Your self.Config.NoPermissionMsg is a table. You need to either make it a string and your function will work or change your function to work with a table.
     
  13. Same issue as what you did with the sleepers plugin, you created a table with the message.
     
  14. DON'T WRAP YOUR MESSAGE IN CURLY BRACES
     
  15. ooookaaay ^^ Caps lock FTW
    Thanks
    [DOUBLEPOST=1427635948,1427588691][/DOUBLEPOST]Now if I need 2 different args? like /pm PLAYER MSG
    ?
     
  16. There is plenty to go off of in this thread to figure it out yourself. You will not learn if we keep handing out the code for you.
     
  17. Yes i actually just mean the logic, to do that how is it even possible.
     
  18. You just change the starting index for your message
    /command arg1 arg2 arg3 arg4
    args[0] = arg1 from the command,
    args[1] = arg2 from the command,
    args[2] = arg3 from the command,
    args[3] = arg4 from the command

    So if you want to combine them all you would start combining from args[0] until the length of args -1. But if if your first argument is something different and you don't want it to be merged you store args[0] in a separate variable and then store everything from 1 to length - 1 in the other.
     
  19. I didn't understand that with the lenght.