GetPlayerAnnounceValue: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
mNo edit summary  | 
				m (Syntax section)  | 
				||
| Line 4: | Line 4: | ||
==Syntax==  | ==Syntax==  | ||
<section show="true" name="Server" class="server">  | |||
<syntaxhighlight lang="lua">string getPlayerAnnounceValue ( element thePlayer, string key )</syntaxhighlight>  | <syntaxhighlight lang="lua">string getPlayerAnnounceValue ( element thePlayer, string key )</syntaxhighlight>  | ||
| Line 12: | Line 13: | ||
===Returns===  | ===Returns===  | ||
This function returns a ''string'' containing the requested value if a valid key was specified or ''false'' otherwise.  | This function returns a ''string'' containing the requested value if a valid key was specified or ''false'' otherwise.  | ||
</section>  | |||
==Example==  | ==Example==  | ||
Revision as of 22:29, 14 November 2011
This function retrieves a players ASE announce value under a certain key.
Syntax
Click to collapse [-]
Serverstring getPlayerAnnounceValue ( element thePlayer, string key )
Required Arguments
- thePlayer: This is the Player whos value you want to retrieve.
 - key: The name of the key.
 
Returns
This function returns a string containing the requested value if a valid key was specified or false otherwise.
Example
Click to collapse [-]
ServerThis example adds a command named "getscore" which outputs a players "score" value to his chatbox.
function getScore ( playerSource, cmdName )
    local scoreValue = getPlayerAnnounceValue ( playerSource, "score" )
    if ( scoreValue ) then
        outputChatBox ( "Your score: "..scoreValue, playerSource )
    end
end
addCommandHandler ( "getscore", getScore )
See Also
- getPlayerTeam
 - getPlayerBlurLevel
 - setPlayerBlurLevel
 - getPlayerSerial
 - forcePlayerMap
 - getPlayerScriptDebugLevel
 - getPlayerFromName
 - getPlayerMoney
 - getPlayerName
 - getPlayerNametagColor
 - getPlayerNametagText
 - getPlayerPing
 - getPlayerWantedLevel
 - givePlayerMoney
 - isPlayerMapForced
 - isPlayerNametagShowing
 - setPlayerHudComponentVisible
 - setPlayerMoney
 - setPlayerNametagColor
 - setPlayerNametagShowing
 - setPlayerNametagText
 - takePlayerMoney
 - countPlayersInTeam
 - getPlayersInTeam
 - isVoiceEnabled
 - setControlState
 - getControlState