How to create good message plugins "PY"

G0D_Father48

New Member
Trusted Member
Member
May 30, 2020
16
6
3
21
iran
shadowgames.ir
HI Every one , in this tutorials i am going to show you how to create plugins that can send messages to player when connecting or disconnecting .... from the server !

First we are going to write versions and our name in top of the plugin

Python:
__author__ = 'your name'
__version__ = '1.0'

then we are going to import fougerite , system and clr

Python:
import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite
import System


so now its time to wite our special cod for this plugin :

Python:
    def On_PlayerConnected(self, Player):
        name = Player.Name
        Welcome_message = "your message"
        Player.Notice(name, Welcome_message )

    def On_PlayerDisconnected(self, Player):
     disconnect_message = "Your Message"
     Player.Notice(name, disconnect_message )

   def On_PlayerHurt(self, Player):
      Hurt_Message =  "Your Message"
      Player.Notice(name ,Welcome_message )

# enD
you can use custom messages for your server !


and in the END


























ENJOY !
 
Last edited by a moderator: