crewpvp / skcrew

Skript addon contains favorite addons and something more
https://skcrew.crewpvp.xyz/en
GNU General Public License v3.0
15 stars 1 forks source link

[Feature] Network broadcast server #9

Closed Lennord closed 7 months ago

Lennord commented 7 months ago

Good evening,

Is it possible to add a broadcast or message sending system to a specific server, could this be a good feature in the future?

Lotzyprod commented 7 months ago

just use send signal effect:

send signal %signals% to %servers%

with signal create expression:

signal [(with key|keyed)|(with name|named)] %string% (and|with) [data] %objects%

Handle this with signal event:

on signal:
on signal (with key|keyed) %string%:

ex:

function network_broadcast(messages: texts):
  send signal (signal named "broadcast" with data {_messages::*}) to all online servers

on signal with key "broadcast":
    send (data of event-signal) to all players, console
Lennord commented 7 months ago

just use send signal effect:

send signal %signals% to %servers%

with signal create expression:

signal [(with key|keyed)|(with name|named)] %string% (and|with) [data] %objects%

Handle this with signal event:

on signal:
on signal (with key|keyed) %string%:

ex:

function network_broadcast(messages: texts):
  send signal (signal named "broadcast" with data {_messages::*}) to all online servers

on signal with key "broadcast":
    send (data of event-signal) to all players, console

ok thank you, I close the problem which is solved.