~Sr.Victor Posted June 11, 2020 Share Posted June 11, 2020 Please help me! https://prnt.sc/sy6nx2 function Loguei () setTimer(function(source) local Tempo = getElementData(source, "TempoPrisao") or 0 if Tempo >= 1 then local Tempo2 = getElementData(source, "TempoPrisao2") or 0 local Tempo3 = Tempo2 + 3 setTimer(function (source) if Tempo3 >= 1 then setElementInterior(source, 10) setElementPosition(source, 219.30274963379,109.94602966309,999.015625) setElementData(source, "TempoPrisao", Tempo3) setElementData(source, "TempoVolta", Tempo3) triggerClientEvent(source, "TS:SendoPreso", source) takeAllWeapons(source) setPlayerWantedLevel(source, 0) end end, 3000, 1, source) TempoPrender[source] = setTimer(function (source) if Tempo3 >= 1 then setElementData(source, "TempoPrisao", nil) setElementData(source, "TempoPrisao2", nil) setElementData(source, "Mtv_Prisao", nil) setElementData(source, "ID2", nil) setElementInterior(source, 0) setElementPosition(source, 1539.87463, -1675.75757, 13.54949) triggerClientEvent(source, "TS:Liberado", source) outputChatBox ( "#0037FF✘#ffffffDelegacia#0037FF✘➺ #ffffffVocê foi solto !", source, 255, 0, 0, true ) takeAllWeapons(source) setPlayerWantedLevel(source, 0) end end, Tempo3*60000, 1, source) end end, 1000, 1, source) end addEventHandler ("onPlayerLogin", root, Loguei) Warning: setElementInterior(source, 0) setElementPosition(source, 1539.87463, -1675.75757, 13.54949) triggerClientEvent(source, "TS:Liberado", source) outputChatBox ( "#0037FF✘#ffffffDelegacia#0037FF✘➺ #ffffffVocê foi solto !", source, 255, 0, 0, true ) takeAllWeapons(source) setPlayerWantedLevel(source, 0) Link to comment
Sisqo0 Posted June 12, 2020 Share Posted June 12, 2020 That's because the player logged out before the timer finishes. You should check on player first 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