Jump to content

can any one tel me is There A Bug here??


Recommended Posts

Posted
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 

Posted

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.

Posted (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 by Guest
Posted

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 ?

Posted
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 :S

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...