midomido Posted July 18, 2011 Share Posted July 18, 2011 hi , i am trying to make a script for death match in which you could earn stealth , invisible state for 60 seconds , but the player name and health bar make it very clear , how can i disable other players from seeing the hidden player's name and health bar ? Link to comment
HoLsTeN Posted July 18, 2011 Share Posted July 18, 2011 hi see this SetPlayerNametagShowing SetTimer good luck Link to comment
HoLsTeN Posted July 18, 2011 Share Posted July 18, 2011 Back Sorry i Am bad Scripter but test this local rElement = getRootElement() addEvent("TheEventName", true) addEventHandler("TheEventName", rElement, function() setPlayerNametagShowing ( source, false ) setTimer( setPlayerNametagShowing, 60000, 1, true) end ) Link to comment
Castillo Posted July 18, 2011 Share Posted July 18, 2011 Holsten, please, don't double-post, you could have used the "EDIT" button instead. P.S: Your example is wrong. addEvent("enableInvisible", true) addEventHandler("enableInvisible", root, function(player) setPlayerNametagShowing ( player, false ) setTimer( setPlayerNametagShowing, 60000, 1, player, true) end ) addCommandHandler("invisible", function (player) triggerEvent("enableInvisible",player,player) end) When you type '/invisible' in the chat/client console it should trigger the event to make you 'invisible'. Link to comment
HoLsTeN Posted July 18, 2011 Share Posted July 18, 2011 oK Next Time I will Use EDIT* EDIT: Did He Need to use local root = getRootElement() ?? Link to comment
Aibo Posted July 18, 2011 Share Posted July 18, 2011 oK Next Time I will Use EDIT* EDIT: Did He Need to use local root = getRootElement() ?? no, root is a predefined global variable that exists in every resource. Link to comment
midomido Posted July 18, 2011 Author Share Posted July 18, 2011 thank you HoLsTeN and Solidsnake14 very much <3 . Link to comment
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