Jump to content

Teleporte Para Interior Por Acl


Recommended Posts

Alguem pode arrumar para min ? (aparece esse erro)
ERROR: tele\tp.Lua:6 attempt to concatenate upvalue 'accName' (a boolean value)
ERROR: tele\tp.Lua:16 attempt to concatenate upvalue 'accName' (a boolean value)

local entrarInterior = createMarker(-2413.875, -601.86, 132.563, 'cylinder', 1.5, 255, 255, 0, 170 ) -- Local onde o marker de entrada ira ser criado.
local sairInterior = createMarker(-2412.739, -597.491, 132.627, 'cylinder', 1.5, 255, 255, 0, 170 ) -- Local onde o marker de saida ira ser criado.
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name
--/--
function entrarLocal ( hitElement, matchingDimension )
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
    if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then -- Se o elemento que colidir for um player e não estiver em um veículo então:
		setElementPosition(hitElement, -2410.438, -597.773, 132.648) -- Posição Do Interior
        setElementInterior ( hitElement, 0) -- Interior ID
			end
		end
	end
addEventHandler( "onMarkerHit", entrarInterior , entrarLocal ) 
--/--
function sairLocal ( hitElement, matchingDimension )
	if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
    if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then  -- Se o elemento que colidir for um player e não estiver em um veículo então:  
		setElementPosition(hitElement, -2411.634, -602.279, 132.563) -- Posição Do Interior
        setElementInterior ( hitElement, 0 ) -- Interior ID  
		end
	end
end	
addEventHandler( "onMarkerHit", sairInterior , sairLocal ) 

 

Edited by Gabrielll
Link to comment
local entrarInterior = createMarker(-2413.875, -601.86, 132.563, 'cylinder', 1.5, 255, 255, 0, 170 ) -- Local onde o marker de entrada ira ser criado.
local sairInterior = createMarker(-2412.739, -597.491, 132.627, 'cylinder', 1.5, 255, 255, 0, 170 ) -- Local onde o marker de saida ira ser criado.
--/ local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) --# Vai Dentro da Funções !

--/--

function entrarLocal ( hitElement, matchingDimension )
   if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then 
      local accName = getAccountName ( getPlayerAccount ( hitElement ) ) --# MOVIDO.
      if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then --/> Alterado Posição.
         setElementPosition ( hitElement, -2410.438, -597.773, 132.648) 
         setElementInterior ( hitElement, 0) 
      end
   end
end
addEventHandler( "onMarkerHit", entrarInterior , entrarLocal ) 

--/--

function sairLocal ( hitElement, matchingDimension )
   if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then 
      local accName = getAccountName ( getPlayerAccount ( hitElement ) ) --# MOVIDO.
      if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then --/> Alterado Posição.
         setElementPosition ( hitElement, -2411.634, -602.279, 132.563)
         setElementInterior ( hitElement, 0 ) 
      end
   end
end	
addEventHandler( "onMarkerHit", sairInterior , sairLocal ) 

 

Edited by Angelo Pereira
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...