From Multi Theft Auto: Wiki
|This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did.|
Please use getPlayerName
- theClient: the client element (player or admin) you want to get the name of.
Returns a string containing the requested client's name, or false if the client passed to the function is invalid.
This example adds a tag before a player's nick.
function tagPlayer( thePlayer, tag ) --we check thePlayer is a player, otherwise this function could be used with admins if getElementType(thePlayer) == "player" then --we store the player's current name, local oldName = getClientName( thePlayer ) --append the tag passed to this function before it, local taggedName = tag .. oldName --then set it as his new name setClientName( thePlayer, taggedName ) end end