GameZoneX Posted May 18, 2011 Share Posted May 18, 2011 Hello, How do i put the names off in the GUI of Freeroam map. I want to do this for RP's and things like that. Best regards, Bularax Link to comment
karlis Posted May 18, 2011 Share Posted May 18, 2011 snippet taken from wiki example. root = getRootElement ( ) -- Store all the players in the server into a table players = getElementsByType ( "player" ) function ResourceStart ( name, root ) for k,v in ipairs ( players ) do -- for all the players in the table setPlayerNametagShowing ( v, false ) -- turn off their nametag end end addEventHandler ( "onResourceStart", root, ResourceStart ) function PlayerJoin () -- Whoever joins the server should also have their nametags deactivated setPlayerNametagShowing ( source, false ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin ) Link to comment
AGENT_STEELMEAT Posted May 18, 2011 Share Posted May 18, 2011 Well 2 things: First, the above code will work, but is inefficient. function ResourceStart(name, root) for i, thePlayer in ipairs(getElementsByType("player")) do --You dont need a players table, especially as a global variable. setPlayerNametagShowing(thePlayer, false) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), ResourceStart) --Only run this when THIS resource starts function PlayerJoin() setPlayerNametagShowing(source, false) end addEventHandler("onPlayerJoin", getRootElement(), PlayerJoin) --No need to store the root element, especially as a global variable. Second, this will hide the player's name that is attached to his/her body in-game, not necessarily their blip or name in the freeroam GUI (unless the freeroam gui is scripted to detect if their nametag is showing or not). Link to comment
Discord Moderators Zango Posted May 19, 2011 Discord Moderators Share Posted May 19, 2011 Since there is no freeroam setting to do this, you can go into fr_client.lua and remove/comment the content of function updatePlayerBlips function updatePlayerBlips() end Link to comment
GameZoneX Posted May 19, 2011 Author Share Posted May 19, 2011 But zango, which that 1 i can't spawn verhicles and jetpack 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