Pierce Posted April 8, 2014 Share Posted April 8, 2014 function warnPlayersOfDamage(vehicle) local pveh = getPedOccupiedVehicle (localPlayer) local vhealth = getElementHealth(pveh) if vhealth < 260 then outputChatBox("Your vehicle is highly damaged. It may explode.",localPlayer,255,0,0) end end addEventHandler("onClientVehicleEnter",localPlayer,warnPlayersOfDamage) im just doing this because im bored but this thing doesnt even react.no errors,nothing. please help Link to comment
Baseplate Posted April 8, 2014 Share Posted April 8, 2014 function warnPlayersOfDamage(thePlayer, seat) local vhealth = getElementHealth(source) if vhealth < 260 then outputChatBox("Your vehicle is highly damaged. It may explode.", 255, 0, 0) end end addEventHandler("onClientVehicleEnter", root, warnPlayersOfDamage) The source of onClientVehicleEnter is the vehicle that the player entered. 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