Reserved name

Pompeyo

Plugin Developer
Plugin Developer
Jan 6, 2018
87
103
33
39
Cuba
Formerly I used a lot of this plugin in oxide to control that the players are not changing the name, because in my server they are used to that and it is a bit uncomfortable, I would really appreciate if someone could convert this plugin to python
 

Attachments

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
576
307
63
Formerly I used a lot of this plugin in oxide to control that the players are not changing the name, because in my server they are used to that and it is a bit uncomfortable, I would really appreciate if someone could convert this plugin to python
Hello, it is not necessary to convert ... You just have to make a new one ... it's a good idea, I've already seen it too, if you really need it I'll do it for you next week, regards
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
3,992
2,253
113
At your house.
github.com
@salva
http://fougerite.com/resources/aascii-ana-aka-illegalname.92/
it doesnt work ,the players still can change their names ,can you made something for us please??
If people change their IDs this won't work.

Python:
__author__ = 'DreTaX'
__version__ = '1.0'

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

purple = "[color #6600CC]"

class NameSaver:

    def On_PlayerConnected(self, Player):
        if DataStore.Get("NameSaver", Player.UID) is not None:
            Player.Name = DataStore.Get("NameSaver", Player.UID)
            Player.Message(purple + "Your name cannot be different than the one you first joined in with!")
        else:
            DataStore.Add("NameSaver", Player.UID, Player.Name)

    def On_Command(self, Player, command, args):
        if command == "resetname":
            if Player.Admin:
                if len(args) == 0:
                    Player.Message("/resetname playername")
                    return
                playername = str.join("", args)
                pl = Server.FindPlayer(playername)
                if pl is not None:
                    DataStore.Remove("NameSaver", pl.UID)
                    Player.Message("Name has been reset!")
                else:
                    Player.Message("Can't find player!")