Jump to content

just a question


Blaawee

Recommended Posts

Posted

hi guys i see in some servers admin can hide his name and his health bar but i don't know how , can some one tell me how ?

is it a script or including the admin resource, or it's a command ?

Posted

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 ) 

Posted

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 ) 

Posted
function BlipAttachedToMyPlayer ( source ) 
createBlipAttachedTo ( source , 52 ) 
outputChatBox("Now You Have Blip Attached To Your Player",source,255,0,0) 
end 
addCommandHandler ( "blip", BlipAttachedToMyPlayer ) 
  

Posted

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 ) 

Posted
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) 

Posted

wrong wrong wrong wrong and not visible and i can be visible with command "ap "

what i mean is there any way to make no one see my name and my health bar in freeroam Gamemode :@

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