21.07.2012, 12:39
HI. Where is problem:
How to make player can come only with that name:
Because he can come with that nick:
Код:
stock InvalidNickKick(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new where = strfind(name,"_",true);
new lenght = strlen(name)-1;
new invalid = strfind(name,"[",true);
if(invalid == -1) invalid = strfind(name,"]",true);
if(where == 0 || where == lenght || where==-1)
{
SendClientMessage(playerid,COLOR_ORANGE,"* SERVER: Name_Lastname");
Kick(playerid);
return 1;
}
if(strlen(name[where])<4)
{
SendClientMessage(playerid,COLOR_ORANGE,"* SERVER: your lastname is too short");
Kick(playerid);
return 1;
}
if(where<3)
{
SendClientMessage(playerid,COLOR_ORANGE,"* SERVER: your firstname is too short");
Kick(playerid);
return 1;
}
if(invalid != -1)
{
SendClientMessage(playerid,COLOR_ORANGE,"* SERVER: invalids letters in your name");
Kick(playerid);
return 1;
}
return 0;
}
Код:
Aasdas_Asdasd
Код:
AASDAS_ASDASD

