Jump to content

Voice Script Color?


Flipi

Recommended Posts

replace this

function dxDrawVoiceLabel ( player, index, color ) 
    local sx, sy = guiGetScreenSize () 
    local scale = sy / 800 
    local spacing = ( ICON_LINE * scale ) 
    local px, py = sx - 200, sy * 0.7 + spacing * index 
    local icon = ICON_DIMENSIONS * scale 
  
    dxDrawImage ( px, py, icon, icon, ICON_PATH, 0, 0, 0, color, false ) 
  
    px = px + spacing 
  
    -- shadows 
    dxDrawText ( getPlayerName ( player ), px + 1, py + 1, px, py, ICON_TEXT_SHADOW, scale ) 
    -- text 
    dxDrawText ( getPlayerName ( player ), px, py, px, py, color, scale ) 
end 

to this

function dxDrawVoiceLabel ( player, index, color ) 
    local sx, sy = guiGetScreenSize () 
    local scale = sy / 800 
    local spacing = ( ICON_LINE * scale ) 
    local px, py = sx - 200, sy * 0.7 + spacing * index 
    local icon = ICON_DIMENSIONS * scale 
    local name = getPlayerName ( player ) 
  
    dxDrawImage ( px, py, icon, icon, ICON_PATH, 0, 0, 0, color, false ) 
  
    px = px + spacing 
  
    -- shadows 
    name_ = name:gsub ( "#%x%x%x%x%x%x", "" ) 
    dxDrawText ( name_, px + 1, py + 1, px, py, ICON_TEXT_SHADOW, scale, "default", "left", "top", false, false, false, false) 
    -- text 
    dxDrawText ( name, px, py, px, py, color, scale, "default", "left", "top", false, false, false, true) 
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...