12.02.2012, 02:26
pawn Код:
if(dialogid == 1)
{
if(response)
{
if(!strlen(inputtext))
{
new s[128];
format(s,sizeof(s),"{FF0000}No has escrito ninguna contraseсa");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Error",s,"Logear","");
return 1;
}
LogearJugador(playerid,inputtext);
}
else
{
Kick(playerid);
}
}
if(dialogid == 2)
{
if(response)
{
if(!strlen(inputtext))
{
new s[128];
format(s,sizeof(s),"{FF0000}No has escrito ninguna contraseсa");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Error",s,"Registrar","");
return 1;
}
RegistrarJugador(playerid,inputtext);
LogearJugador(playerid,inputtext);
}
else
{
Kick(playerid);
}
}
}
pawn Код:
if(dialogid == 4)
{
if(response)
{
if(CuentaExistente[playerid] == 1)
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"\t{FF0000}Bienvenido, %s.\n\n{E0FFFF}Escribe tu contraseсa para logearte",loginname);
ApplyAnimation(playerid,"Freeweights","gym_free_celebrate",4.1,1,1,1,1,1);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Panel de Logeo",s,"Logear","");
return 1;
}
else
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"\t{FF0000}Bienvenido, %s.\n\n{E0FFFF}Escribe debajo tu contraseсa para registrarte.",loginname);
ApplyAnimation(playerid,"Freeweights","gym_free_celebrate",4.1,1,1,1,1,1);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Panel de Registro",s,"Registrarse","");
}
}
else
{
SendClientMessage(playerid, GRIS,"* Seleccionaste 'No Acepto', por lo cual no puedes jugar de este juego.");
Kick(playerid);
}
}