Jump to content

ACL Object check


DRW

Recommended Posts

Posted
addEvent ("team7", true) 
addEventHandler ("team7", getRootElement(), function(thePlayer) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
setPlayerTeam (source, admins) 
setElementPosition (source,-183,2629,63.3) 
triggerClientEvent (source, "amosnose", source) 
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then 
setPlayerTeam (source, mods) 
triggerClientEvent (source, "amosnose", source) 
setElementPosition (source,-183,2629,63.3) 
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "SuperModerator" ) ) then 
setPlayerTeam (source, mods) 
triggerClientEvent (source, "amosnose", source) 
setElementPosition (source,-183,2629,63.3) 
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "cmanager" ) ) then 
setPlayerTeam (source, mods) 
triggerClientEvent (source, "amosnose", source) 
setElementPosition (source,-183,2629,63.3) 
else 
outputChatBox ("No eres de ningún equipo de Staff.") 
end 
end) 

Errors:

attempt to concatenate local "accname" (a boolean value)

Bad argument @getPlayerAccount [Expected element at argument 1, got nil]

Bad argument @getAccountName [Expected account at argument 1, got boolean]

It's not working, why?

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted

show me the client side function.

Try this it should work

addEvent ("team7", true) 
addEventHandler ("team7", getRootElement(),  
function() 
    local account = getPlayerAccount (source) 
    if not isGuestAccount(account) then  
    local accName = getAccountName (account)  
        if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
            setPlayerTeam (source, admins) 
            setElementPosition (source,-183,2629,63.3) 
            triggerClientEvent (source, "amosnose", source) 
        elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then 
            setPlayerTeam (source, mods) 
            triggerClientEvent (source, "amosnose", source) 
            setElementPosition (source,-183,2629,63.3) 
        elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "SuperModerator" ) ) then 
            setPlayerTeam (source, mods) 
            triggerClientEvent (source, "amosnose", source) 
            setElementPosition (source,-183,2629,63.3) 
        elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "cmanager" ) ) then 
            setPlayerTeam (source, mods) 
            triggerClientEvent (source, "amosnose", source) 
            setElementPosition (source,-183,2629,63.3) 
        else 
            outputChatBox ("No eres de ningún equipo de Staff.") 
        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

Posted
show me the client side function.

Try this it should work

addEvent ("team7", true) 
addEventHandler ("team7", getRootElement(),  
function() 
    local account = getPlayerAccount (source) 
    if not isGuestAccount(account) then  
    local accName = getAccountName (account)  
        if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
            setPlayerTeam (source, admins) 
            setElementPosition (source,-183,2629,63.3) 
            triggerClientEvent (source, "amosnose", source) 
        elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then 
            setPlayerTeam (source, mods) 
            triggerClientEvent (source, "amosnose", source) 
            setElementPosition (source,-183,2629,63.3) 
        elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "SuperModerator" ) ) then 
            setPlayerTeam (source, mods) 
            triggerClientEvent (source, "amosnose", source) 
            setElementPosition (source,-183,2629,63.3) 
        elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "cmanager" ) ) then 
            setPlayerTeam (source, mods) 
            triggerClientEvent (source, "amosnose", source) 
            setElementPosition (source,-183,2629,63.3) 
        else 
            outputChatBox ("No eres de ningún equipo de Staff.") 
        end  
    end 
end) 
  

Thank you so much!

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...