MR.S3D Posted January 14, 2013 Share Posted January 14, 2013 client: function firing( _, _, _, _, _, _, hitElement) if hitElement and getElementType( hitElement ) == "vehicle" and getElementHealth(hitElement) <= 300 and not getElementData(hitElement,"lastDamageFrom") then setElementData(hitElement,"lastDamageFrom",getLocalPlayer()) end end addEventHandler("onClientPlayerWeaponFire", getRootElement(), firing ) server: function add() local player = getElementData(source,"lastDamageFrom") if player then if (getVehicleType ( source ) == "Automobile")then iii(player) elseif (getVehicleType ( source ) == "Helicopter")then ooo(player) elseif (getVehicleType ( source ) == "Boat")then lll(player) end end end addEventHandler("onVehicleExplode", getRootElement(), add ) This is maybe not the most efficient solution, but should work. You should check if isElment(player) or not Link to comment
csiguusz Posted January 14, 2013 Share Posted January 14, 2013 You should check if isElment(player) or not Yes, I forgot it. Link to comment
MR.S3D Posted January 14, 2013 Share Posted January 14, 2013 ok it works any problem? Link to comment
ali Posted January 14, 2013 Author Share Posted January 14, 2013 there were bugs but fixed em 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