844 B
844 B
This mod gives server- and client-mods the possibility to communicate.
It should be installed on server and client.
Added functions are:
For client:
csm_com.register_on_receive(func(msg)[, prefix])
prefix
should be a string. Try not to use many different prefixes, one per mod should be enough. If function returnstrue
, remaining functions are not called.csm_com.send(msg)
csm_com.server_has()
returnstrue
if server has this mod installedcsm_com.register_on_know(func())
Called whencsm_com.server_has()
becomestrue
.
For server:
csm_com.register_on_receive(func(player_name, msg)[, prefix])
same as above.csm_com.send(player_name, msg)
csm_com.player_has(player_name)
returnstrue
if player has this mod installedcsm_com.register_on_know(func(player_name))
same as above.