Gabrielll Posted April 12, 2020 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
Angelo Pereira Posted April 12, 2020 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 Página : MAD Scripting MTA Discord : Ângelo Pereira#4059 " Se eu te ajudei, deixe sua avaliação, obrigado ! "
Moderators Lord Henry Posted April 13, 2020 Moderators 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. Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
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