testMessage.py
I have very little knowledge of python so I've probably screwed something simple up.Code:import Rust class testMessage: def __init__(self): self.Title = "testMessage" self.Description = "Displays a test message" self.Author = "DY357LX" self.Version = V(0, 1, 0) def OnPlayerInit(self, player): rust.BroadcastChat(player.displayname + " welcome to the server!")
My logs show the plugin loads but there's no errors.
Am I missing the message? Do I add a 10 seconds delay in there or something? (import time + time.sleep(10) or something along those lines?)
Is it because I'm testing on a LAN?
Any help would be greatly appreciated. Thanks.
Why doesn't BroadcastChat display my text?
Discussion in 'Rust Development' started by DY357LX, May 30, 2015.
-
You will need to add a delay to your message as your player is still not on the server to see the message. I would suggest looking at plugins like Notifier to get an understanding of how it is done.
-
You should use "OnPlayerConnected" hook... That's where the player actually starts getting that information... Initializing is where the server gathers the users information.
Also... I don't know anything about Python... And I prefer using C#
