Parazitas Posted January 22, 2016 Posted January 22, 2016 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 )
tosfera Posted January 22, 2016 Posted January 22, 2016 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
Parazitas Posted January 22, 2016 Author Posted January 22, 2016 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...
Ludo Posted January 24, 2016 Posted January 24, 2016 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now