Jump to content

Player name


Sticmy

Recommended Posts

Or you can make your custom using setElementData, getElementData.

for /name 

addCommandHandler("name",
function(player,cmd,...)
local name = table.concat({ ... }, " ")
    if #name > 0 then
        setElementData("player.nick",name)
    end
end
)

-- for get
getelementData(player,"player.nick") or "some error"

Link to comment

Why use elementData?

9 hours ago, TheMOG said:

Or you can make your custom using setElementData, getElementData.

for /name 

addCommandHandler("name",
function(player,cmd,...)
local name = table.concat({ ... }, " ")
    if #name > 0 then
        setElementData("player.nick",name)
    end
end
)

-- for get
getelementData(player,"player.nick") or "some error"

 

 

Using these functions can make the player to enter a server with 3 characteristics do not enter that must have more than 3 characteristics?

10 hours ago, Dimos7 said:

if understand corectly you want a  player name be .3 characters then you need


string.len
setPlayerName

 

 

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