Jump to content

Help! add Função piscar farois


Recommended Posts

De uma olhada:

?

 
  1. function bindSignalKey ( )
  2. bindKey ( source, "L", "up", changeCarLock )
  3. end
  4. addEventHandler ( "onPlayerJoin", getRootElement(), bindSignalKey )
  5.  
  6. function changeCarLock ( source, cmd)
  7. if not getElementData ( source, "lockTimer" ) then
  8. setElementData ( source, "lockTimer", true )
  9. setTimer ( function () setElementData ( source, "lockTimer", false ) end , 1000, 1 )
  10. local acc = getAccountName ( getPlayerAccount ( source ) )
  11. for theKey,theVehicle in ipairs(getElementsByType ( "vehicle" )) do
  12. if isElement ( theVehicle ) then
  13. if(getElementData ( theVehicle, "owner" ) == acc) then
  14. if isVehicleLocked ( theVehicle ) then
  15. setVehicleLocked ( theVehicle, false )
  16. playSoundFrontEnd (getRootElement(),5)
  17. setVehicleData ( getElementData ( theVehicle, "vehid" ), "lock", 0 )
  18. outputChatBox ( "#FFFFFF[#20B2AAAlarme#FFFFFF]:#000000 - #FFFFFF".. getPlayerName(source) .."#FFFFFF(ID:"..(getPlayerID(source) or "?").."#FFFFFF) #BEBEBESeu veiculo foi #FF0000Destrancado#FFFFFF.",source,255,255,255,true )
  19. else
  20. setVehicleLocked ( theVehicle, true )
  21. playSoundFrontEnd (getRootElement(),5)
  22. setVehicleData ( getElementData ( theVehicle, "vehid" ), "lock", 0 )
  23. outputChatBox ( "#FFFFFF[#20B2AAAlarme#FFFFFF]:#000000 - #FFFFFF".. getPlayerName(source) .."#FFFFFF(ID:"..(getPlayerID(source) or "?").."#FFFFFF) #BEBEBESeu veiculo foi #00FF00Trancado#FFFFFF.",source,255,255,255,true )
  24. triggerClientEvent ( source, "beepAlarmS", source )
  25. end
  26. return true
  27. end
  28. end
  29. end
  30. end
  31. end

estou querendo adicionar uma função que é: piscar as luzes do carro cada vez que eu tranca-lo ou destranca-lo você poderiam me ajudar? ja tentei e não funcionou. Abraço!

*OBS: esse script funciona junto com a minha loja de veiculos.

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