Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Use a command

Emre Kara edited this page Jun 25, 2021 · 1 revision

How do I even use a command?

Here you have two possibilities.

ChatAPI Resource

This package uses the same event as the command system in the ChatAPI ("chat:message").
That means you should be able to use commands like you'd do in the C# chat resource.

Direct call

You can use AltV.Net.Alt.Core.ExecuteCustomCommand:

using AltV.Net;

// The command prefix is optional here
Alt.Core.ExecuteCustomCommand(player, "/kick Player1 30 This is my reason");
Alt.Core.ExecuteCustomCommand(player, "kick Player1 30 This is my reason");

Clone this wiki locally