WeeD1 Posted September 13, 2019 Share Posted September 13, 2019 Olá. alguém para me ajudar por favor? Estou com um problema em um sistema de teleportes, porém não sei como resolver, segue: WARNING: Teleports\teleports.Lua:10: Bad argument @ 'fadeCamera' [Expected element at argument 1] function tele (thePlayer) if getPedOccupiedVehicle(thePlayer) then outputChatBox ("#ff0000Você precisa sair do veículo para usar teleportes.", thePlayer, 255, 255, 255, true) else if getElementInterior(thePlayer) > 0 then outputChatBox ("#ff0000Você precisa sair do interior para usar teleportes.", thePlayer, 255, 255, 255, true) else fadeCamera(thePlayer, false, 0.5) if not isElement (thePlayer) then return end setTimer(fadeCamera, 1000, 1, thePlayer, true) if (commando[thePlayer]) then return end setTimer( function(thePlayer) if not (isElement(thePlayer)) then return end setElementPosition ( thePlayer, 260, -1780, 7 ) end, tempo, 1, thePlayer) commando[thePlayer] = true setTimer( function() commando[thePlayer] = false end, tempo*2, 1) end end end addCommandHandler ( "praia", tele ) Link to comment
DNL291 Posted September 14, 2019 Share Posted September 14, 2019 Não percebi erros, tente isto: function tele (thePlayer) if getPedOccupiedVehicle(thePlayer) then return outputChatBox ("#ff0000Você precisa sair do veículo para usar teleportes.", thePlayer, 255, 255, 255, true) end if getElementInterior(thePlayer) ~= 0 then return outputChatBox ("#ff0000Você precisa sair do interior para usar teleportes.", thePlayer, 255, 255, 255, true) end if (commando[thePlayer]) then return end fadeCamera(thePlayer, false, 0.5) setTimer( function(player) if isElement(player) then fadeCamera( player, true ) end end, 1000, 1, thePlayer ) setTimer( function(thePlayer) if (isElement(thePlayer)) then setElementPosition ( thePlayer, 260, -1780, 7 ) end end, tempo, 1, thePlayer) commando[thePlayer] = true setTimer( function(thePlayer) if (isElement(thePlayer)) then commando[thePlayer] = false end end, tempo*2, 1, thePlayer) end addCommandHandler ( "praia", tele ) 1 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