SetMarcos Posted December 14, 2019 Share Posted December 14, 2019 Good morning, how can I make the car lights flash when a player tries to catch it? my code: function enterVehicle ( player, seat, jacked ) local lock = getElementData(source, "lockedTo") local accName = getAccountName(getPlayerAccount(player)) if seat == 0 then if accName == lock then setElementFrozen ( source, false ) outputChatBox("[SERVER] - #00ff00your veh!", player, 255, 0, 0,true) return true else local Ax,Ay,Az = getElementPosition (source) cancelEvent() outputChatBox("[SERVER] - #ffff00Veh is private. #808080Owner is:#ff0000 "..lock..".", player, 255, 0, 0,true) triggerClientEvent ( player,"alarmeVeh", player ,source,Ax,Ay,Az) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) Link to comment
JeViCo Posted December 14, 2019 Share Posted December 14, 2019 You should use getPedTask to detect that action. onVehicleStartEnter event triggers even if there is a distance between player and vehicle 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