Rust Local chat

Discussion in 'Plugin Requests' started by Togoshige, Jul 6, 2017.

  1. There is a Rust Server setting, server.globalchat, but it restrict chat to only voice range
    I dont think voice range is very far is it? Id assume its pretty small.

    "server.globalchat If set to false, only people within voice range can read each others messages. (True)"
    Reference ---> Rust Dedicated Server - Valve Developer Community

    ===

    Id love a plugin where you could set the radius of how far local chat messages go,

    This would require that whenever a player sends a chat message, that it gets filtered only to players within radius, so brute force, loop through all online players, and find distance between player sending message and potential player recieving message, can use the 2d distance formula

    Distance = SquareRoot[((x2 - x1)^2 - (y2 - y1)^2)]

    ===

    Additionally, have it work with BetterChat ---- Better Chat | Oxide, use BlockedReceivers List<string> field in MessageData from OnBetterChat hook

    Use BetterChatIgnore ----> BetterChat Ignore for Rust | Oxide as reference

    ===

    If no one is interested Ill build it ;)
    Also BetterChatIgnore will need to be updated to add to BlockedReceivers field instead of overwriting it.

    ===

    If anyone has any ideas for optimizations please let me know!
    I think theres a way to find all entities of a type in a sphere around an entity, cant remember, not sure if that would be faster than looping through all online players