Jump to content

Help Script / AJUDA PFV


Recommended Posts

22 hours ago, Ramon987 said:

function finishExmanigAutoS ()
	local veh = getPedOccupiedVehicle ( source )
	if isElement ( veh ) then
		destroyElement ( veh )
		
		ac = getPlayerAccount ( source )
		setAccountData ( ac, "carLicense", "1" )
		setElementData ( source, "carLicense", true)
		outputChatBox ( "#FF0000-Auto Escola-#FFFF00Parabéns! Você passou No Teste!", source, 0, 255, 0, true )
		outputChatBox ( "#FF0000-Auto Escola-#FFFF00Aqui Esta A Sua Habilitação E não quebre as regras.", source, 0, 255, 0, true )
		setElementPosition (thePlayer, -2029.6142578125, -116.66015625, 1035.171875) 
	end
end

addEvent( "finishExmanigAuto", true )
addEventHandler( "finishExmanigAuto", getRootElement(), finishExmanigAutoS )

Pra fazer a mesma coisa só que aqui tenho que fazer oque?

Tente isso:

function finishExmanigAutoS ()
	local veh = getPedOccupiedVehicle ( source )
	if isElement ( veh ) then
		destroyElement ( veh )
   	 end
		ac = getPlayerAccount ( source )
		setAccountData ( ac, "carLicense", "1" )
		setElementData ( source, "carLicense", true)
		outputChatBox ( "#FF0000-Auto Escola-#FFFF00Parabéns! Você passou No Teste!", source, 0, 255, 0, true )
		outputChatBox ( "#FF0000-Auto Escola-#FFFF00Aqui Esta A Sua Habilitação E não quebre as regras.", source, 0, 255, 0, true )
		setElementPosition (source, -2029.6142578125, -116.66015625, 1035.171875) 
end

addEvent( "finishExmanigAuto", true )
addEventHandler( "finishExmanigAuto", getRootElement(), finishExmanigAutoS )

 

Edited by MainSCR
  • Thanks 1
Link to comment
14 minutes ago, MainSCR said:

Tente isso:


function finishExmanigAutoS ()
	local veh = getPedOccupiedVehicle ( source )
	if isElement ( veh ) then
		destroyElement ( veh )
		
		ac = getPlayerAccount ( source )
		setAccountData ( ac, "carLicense", "1" )
		setElementData ( source, "carLicense", true)
		outputChatBox ( "#FF0000-Auto Escola-#FFFF00Parabéns! Você passou No Teste!", source, 0, 255, 0, true )
		outputChatBox ( "#FF0000-Auto Escola-#FFFF00Aqui Esta A Sua Habilitação E não quebre as regras.", source, 0, 255, 0, true )
    		removePedFromVehicle(source)
		setElementPosition (source, -2029.6142578125, -116.66015625, 1035.171875) 
	end
end

addEvent( "finishExmanigAuto", true )
addEventHandler( "finishExmanigAuto", getRootElement(), finishExmanigAutoS )

 

Eu fiz dessa forma só que acrescentei o onVehicleExit e funcionou perfeitamente. Obrigado <3 

addEventHandler ("onVehicleExit", getRootElement(), finishExmanigAutoS )  

 

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...