MR.S3D Posted January 14, 2013 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 Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
csiguusz Posted January 14, 2013 Posted January 14, 2013 You should check if isElment(player) or not Yes, I forgot it. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
ali Posted January 14, 2013 Author Posted January 14, 2013 ok it works LUA Scripter [Tut]How to add maps using in-game script editor [Tut]How to get a hosted MTA Sa Server for free
MR.S3D Posted January 14, 2013 Posted January 14, 2013 ok it works any problem? Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
ali Posted January 14, 2013 Author Posted January 14, 2013 there were bugs but fixed em LUA Scripter [Tut]How to add maps using in-game script editor [Tut]How to get a hosted MTA Sa Server for free
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