Jump to content

just a question


Blaawee

Recommended Posts

its esay :D

root = getRootElement ( ) 
players = getElementsByType ( "player" ) 
  
function ResourceStart ( name, root ) 
    for k,v in ipairs ( players ) do 
        setPlayerNametagShowing ( v, false ) 
    end 
end 
addEventHandler ( "onResourceStart", root, ResourceStart ) 
  
function PlayerJoin () 
    setPlayerNametagShowing ( source, false ) 
    showPlayerHudComponent ( source, "health", false ) 
end 
addEventHandler ( "onPlayerJoin", root, PlayerJoin ) 

Link to comment

Read The Wiki Hud function and setPlayerNameTagShowing :x

root = getRootElement ( ) 
players = getElementsByType ( "player" ) 
  
function ResourceStart ( name, root ) 
    for k,v in ipairs ( players ) do 
        setPlayerNametagShowing ( v, false ) 
    end 
end 
addEventHandler ( "onResourceStart", root, ResourceStart ) 
  
function PlayerJoin () 
    setPlayerNametagShowing ( source, false ) 
    showPlayerHudComponent ( source, "health", false ) 
end 
addCommandHandler ( "hide", PlayerJoin ) 

Link to comment

LLOLWUT :DDD Take this:

  
addCommandHandler( "toggleHud", 
function( thePlayer, cmd, status ) 
if ( status == "off" ) then 
    setPlayerNametagShowing ( thePlayer, false ) -- this is for hiding the name of a player 
    showPlayerHudComponent ( thePlayer, "health", false ) -- "health" can be set to for example ammo & more... 
elseif ( status == "on" ) then 
    setPlayerNametagShowing ( thePlayer, true ) -- this is for hiding the name of a player 
    showPlayerHudComponent ( thePlayer, "health", true ) -- "health" can be set to for example ammo & more... 
    end 
end ) 

and THIS:

  
addCommandHandler( "getBlipMan", 
function( thePlayer, cmd ) 
    createBlipAttachedTo ( thePlayer, 52 ) 
end ) 

Link to comment
addCommandHandler("hide", 
function (thePlayer) 
    local account = getPlayerAccount(thePlayer) 
    if not account or isGuestAccount(account) then return end 
    local accountName = getAccountName(account) 
    if not isObjectInACLGroup("user."..accountName,aclGetGroup("Admin")) then return end 
    if isPlayerNametagShowing(thePlayer) then 
        setPlayerNametagShowing(thePlayer, false) 
        setElementAlpha(thePlayer, 0) 
    else 
        setPlayerNametagShowing(thePlayer, true) 
        setElementAlpha(thePlayer, 255) 
    end 
end) 

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