Jump to content

Help..


Parazitas

Recommended Posts

Hello how change this... I need change cuz just player with skin 45 be able dive and not die. not team Services but all players who have skin 45.

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

Link to comment
function enterWaterfish() 
    local playerSkin = getElementModel(source) 
    if playerSkin == 45 then 
        if isElementInWater(source) then 
            setElementHealth(source, 100) 
        end 
    end 
end 
addEventHandler("onPlayerDamage", getRootElement(), enterWaterfish) 

This should work

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