Zakk Posted March 6, 2019 Share Posted March 6, 2019 Eu adicionei o SetelementFrozen a esse codigo so que o player continuar frezado mesmo dps de acaba o tempo do evento alguem sabe oque pode ser? function assaltar(thePlayer) givePlayerMoney(source,1200) setPlayerWantedLevel ( source, 5 ) setPedRotation(source, 270) setPedAnimation(source, "ped", "gang_gunstand", 10500, true, false, false, false) triggerClientEvent(root, alarmebanco, source ) setElementFrozen(source,true) triggerClientEvent(root, avisoroubo, root, thePlayer ) setElementPosition(Assalto, 3099.97, -3281.69, -0.5) setTimer(setElementPosition, 5000000, 1, Assalto, 1756.517578125,-1384.548828125,14.395313262939) end addEvent("assaltarbanco", true) addEventHandler("assaltarbanco", root, assaltar) Link to comment
Jonas^ Posted March 6, 2019 Share Posted March 6, 2019 (edited) Se viu o tamanho do timer? ' Fora que você declarou thePlayer como argumento da função e manteve source no código inteiro. Em nem um momento você definiu o frozen como false para desabilitar, tente isto: function assaltar (thePlayer) outputChatBox("@Executou.", thePlayer, 0, 255, 0) givePlayerMoney (thePlayer, 1200) setPlayerWantedLevel (thePlayer, 5) setPedRotation (thePlayer, 270) setPedAnimation (thePlayer, "ped", "gang_gunstand", 10500, true, false, false, false) triggerClientEvent (root, alarmebanco, thePlayer) setElementFrozen (thePlayer, true) triggerClientEvent (root, avisoroubo, root, thePlayer) setElementPosition (thePlayer, 3099.97, - 3281.69, - 0.5) setTimer (setElementPosition, 5000000, 1, thePlayer, 1756.517578125,-1384.548828125,14.395313262939) setElementFrozen (thePlayer, false) end addEvent("assaltarbanco", true) addEventHandler("assaltarbanco", root, assaltar) Edited March 6, 2019 by OverKILL Correção Link to comment
Other Languages Moderators Lord Henry Posted March 7, 2019 Other Languages Moderators Share Posted March 7, 2019 Esse timer de mais de 1 hora e meia não é bom. Para casos de longos períodos de tempo, usa-se timestamp. 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