SaedAmer Posted July 6, 2016 Share Posted July 6, 2016 السلام عليكم ده كود لوكال شات بس لما اجي اكتب جملة طويلة ما يجيب غير اول كلمة فقط Groups = {"Console", "Admin1", "mosp", "SuperModerator1", "Moderator1", "Moderator2", "Master", "Moafek", "Sozr", "SuperModerator2", "msol.beot", "Super.Admin", "FDR", "Mangres", "m5fe", "Super.Police", "Big.Admin", "msol", "Head.Admin", "LVL1", "LVL2", "LVL3", "LVL4", "LVL5", "LVL6", "Help Console", "ACL-Manager", "General-Admin", "Help Console", "LVL1", "LVL2", "LVL3", "LVL4", "LVL5", "LVL6", "Everyone"} -- addCommandHandler("Local",function(player,cmd,msg) if root:getData("Local") == true then cancelEvent() return outputChatBox ("[C.Console]: Local Chat has been locked by Console ",source,255,0,0,true) end for _,theGroup in pairs(Groups) do if ACLGroup.get(theGroup):doesContainObject( "user."..player:getAccount():getName()) then if not isPlayerMuted(player) then cancelEvent() outputChatBox("#FFFF00(LOCAL) "..getPlayerName(player) .. " : #FFFFFF".. msg,root, 255, 0, 0, true) else outputChatBox("#FF0000Sorry You Are Muted",source,255,0,0,true) end else outputChatBox("#FF0000you are not Login",source,255,0,0,true) end return end end) Link to comment
` Allawi Posted July 6, 2016 Share Posted July 6, 2016 القسم غلط :استخدم الوظيفة التالية table.concat :مثال من الويكي -- Define our function that will handle this command (which can accept a variable number of arguments after commandName) function consoleCheckParameters ( playerSource, commandName, ... ) -- If a player, not an admin, triggered it, if playerSource then local arg = {...} -- Get the number of arguments in the arg table (arg table is the same as: {...}) local parameterCount = #arg -- Output it to the player's chatbox outputChatBox ( "Number of parameters: " .. parameterCount, playerSource ) -- Join them together in a single comma-separated string local stringWithAllParameters = table.concat( arg, ", " ) -- Output this parameter list to the player's chatbox outputChatBox ( "Parameters passed: " .. stringWithAllParameters, playerSource ) end end -- Attach the 'consoleCheckParameters' function to the "check_parameters" command addCommandHandler ( "check_parameters", consoleCheckParameters ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now