main Posted March 19, 2018 Share Posted March 19, 2018 (edited) 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 March 20, 2018 by MainSCR 1 Link to comment
Ramon987 Posted March 20, 2018 Author Share Posted March 20, 2018 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
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