example :
in sourcemod i do
Code: Select all
RegConsoleCmd("sm_test", TEST);
public Action TEST(int client, int args)
{
PrintToChat(client, "HELLO WORLD!);
}
how can i do this in source.python
sorry for my bad english.
Code: Select all
RegConsoleCmd("sm_test", TEST);
public Action TEST(int client, int args)
{
PrintToChat(client, "HELLO WORLD!);
}
Syntax: Select all
from commands.client import ClientCommand
from commands.say import SayCommand
## Registering a console command
@ClientCommand(<command/list of commands>)
def _registered_client_command_function(command, pindex):
## command is a CCommand Instance
## pindex is the index of the player calling
## player is a Players instance
player = Player(pindex)
args = command.arg_string
@SayCommand(.....)
def _registered_say_command_function(command, pindex, teamonly):
## teamonly is a boolean.
## True if was in team only chat. Otherwise False
Return to “Plugin Development Support”
Users browsing this forum: No registered users and 119 guests