nick1995 Posted June 12, 2012 Share Posted June 12, 2012 Hey, What is wrong with this: elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) and name =! "damian" then Its about: and name =! "damian" Link to comment
Castillo Posted June 12, 2012 Share Posted June 12, 2012 What is "=!" ? I don't understand what are you trying to do. Link to comment
nick1995 Posted June 12, 2012 Author Share Posted June 12, 2012 What is "=!" ? I don't understand what are you trying to do. That means, "is not" Or... is that not right? Link to comment
Castillo Posted June 12, 2012 Share Posted June 12, 2012 What exactly do you want to do? Link to comment
X-SHADOW Posted June 12, 2012 Share Posted June 12, 2012 i think he want like this addEventHandler('onClientResourceStart', resourceRoot, function(uPlayer) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) and getPlayerName(uPlayer) == 'damian' then end end) Link to comment
nick1995 Posted June 12, 2012 Author Share Posted June 12, 2012 It is a admintag script I want that every admin get [ADMIN] for his name except Damian. This is the script: function chatbox(text, msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if (msgtype == 0) then if isObjectInACLGroup("user." .. account, aclGetGroup("Nick en Mitchel")) then cancelEvent(true) outputChatBox("#FF0000[Owner] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [Owner] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) and name =! "damian" then cancelEvent(true) outputChatBox("#855863[ADMIN] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ADMIN] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox("#855863[sMOD] #FFFFFF" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [sMOD] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#855863[MOD] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [MOD] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox(name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: " .. name .. ": " .. text) end elseif (msgtype == 2) then end end addEventHandler("onPlayerChat", root, chatbox) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end Link to comment
Castillo Posted June 12, 2012 Share Posted June 12, 2012 function chatbox(text, msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if (msgtype == 0) then if isObjectInACLGroup("user." .. account, aclGetGroup("Nick en Mitchel")) then cancelEvent(true) outputChatBox("#FF0000[Owner] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [Owner] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) and name ~= "damian" then cancelEvent(true) outputChatBox("#855863[ADMIN] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ADMIN] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox("#855863[sMOD] #FFFFFF" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [sMOD] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#855863[MOD] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [MOD] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox(name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: " .. name .. ": " .. text) end elseif (msgtype == 2) then end end addEventHandler("onPlayerChat", root, chatbox) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end You have to use: "~=". Link to comment
TAPL Posted June 12, 2012 Share Posted June 12, 2012 i think he want like this addEventHandler('onClientResourceStart', resourceRoot, function(uPlayer) if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) and getPlayerName(uPlayer) == 'damian' then end end) nice joke lol Link to comment
nick1995 Posted June 12, 2012 Author Share Posted June 12, 2012 Thanks, that is different than php. Php is != ... Thanks anyway Link to comment
nick1995 Posted June 12, 2012 Author Share Posted June 12, 2012 Hmm... it doesn't work Link to comment
Anderl Posted June 12, 2012 Share Posted June 12, 2012 Yes, PHP is != not =! like you wrote. 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