x[Dev-PoinT]x Posted July 2, 2011 Share Posted July 2, 2011 outputChatBox("<==Ant!-System[xDev-PoinT]==>",0,255,0) function x(attacker, bodypart) if getElementType(attacker) == 'vehicle' then cancelEvent() end addEventHandler("onClientPlayerDamage", getLocalPlayer(),x) function x ( attacker, weapon, bodypart ) if ( weapon == 0 ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), x ) function x(attacker, bodypart) if getElementType(attacker) == '487' then cancelEvent() end addEventHandler("onClientPlayerDamage", getLocalPlayer(),x) end Link to comment
CowTurbo Posted July 2, 2011 Share Posted July 2, 2011 last end is out of the function And dont name al functions same .. you can make ur code MUCH smaller.. outputChatBox("<==Ant!-System[xDev-PoinT]==>",0,255,0) function onDamage(attacker, weapon, bodypart) -- if getElementType(attacker) == '487' then : Dont think this will work, getElementType will get type, such as vehicle, ped, object.... if getElementType(attacker) == 'vehicle' or ( weapon == 0 ) then cancelEvent() end end addEventHandler("onClientPlayerDamage", getLocalPlayer(),onDamage) Others i dont see. Link to comment
x[Dev-PoinT]x Posted July 2, 2011 Author Share Posted July 2, 2011 can any one fix it i wnat make No-Car Kill+No-Maverick kill +No Fist kill in one script? Link to comment
Twisted Posted July 2, 2011 Share Posted July 2, 2011 (edited) outputChatBox("<==Ant!-System[xDev-PoinT]==>",0,255,0) function vehicle(attacker, bodypart) if getElementType(attacker) == 'vehicle' then cancelEvent() end end addEventHandler("onClientPlayerDamage", getLocalPlayer(),vehicle) function x ( attacker, weapon, bodypart ) if ( weapon == 0 ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), x ) try that it may not work but should do Edited July 2, 2011 by Guest Link to comment
CowTurbo Posted July 2, 2011 Share Posted July 2, 2011 amazing Bug script. Why is that end needed at end? Why u dont have at first function 2 arguments, second bodypart arg will return weapon arg. U dont have second end at first function. What did u even change, removed one function and all ? Link to comment
Twisted Posted July 2, 2011 Share Posted July 2, 2011 amazing Bug script.Why is that end needed at end? Why u dont have at first function 2 arguments, second bodypart arg will return weapon arg. U dont have second end at first function. What did u even change, removed one function and all ? infact the vehicle script was mine taken from the very forum and he just editted and the End was mistaken 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