Jump to content

godmode


boro

Recommended Posts

Posted

Hi all i have godmode script, this script work fine but how make godmode only for player vs player ?

because when zombie attack me soo i have still 100% and this is bad

i try this but it dont work

function god ( attacker ) 
if ( getElementType ( attacker ) == "player" ) then 
if attacker == player then  
cancelEvent() 
end 
end 
end 
addEventHandler("onPlayerDamage", getRootElement(), god) 

I'll help When I Can.

Posted

You can't cancel this event.

Use this client sided instead:

addEventHandler("onClientPedDamage", root, 
function (attacker) 
if getElementType(attacker) == "player" then 
cancelEvent() 
end 
end) 

Lua Scripter

?ucet=miki_cz

Owner of mshost.cz MTA portal.

Posted

Yes with onClientPlayerDamage it work nice ty tapl

and please how to make godmode for source when is attacker in vehicle ?

I'll help When I Can.

Posted

I don't understand what do you mean, mind explaining yourself?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...