GetPlayerWeapon
Jump to navigation
Jump to search
This function tells you which weapon type is in a player's weapon slot. See Weapon Info
Syntax
Click to expand [+]
ServerClick to expand [+]
ClientExample
This example will display a player's current weapon type. In this case, it is hard coded to use the player called someguy.
-- Find a player called someguy and find his current weapon id. weaponType = getPlayerWeapon ( findPlayer ( "someguy" ) ) -- If a weapon type was returned then if ( weaponType ) then outputChatBox ( "Someguy's current Weapon-type: " .. weaponType .. "." ) -- Display the weapon type in the chat box 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