Jump to content

WARNING, ERROR


yToPzz

Recommended Posts

[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 by yToPzz
Link to comment
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

  • Thanks 1
Link to comment
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

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...