I want to create a world/player message function that four parameters: If the message is global (world.sendMessage) or not (player.sendMessage), what type of message it is, the player to send it to if it is not global, and the message itself. The problem is that I don't know how to create a working script like that. So can anyone help me with this?
The function define part should look like this: function sendGameplayMessage(global, type, player, message).