yToPzz Posted July 1, 2022 Share Posted July 1, 2022 (edited) [2022-07-01 18:57:19] WARNING: VIP\acoes\acoes_s.lua:300: Bad argument @ 'getPlayerAccount' [Expected player or console at argument 1, got vehicle] [2022-07-01 18:57:19] WARNING: VIP\acoes\acoes_s.lua:301: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2022-07-01 18:57:19] ERROR: VIP\acoes\acoes_s.lua:302: attempt to concatenate local 'accName' (a boolean value) addEventHandler ( "onVehicleStartEnter", root, function(player,seat) if getElementModel ( source ) == 409 and seat == 0 then local acc = getPlayerAccount ( source ) local accName = getAccountName (acc) if not (isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP Diamante" ) )) then cancelEvent() outputChatBox("O veículo "..getVehicleNameFromModel(409).." é exclusivo para jogadores VIPs",player,255,0,0,false) end end end ) Edited July 1, 2022 by yToPzz Link to comment
Mr.Hugin Posted July 1, 2022 Share Posted July 1, 2022 18 minutes ago, yToPzz said: [2022-07-01 18:57:19] WARNING: VIP\acoes\acoes_s.lua:300: Bad argument @ 'getPlayerAccount' [Expected player or console at argument 1, got vehicle] [2022-07-01 18:57:19] WARNING: VIP\acoes\acoes_s.lua:301: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2022-07-01 18:57:19] ERROR: VIP\acoes\acoes_s.lua:302: attempt to concatenate local 'accName' (a boolean value) addEventHandler ( "onVehicleStartEnter", root, function(player,seat) if getElementModel ( source ) == 409 and seat == 0 then local acc = getPlayerAccount ( source ) local accName = getAccountName (acc) if not (isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP Diamante" ) )) then cancelEvent() outputChatBox("O veículo "..getVehicleNameFromModel(409).." é exclusivo para jogadores VIPs",player,255,0,0,false) end end end ) addEventHandler ( "onVehicleStartEnter", root, function(player,seat) if getElementModel ( source ) == 409 and seat == 0 then if getElementType( source ) == "player" then if not (isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(client)), aclGetGroup ( "VIP Diamante" ) )) then cancelEvent() outputChatBox("O veículo "..getVehicleNameFromModel(409).." é exclusivo para jogadores VIPs",player,255,0,0,false) end end end end ) try this 1 Link to comment
yToPzz Posted July 1, 2022 Author Share Posted July 1, 2022 17 minutes ago, Mr.Hugin said: addEventHandler ( "onVehicleStartEnter", root, function(player,seat) if getElementModel ( source ) == 409 and seat == 0 then if getElementType( source ) == "player" then if not (isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(client)), aclGetGroup ( "VIP Diamante" ) )) then cancelEvent() outputChatBox("O veículo "..getVehicleNameFromModel(409).." é exclusivo para jogadores VIPs",player,255,0,0,false) end end end end ) try this solved, but the player continues to enter the vehicle even though it is not in the ACL 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