CUserCmd/CommandNumber

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=CommandNumber
+
|Description=Returns an increasing number representing the index of the user cmd.
|Parent=CUserCmd
+
 
|Description=Returns an increasing number representing the index of the user cmd. The value returned is occasionally 0 inside {{HookFunction|GM|CreateMove}}, so it's advised to check for a non-zero value if you wish to get the correct number.
+
{{Warning|The value returned is occasionally 0 inside {{HookFunction|GM|CreateMove}} and {{HookFunction|GM|StartCommand}}. It is advised to check for a non-zero value if you wish to get the correct number.}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes

Latest revision as of 18:27, 25 September 2019

 CUserCmd:CommandNumber( )

Description

Returns an increasing number representing the index of the user cmd.

WARNING

The value returned is occasionally 0 inside GM:CreateMove and GM:StartCommand. It is advised to check for a non-zero value if you wish to get the correct number.

Returns

number

The command number
Personal tools
Navigation