Gabrielll Posted April 12, 2020 Share Posted April 12, 2020 (edited) 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 April 12, 2020 by Gabrielll Link to comment
Angelo Pereira Posted April 12, 2020 Share Posted April 12, 2020 (edited) 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 April 12, 2020 by Angelo Pereira Link to comment
Other Languages Moderators Lord Henry Posted April 13, 2020 Other Languages Moderators Share Posted April 13, 2020 @Gabrielll o erro ocorre pois a sua linha 3 deveria estar entre a linha 5 e 6, dentro da função. Além disso, as linhas 6 e 7 deveriam estar trocadas. 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