Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 913 Bytes

chat.md

File metadata and controls

66 lines (45 loc) · 913 Bytes
description
This page describes chat API methods

Chat

Send message

chatSend(player, string)

Send message to player.

{% tabs %} {% tab title="Details" %}

Remarks

Arguments

Type Description
player Player ID
string Message

Returns

0 if successful, -1 if invalid

{% endtab %}

{% tab title="Example" %}

oak.cmd('testmsg', async(pid) => {
    oak.chatSend(pid, 'Testovací zpráva')
})

{% endtab %} {% endtabs %}

Broadcast message

chatBroadcast(string)

Broadcast message to players.

{% tabs %} {% tab title="Details" %}

Remarks

Arguments

Type Description
string Message

Returns

0 if successful, -1 if invalid

{% endtab %}

{% tab title="Example" %}

// TODO

{% endtab %} {% endtabs %}