nick1995 Posted June 12, 2012 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"
Castillo Posted June 12, 2012 Posted June 12, 2012 What is "=!" ? I don't understand what are you trying to do. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
nick1995 Posted June 12, 2012 Author 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?
Castillo Posted June 12, 2012 Posted June 12, 2012 What exactly do you want to do? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
X-SHADOW Posted June 12, 2012 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) My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
nick1995 Posted June 12, 2012 Author 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
Castillo Posted June 12, 2012 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: "~=". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TAPL Posted June 12, 2012 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
nick1995 Posted June 12, 2012 Author Posted June 12, 2012 Thanks, that is different than php. Php is != ... Thanks anyway
Castillo Posted June 12, 2012 Posted June 12, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Anderl Posted June 12, 2012 Posted June 12, 2012 Yes, PHP is != not =! like you wrote. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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