Rio Posted April 3, 2016 Posted April 3, 2016 I've been working on making a samsite for my admin base.. I tried everything searching searching fixed the code still i'm getting this error : [2016-04-03 10:04:47] WARNING: WTA-basesamsite\ad_base_s.lua:26: Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] [2016-04-03 10:04:53] WARNING: WTA-basesamsite\ad_base_s.lua:60: Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] My isObjectInACLGroup part Code: function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or not vehicle then local account = getPlayerAccount ( pla ) if account then local accountname = getAccountName ( account ) if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Admin" ) ) then else if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Super Moderator" ) ) then else if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Moderator" ) ) then outputChatBox ( "[WTA]Welcome Sir, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "***WTA Headquarters Restricted Area!***", pla, 255, 0, 0 ) outputChatBox ( "* "..getPlayerName(pla)..".has entered The WTA Headquarters Restricted Area.Enjoy The Fireworks Bro!", g_root, 70, 251, 45 ) end end end end end end end addEventHandler ( "onColShapeHit", g_base_col, hit ) Checkout My Loginpanel! - Download Now! Forum - Thread : Let's Go!
Dimos7 Posted April 3, 2016 Posted April 3, 2016 function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or not vehicle then local account = getPlayerAccount ( pla ) if account then local accountname = getAccountName ( account ) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then else if isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "Super Moderator" ) ) then else if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Moderator" ) ) then outputChatBox ( "[WTA]Welcome Sir, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "***WTA Headquarters Restricted Area!***", pla, 255, 0, 0 ) outputChatBox ( "* "..getPlayerName(pla)..".has entered The WTA Headquarters Restricted Area.Enjoy The Fireworks Bro!", g_root, 70, 251, 45 ) end end end end end end end addEventHandler ( "onColShapeHit", g_base_col, hit )
Anubhav Posted April 3, 2016 Posted April 3, 2016 Why don't you use elseif? It is better than typing so many ends See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Rio Posted April 4, 2016 Author Posted April 4, 2016 Lol thanks anubhav! I thought there was no elseif like thing so i used else if .... Checkout My Loginpanel! - Download Now! Forum - Thread : Let's Go!
Anubhav Posted April 4, 2016 Posted April 4, 2016 Lol thanks anubhav! I thought there was no elseif like thing so i used else if .... Welcome. I know some languages don't have elseif, rather else if. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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