Sign in to follow this  
1LoL1

getPlayerName Nick

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

 

Share this post


Link to post
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

 

Share this post


Link to post

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

 

Share this post


Link to post

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:

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.