codeluaeveryday Posted July 12, 2011 Share Posted July 12, 2011 Hello all, i require some help, i was roaming through the freeroam script could not help but find this: addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) Well i am not a good scripter, but if i believe this is the source of the outputs in chat, for an example, i wanted to put the ACL group before the name (ADMIN) (MODERATOR) (SUPER MODERATOR) I looked through the wiki and found this aclGetGroup, but is it possible to put in the code. So aclGetGroup(source) would be before getplayername(source). addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(aclGetGroup(source) .. getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) But when i do it, it disables the chat completely, i assume maybe i am inserting it wrongly. Could someone please direct me? Link to comment
Aibo Posted July 12, 2011 Share Posted July 12, 2011 because aclGetGroup returns ACL group, getting it by group name. right now your use of this function is just random. Link to comment
codeluaeveryday Posted July 12, 2011 Author Share Posted July 12, 2011 Ok, . But is there any thing i can use to archive what i want? Link to comment
SDK Posted July 12, 2011 Share Posted July 12, 2011 But, objects (players) can be in multiple groups. You should check if the player's account is in a group using isObjectInACLGroup, and give priority to the most important one. 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