Jump to content

Help..


Parazitas

Recommended Posts

Posted

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 ) 

Posted

The code you've provided will only allow the players in the team "services" dive that long. nothing about a skin 45 or what so ever. Your script must be running several versions.

Posted

Imposible change it? to only player with skin 45 can dive? i have full script im just add small part of this script.. I need just change this function to script work properly...

Posted
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

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