Quote:
Originally Posted by lakierka
Hi.. Maybe someone know how to do pseudonym script that I need? I need pseudonym like this Name_Lastname. If in pseudonym are more or less than 2 capital letters, player would be kicked. Please help me, I really need this.
|
EDIT: I have Name_Lastname script, but I need letters script
Sorry for double post.. I pressed wrong button..
Here script:
Код:
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,zaliaigeltona,"* [LVRP]: Your pseudonym wrong.");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Rigth pseudonym:");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Name_Lastname");
Kick(playerid);
return 1;
}
if(strlen(name[where])<4)
{
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Your lastname to short");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Rigth pseudonym:");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Name_Lastname");
Kick(playerid);
return 1;
}
if(where<3)
{
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Your name to short");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Rigth pseudonym:");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Name_Lastname");
Kick(playerid);
return 1;
}
if(invalid != -1)
{
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Into your name are bad simbols.");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Rigth pseudonym:");
SendClientMessage(playerid,zaliaigeltona,"* [LVRP]: Name_Lastname");
Kick(playerid);
return 1;
}
return 0;
}