shoBy Posted September 9, 2014 Share Posted September 9, 2014 Hey guys! I have a problem with this plugin. Photo: When I write in the global chat, I want to appear only one time. There are 11 ranks. Please help me! Script: -- Global chat function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("#FF0000[ADMIN]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Co-Owner")) then outputChatBox("#FF0000[Co-Owner]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Trial")) then outputChatBox("#FF0000[Trial Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 5")) then outputChatBox("#FF0000[super Mod]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Owner")) then outputChatBox("#FF0000[Admin]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 1")) then outputChatBox("#FF0000[Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#FF0000[Moderator]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 2")) then outputChatBox("#FF0000[super Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 4")) then outputChatBox("#FF0000[Mod]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 3")) then outputChatBox("#FF0000[Lead Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#FF0000[superModerator]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end Link to comment
shoBy Posted September 9, 2014 Author Share Posted September 9, 2014 Can you show me how and where ? Please Link to comment
Mr.Aleks Posted September 9, 2014 Share Posted September 9, 2014 If we give you it all done you'll never learn anything. Link to comment
shoBy Posted September 9, 2014 Author Share Posted September 9, 2014 I learned something But now, I need help...Please Link to comment
shoBy Posted September 10, 2014 Author Share Posted September 10, 2014 Can anybody help me, guys ? Please!! I need your help Link to comment
crismar Posted September 10, 2014 Share Posted September 10, 2014 You don't want to be using more functions for the same purpose, just use the if -- then -- Code elseif -- then -- Code else -- Code end You'd have to order things up in the rank order and have it like: if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) That will work. Link to comment
shoBy Posted September 10, 2014 Author Share Posted September 10, 2014 I can't do it better, I think... Is good ?: -- Global chat function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, and isObjectInACLGroup ("Admin")) then outputChatBox("#FF0000[Owner]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("Co-Owner")) then outputChatBox("#FF0000[Co-Owner]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("Trial")) then outputChatBox("#FF0000[Trial Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 5")) then outputChatBox("#FF0000[super Mod]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("Owner")) then outputChatBox("#FF0000[Admin]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("lvl 1")) then outputChatBox("#FF0000[Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("Moderator")) then outputChatBox("#FF0000[Moderator]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("lvl 2")) then outputChatBox("#FF0000[super Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("lvl 4")) then outputChatBox("#FF0000[Mod]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("lvl 3")) then outputChatBox("#FF0000[Lead Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account and isObjectInACLGroup ("SuperModerator")) then outputChatBox("#FF0000[superModerator]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) Link to comment
crismar Posted September 10, 2014 Share Posted September 10, 2014 You haven't applied what I said above, either that or I'm too blind. Wrap everything inside a function with the structure i mentioned above. Link to comment
shoBy Posted September 10, 2014 Author Share Posted September 10, 2014 I don't know, sorry, I can't do it. Can you help me putting it on the script, please ? Link to comment
xeon17 Posted September 10, 2014 Share Posted September 10, 2014 I don't know, sorry, I can't do it. Can you help me putting it on the script, please ? Go study! Link to comment
shoBy Posted September 10, 2014 Author Share Posted September 10, 2014 Yah, sure, thank you. If I can't... Link to comment
shoBy Posted September 11, 2014 Author Share Posted September 11, 2014 Guys, I don't know if this script is good: -- Global chat function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Owner]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Co-Owner")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Co-Owner]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Trial")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Trial Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 5")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[super Mod]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Owner")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Admin]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 1")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Moderator]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 2")) then else if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[super Helper]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." .. account, aclGetGroup("lvl 4")) then else -- then if not isObjectInACLGroup(NEXT_GROUP) and isObjectInACLGroup(CURRENT_GROUP) else -- then outputChatBox("#FF0000[Mod]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) else -- then outputChatBox("#FF0000[GLOBAL]#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true) end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"x", "down", "chatbox", "global"); end end) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "x", "down", "chatbox", "global"); end ) function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if Link to comment
Dimos7 Posted September 11, 2014 Share Posted September 11, 2014 if not isObjectInACLGroup(SuperModerator) and isObjectInACLGroup(Admin) something like that i think Link to comment
Moderators IIYAMA Posted September 11, 2014 Moderators Share Posted September 11, 2014 @shoBy seriously? You don't even know what you are doing, aren't you? You should do the basic things correctly, before you start with the advanced stuff. Now you are only f.... up your code everytime you edit it. Yah, sure, thank you. If I can't... If you don't have time for learning, then stop coding. Wasting your time, wasting our time. Link to comment
shoBy Posted September 11, 2014 Author Share Posted September 11, 2014 Sorry, I saw now. I'll edit it. 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