Уведомление над радаром
Показать игроку короткое сообщение над радаром.
Сервер отправляет событие, клиент рисует текст нативами игры.
import {
addTextComponentSubstringPlayerName,
beginTextCommandThefeedPost,
endTextCommandThefeedPostTicker,
} from '@varion/natives';
varion.onServer('mode:notify', (text: string) => {
beginTextCommandThefeedPost('STRING');
addTextComponentSubstringPlayerName(text);
endTextCommandThefeedPostTicker(false, true);
});varion.onClient('mode:hello', (player) => {
varion.emitClient(player, 'mode:notify', 'Привет!');
});