19.08.2010, 15:53
pawn Код:
public OnPlayerConnect(playerid)
{
new tu[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(tu,sizeof tu,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,tu);
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
SendClientMessage(playerid, COLOR_RED, " %s quebrou uma das regras de acordo, a aзгo foi tomada.");
Kick(playerid);
return 1;
}
new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_RED, "Departamento de imigraзгo: Seu nome nгo й aceitбvel.");
SendClientMessage(playerid, COLOR_RED, "Dica: Seu nome deve estar no formato Firstname_Lastname.");
Kick(playerid);
return 1;
}