Jump to content

getPlayerName Nick


1LoL1

Recommended Posts

Can anyone help me? it's possible delete my nick of this?

for i,v in ipairs (getElementsByType("player")) do
    guiGridListSetItemText(GUIEditor.gridlist[1], guiGridListAddRow(GUIEditor.gridlist[1]), 1, string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", ""), false, true)
end

 

Link to comment
for i,v in ipairs (getElementsByType("player")) do
    local row = guiGridListAddRow(GUIEditor.gridlist[1])
    guiGridListSetItemText(GUIEditor.gridlist[1],  row, 1, string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", ""), false, true)
    guiGridListSetItemData(GUIEditor.gridlist[1], row, 1, getPlayerName(v))
end

 

Link to comment

what its the problem any error or warning from debugscript also please post all code related with that part of script not just few code

oh i didn't see you want to not apear your name yes its possible

for i,v in ipairs (getElementsByType("player")) do
    if getPlayerName(v) ~= getPlayerName(localPlayer) then
        guiGridListSetItemText(GUIEditor.gridlist[1],  guiGridListAddRow(GUIEditor.gridlist[1]), 1, string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", ""), false, true)
    end
end

 

Link to comment
  • Moderators

Just to benefit , you can do it by this method :

for i,v in ipairs (getElementsByType("player")) do
    if v ~= localPlayer then
        guiGridListSetItemText(GUIEditor.gridlist[1],  guiGridListAddRow(GUIEditor.gridlist[1]), 1, string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", ""), false, true)
    end
end

No need to check by the name. :smile:

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