GetWeaponType: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|Gets the type of a specific weapon model.}} {{FuncSyntax|GetWeaponType([, WeaponModelId])}} {{FuncParameters}} {{FuncParamOpt..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|Gets the type of a specific weapon model.}}
{{FuncDescription|Gets the type of a specific weapon model. You can get the weapon model from [[GetPlayerWeapon]].}}


{{FuncSyntax|GetWeaponType([, WeaponModelId])}}
{{FuncSyntax|GetWeaponType(WeaponModelId)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParamOptional|WeaponModelId|The weapon model identifier.}}
{{FuncParam|WeaponModelId|The weapon model identifier.}}


{{FuncReturnValue|Returns two integers. The first one being the main weapon type and the second one the weapon sub type.}}
{{FuncReturnValue|Returns two integers. The first one being the main weapon type and the second one the weapon sub type.}}

Latest revision as of 16:07, 20 October 2019

GetWeaponType

Type: Function
Context: Client
Introduced: v1.0

Description

Gets the type of a specific weapon model. You can get the weapon model from GetPlayerWeapon.

Syntax

GetWeaponType(WeaponModelId)

Parameters

  • WeaponModelId
    The weapon model identifier.

Return Value

  • Returns two integers. The first one being the main weapon type and the second one the weapon sub type.
Types
WeaponType 0 = Fist, 1 = Secondary (1 Handed), 2 = Primary (2 Handed)
WeaponSubType 0 = Fist, 1 = Pistol, 2 = SMG, 3 = Shotgun, 4 = Rifle

Example

__EDIT_ME__

See also

__EDIT_ME__