I need help fixing this.
#10

Try this (Not tested)
Код:
public OnPlayerConnect(playerid)
{
		if(fexist(UserPath(playerid)))
		{
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE" Type your password below to login.","Login","Quit");
		}
		else
		{
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""C OL_WHITE"Type your password below to register a new account.","Register","Quit");
		}
		SendClientMessage(playerid, 0x33CCFFAA, "[INFO]: "COL_RULE"You have been connected to the server.");
		new name[MAX_PLAYER_NAME+1], str[24+MAX_PLAYER_NAME+1];
		GetPlayerName(playerid, name, sizeof(name));
		// Has numbers
		if(strfind(name, "0", true) != -1 || strfind(name, "1", true) != -1 || strfind(name, "2", true) != -1 || strfind(name, "3", true) != -1 || strfind(name, "4", true) != -1 || strfind(name, "5", true) != -1
		|| strfind(name, "6", true) != -1 || strfind(name, "7", true) != -1 || strfind(name, "8", true) != -1 || strfind(name, "9", true) != -1 || strfind(name, "[", true) != -1 || strfind(name, "]", true) != -1)
		{
		SendClientMessage(playerid, 0x33CCFFAA, "SERVER: {FFFFFF}This is a RP Server, please reconnect using Firstname_Lastname format.");
		SendClientMessage(playerid, 0x33CCFFAA, "SERVER: {FFFFFF}Also, please remove the numbers and/or tags in your name.");
		GetPlayerName(playerid, name, sizeof(name));
		format(str, sizeof(str), "%s has been kicked from the server for having a Non-RP name.", name);
		SendClientMessageToAll(0xC4C4C4FF, str);
		Kick(playerid);
		}
		// No Underscore
		if(strfind( name, "_", true) == -1)
		{
		SendClientMessage(playerid, 0x33CCFFAA, "SERVER: {FFFFFF}This is a RP Server, please reconnect using Firstname_Lastname format.");
		SetTimerEx("DelayedKick", 1000, false, "d", playerid);
		}
		return 1;
}
You can't use two OnPlayerConnect's.
Reply


Messages In This Thread
I need help fixing this. - by CanadianMoose - 14.08.2014, 23:33
Respuesta: I need help fixing this. - by Cepillado - 15.08.2014, 00:09
Re: I need help fixing this. - by CanadianMoose - 15.08.2014, 00:15
Re: I need help fixing this. - by Steel_ - 15.08.2014, 00:21
Respuesta: I need help fixing this. - by Cepillado - 15.08.2014, 00:25
Re: I need help fixing this. - by CanadianMoose - 15.08.2014, 00:27
Re: I need help fixing this. - by Steel_ - 15.08.2014, 00:28
Re: I need help fixing this. - by CanadianMoose - 15.08.2014, 00:29
Respuesta: I need help fixing this. - by Cepillado - 15.08.2014, 00:30
Re: I need help fixing this. - by Steel_ - 15.08.2014, 00:32

Forum Jump:


Users browsing this thread: 2 Guest(s)