Jump to content

[Problem] getplayercolorname


//_Dragon

Recommended Posts

Do you get any debug messages when using only getPlayerName? As far as I'm aware, getPlayerName should return the full name, including any hex colour. For example;

getPlayerName(thePlayer) 
-- #454545Dealman 

And since you've set colour-coded to true, it should work without having to use getPlayerNametagColor.

Edit:

Stop PM'ing me when you already have a thread made. Other people might benefit from the assistance given here, not from my PM inbox :lol:

Link to comment
Dude, the only time you try to use 'source' is in getPlayerName and getPlayerNametagColor. Is that a coincidence that the WARNING message occurs only on those lines? (The ERROR message occurs because getPlayerNametagColor fails)

What i can do ? i can change (source)maybe (name) ?

Link to comment

I want add here hex too but doesnt work :/ ?

function giveSomeoneMoney(player, cmd, target, amount) 
if target then 
if amount then 
local money = getPlayerMoney(player) 
local targetplayer = getPlayerFromName(target) 
local r, g, b = getPlayerNametagColor(player) 
local hex = string.format("#%.2X%.2X%.2X", r, g, b) 
amount = tonumber(amount) 
if targetplayer then 
if money >= amount and amount >= 250 then 
givePlayerMoney(targetplayer, amount) 
takePlayerMoney(player, amount) 
outputChatBox("..getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true) 
 

Link to comment
try this
outputChatBox(getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true) 

i've it dude but after adding hex wont work

function giveSomeoneMoney(player, cmd, target, amount) 
if target then 
if amount then 
local money = getPlayerMoney(player) 
local targetplayer = getPlayerFromName(target) 
local r, g, b = getPlayerNametagColor(player) 
local hex = string.format("#%.2X%.2X%.2X", r, g, b) 
amount = tonumber(amount) 
if targetplayer then 
if money >= amount and amount >= 250 then 
givePlayerMoney(targetplayer, amount) 
takePlayerMoney(player, amount) 
outputChatBox("..getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true) 
 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...