[K]iller Posted November 4, 2017 Share Posted November 4, 2017 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. Link to comment
W4LK1NG Posted November 5, 2017 Share Posted November 5, 2017 no bindkey está com o L maiúsculo, não sei se realmente interfere mas tenta usar colocando ele minusculo bindKey ( source, "l", "up", changeCarLock ) Link to comment
DNL291 Posted November 10, 2017 Share Posted November 10, 2017 (edited) Você pode usar createMarker com o tipo "corona" ou um shader que não é recomendável pra PC's fracos. Edit: Acho que você quis dizer pra piscar os faróis apenas, então use esta função: setVehicleOverrideLights Edited November 10, 2017 by DNL291 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