Search the Community
Showing results for tags 'lock car'.
-
De uma olhada: ? function bindSignalKey ( ) bindKey ( source, "L", "up", changeCarLock ) end addEventHandler ( "onPlayerJoin", getRootElement(), bindSignalKey ) function changeCarLock ( source, cmd) if not getElementData ( source, "lockTimer" ) then setElementData ( source, "lockTimer", true ) setTimer ( function () setElementData ( source, "lockTimer", false ) end , 1000, 1 ) local acc = getAccountName ( getPlayerAccount ( source ) ) for theKey,theVehicle in ipairs(getElementsByType ( "vehicle" )) do if isElement ( theVehicle ) then if(getElementData ( theVehicle, "owner" ) == acc) then if isVehicleLocked ( theVehicle ) then setVehicleLocked ( theVehicle, false ) playSoundFrontEnd (getRootElement(),5) setVehicleData ( getElementData ( theVehicle, "vehid" ), "lock", 0 ) outputChatBox ( "#FFFFFF[#20B2AAAlarme#FFFFFF]:#000000 - #FFFFFF".. getPlayerName(source) .."#FFFFFF(ID:"..(getPlayerID(source) or "?").."#FFFFFF) #BEBEBESeu veiculo foi #FF0000Destrancado#FFFFFF.",source,255,255,255,true ) else setVehicleLocked ( theVehicle, true ) playSoundFrontEnd (getRootElement(),5) setVehicleData ( getElementData ( theVehicle, "vehid" ), "lock", 0 ) outputChatBox ( "#FFFFFF[#20B2AAAlarme#FFFFFF]:#000000 - #FFFFFF".. getPlayerName(source) .."#FFFFFF(ID:"..(getPlayerID(source) or "?").."#FFFFFF) #BEBEBESeu veiculo foi #00FF00Trancado#FFFFFF.",source,255,255,255,true ) triggerClientEvent ( source, "beepAlarmS", source ) end return true end end end end 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.