08.05.2012, 23:25
pawn Код:
public OnPlayerConnect(playerid)
{
if(GetPlayerPing(playerid) >= 65535) return Kick(playerid);
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s entrou no servidor.", name);
SendClientMessageToAll(-1, string);
SendClientMessage(playerid,0xFFA500FF,"Seja bem vindo ao servidor.");
format(string, sizeof(string), "Contas/%s.ini", name);
if (fexist(string))
{
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_INPUT,BRANCO "Meu server - Login",BRANCO "{F8F8FF}Digite sua {FF0000}senha {F8F8FF}para entrar.","Entrar","Sair");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT,BRANCO "Meu server - Registro",BRANCO "{F8F8FF}Digite sua {FF0000}senha {F8F8FF} para\nregistrar sua conta.","Registrar","Sair");
}
return 1;
}