description |
---|
This page describes chat API methods |
chatSend(player, string)
Send message to player.
{% tabs %} {% tab title="Details" %}
Type | Description |
---|---|
player | Player ID |
string | Message |
0 if successful, -1 if invalid
{% endtab %}
{% tab title="Example" %}
oak.cmd('testmsg', async(pid) => {
oak.chatSend(pid, 'Testovací zpráva')
})
{% endtab %} {% endtabs %}
chatBroadcast(string)
Broadcast message to players.
{% tabs %} {% tab title="Details" %}
Type | Description |
---|---|
string | Message |
0 if successful, -1 if invalid
{% endtab %}
{% tab title="Example" %}
// TODO
{% endtab %} {% endtabs %}