Annas Posted May 19, 2015 Posted May 19, 2015 i have a RPG server , and i try to made a ACL GROUP NAMED 'Supporters" i try to make a chat for them (if you are in acl group "Supporters" then you can chat in it by pressing "./sup TEXT" and if you are not in acl group "Supporters" you cant see this chat .. i made this code but not working (members in acl supporter can talk with it) (WORKING) (normal members can see the supporter chat (HELP ME) i wish you understand me .. THE CODE : SERVER SIDE : function adminPrivateChat(plr, cmd, ...) local accName = getAccountName ( getPlayerAccount ( plr ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Supporters" ) ) then local message = table.concat({...}, " ") for index, players in pairs(getElementsByType("player")) do if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Supporters" ) ) then outputChatBox("#000000(CST Supporter) "..getPlayerName(plr).. ": #FFFFFF"..message, players, 255, 255, 255, true) end end end end
Walid Posted May 19, 2015 Posted May 19, 2015 Try this it should work function adminPrivateChat(plr, cmd, ...) local accName = getAccountName ( getPlayerAccount ( plr ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Supporters" ) ) then local message = table.concat({...}, " ") for index, players in pairs(getElementsByType("player")) do if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(players)), aclGetGroup ( "Supporters" ) ) then outputChatBox("#000000(CST Supporter) "..getPlayerName(plr).. ": #FFFFFF"..message, players, 255, 255, 255, true) end end end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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