Jump to content

Need some help..


Parazitas

Recommended Posts

Hello guys! Im learning how to script, i have this function and i want edit ( When player have skin 45 he cant can't kill other players and others cant kill him.. maybe can help me?

function enterWaterfish () 
local playerTeam = getPlayerTeam ( source ) 
local TeamName = getTeamName ( playerTeam ) 
if TeamName == "team" then 
    if isElementInWater(source) then 
    setElementHealth ( source, 100 ) 
    end 
end 
end 
addEventHandler ( "onPlayerDamage", getRootElement (), enterWaterfish ) 

Link to comment

This is client side script

function stopDamage ( attacker ) 
local skin = getElementModel(source) 
local attskin = getElementModel(attacker) 
    if ( skin == 45 or attskin == 45 ) then  
        cancelEvent() --cancel if damaged plr or att has the skin  
    end  
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage ) 

Link to comment

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