Rio Posted April 3, 2016 Share 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 ) Link to comment
Dimos7 Posted April 3, 2016 Share 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 ) Link to comment
Anubhav Posted April 3, 2016 Share Posted April 3, 2016 Why don't you use elseif? It is better than typing so many ends Link to comment
Rio Posted April 4, 2016 Author Share Posted April 4, 2016 Lol thanks anubhav! I thought there was no elseif like thing so i used else if .... Link to comment
Anubhav Posted April 4, 2016 Share 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. 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