GetPlayerStat
Jump to navigation
Jump to search
Description
This function returns a float that contains the value of the specified statistic, for a specific player.
Syntax
float getPlayerStat ( player player, stat )
Required Arguments
- player: The player whose stat you want to retrieve.
- stat: A whole number determining the stat ID.
Returns
Returns a float indicating the statistic value.
Example
This example outputs a players stat.
function onPlayerSpawn ( player ) stat = getPlayerStat ( player, 102 ) -- Check that getPlayerStat returned a value if ( stat ) then -- Output the stat in the chat text outputChatBox ( "The player's stat for 102 is: " .. stat ) end
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