mirror of
https://github.com/araxiaonline/ets-module-collection.git
synced 2026-06-13 02:52:20 -04:00
29 lines
599 B
TypeScript
29 lines
599 B
TypeScript
class Command {
|
|
|
|
onCommand : player_event_on_command = (
|
|
event: number,
|
|
player: Player,
|
|
command: string
|
|
) => {
|
|
|
|
if(command == "doit") {
|
|
const message = "A Command from the script has been entered" + command;
|
|
print(message);
|
|
|
|
|
|
SendWorldMessage(message);
|
|
}
|
|
print("debug: " + command);
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
const commandHander = new Command();
|
|
RegisterPlayerEvent(
|
|
PlayerEvents.PLAYER_EVENT_ON_COMMAND,
|
|
(...args) => commandHander.onCommand(...args)
|
|
)
|