Skip to content

Commit

Permalink
Exported GetCommandIndex as commands.get_command_index.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbriere committed Oct 16, 2022
1 parent 50ae599 commit 3422d53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
from _commands import CommandReturn
from _commands import ConCommand
from _commands import ConCommandBase
from _commands import get_command_index


# =============================================================================
Expand All @@ -28,6 +29,7 @@
'CommandReturn',
'ConCommand',
'ConCommandBase',
'get_command_index',
)


Expand Down
6 changes: 6 additions & 0 deletions src/core/modules/commands/commands_wrap.cpp
Expand Up @@ -45,6 +45,7 @@ extern void ClearAllServerCommands();
extern void RegisterSayCommands();
extern void UnregisterSayCommands();

extern int GetCommandIndex();

//-----------------------------------------------------------------------------
// Initializes the Server and Say command modules.
Expand Down Expand Up @@ -92,6 +93,11 @@ DECLARE_SP_MODULE(_commands)
export_command_return(_commands);
export_concommandbase(_commands);
export_concommand(_commands);

def("get_command_index",
&GetCommandIndex,
"Returns the index of the player that issued the current command."
);
}


Expand Down

0 comments on commit 3422d53

Please sign in to comment.