RU/getPlayerName: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (moved RU/GetPlayerName to RU/getPlayerName) |
Revision as of 08:37, 14 July 2010
Функция возвращает строку, содержащую имя указанного игрока.
Синтаксис
string getPlayerName ( player thePlayer )
Обязательные параметры
- thePlayer: Игрок, имя которого необходимо получить.
Возвращаемое значение
Возвращает строку, содержащую имя указанного игрока, или false, если параметр (игрок), переданный в функцию - неверный.
Пример
Click to collapse [-]
ServeraddCommandHandler("myname", function(playerSource) outputChatBox("Your name: "..getPlayerName(playerSource), playerSource) end )
Click to collapse [-]
ClientThis example outputs the local player name to the chatbox.
addCommandHandler("myname", function() local localPlayerName = getPlayerName(getLocalPlayer()) --and we output it to the chatbox outputChatBox(localPlayerName) end )
Смотрите также
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- showPlayerHudComponent
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot