restrictions name rp
#8

Hmm it's pretty simple , Only those who kick will receive the message!

To received the message to everyone , try this.
Код:
#include <a_samp>

#define COLOR_RED 0xAA3333AA

new RestrictionNames[][] =
{
	"MicroKyrr", "God", "Deagle", "Lord",
	"Admin", "Gates", "LoL", "NONRPNAME", "SA:MP",
        */You can also add more/*
};


public OnPlayerConnect(playerid)
{
	NameCheck(playerid);
        return 1;
}

NameCheck(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));

	for(new i = 0; i < sizeof(RestrictionNames); i++)
	{
		if(!strcmp(RestrictionNames[i], name, true))
		{
			SetPlayerName(playerid, "NONRPNAME");
			SendClientMessageEx(playerid, COLOR_RED, "You have been kicked & logged for using a Restriction Name! Come Back with a Non-restriction name!");
                        format(name, sizeof(name), "%s has been kicked for using Restriction names!", name);
                        SendClientMessageToAll(0xFF0000FF, name);
			Kick(playerid);
		}
	}
}

public OnPlayerDisconnect(playerid, reason)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	if(!strcmp(name, "InvalidNick", true)) 
        return 1;
}
Reply


Messages In This Thread
restrictions name rp - by Rabot - 15.02.2016, 08:24
Re: restrictions name rp - by SaltySandy - 15.02.2016, 09:30
Re: restrictions name rp - by MicroKyrr - 15.02.2016, 10:52
Re: restrictions name rp - by MicroKyrr - 15.02.2016, 10:58
Re: restrictions name rp - by Rabot - 15.02.2016, 17:17
Re: restrictions name rp - by MicroKyrr - 15.02.2016, 22:35
Re: restrictions name rp - by Rabot - 16.02.2016, 01:05
Re: restrictions name rp - by MicroKyrr - 16.02.2016, 03:17
Re: restrictions name rp - by Rabot - 16.02.2016, 05:14
Re: restrictions name rp - by -CaRRoT - 16.02.2016, 05:17

Forum Jump:


Users browsing this thread: 1 Guest(s)