Jump to content

[HELP] Nametag Color for Newbie


roddydennvor

Recommended Posts

Hello there ,,

I want to make script when the player play on my server under 13 hours , then the name color on scoreboard is yellow...

Server-side

  
local hoursplayed = getElementData(thePlayer, "hoursplayed") 
  
if hoursplayed < 13 then 
     exports.global:setPlayerNametagColor(targetPlayer , 255, 255, 0)  
end 
  
  

This Script not work..

Can you help me please ?

Thanks

Edited by Guest
Link to comment

s_nametag

local hoursplayed = getElementData(thePlayer, "hoursplayed") 
  
if hoursplayed < 13 then 
exports.global:updateNametagColor(source) 
end 

nametag

function updateNametagColor(thePlayer) 
    if  getElementData(thePlayer, "hoursplayed") < 13 then  
        setPlayerNametagColor(thePlayer, 255, 255, 0) 
    end 
end 
  
for key, value in ipairs( getElementsByType( "player" ) ) do 
    updateNametagColor( value ) 
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...