Jump to content

se alguem poder me ajuda


Recommended Posts

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

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 by OverKILL
Correção
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...