if(INI_Exist(playername)) // Si estб registrado... { PlayerIsRegistered(playerid); INI_ParseFile(UserPath(playerid), "LoadUser_pass", .bExtra = true, .extra = playerid); PlayerTextDrawSetString(playerid, PlayerLoginTextDraw[playerid][0], "Login"); ShowLoginTextDraws(playerid); SelectTextDraw(playerid, 0x80808080); //ShowPlayerDialog(playerid,DLOGIN,DIALOG_STYLE_PASSWORD ," ","Ingresa tu contraseсa.","Entrar","Salir"); return 1; } else // Si no... { PlayerIsNotRegistered(playerid); PlayerTextDrawSetString(playerid, PlayerLoginTextDraw[playerid][0], "Registro"); ShowLoginTextDraws(playerid); SelectTextDraw(playerid, 0x80808080); //ShowPlayerDialog(playerid,DREGISTER,DIALOG_STYLE_PASSWORD ," ","Esta cuenta no estб registrada, introduce una contraseсa.","Registrar","Salir"); return 1; } //Stock de showlogin stock ShowLoginTextDraws(playerid)//Mostramos el login al jugador, en este caso login o registro { PlayerTextDrawShow(playerid, PlayerLoginTextDraw[playerid][0]);//Mostramos todas PlayerTextDrawShow(playerid, PlayerLoginTextDraw[playerid][1]); TextDrawShowForPlayer(playerid, GlobalLoginTextDraw[0]); SelectTextDraw(playerid, 0x1170FFFF); }
if(INI_Exist(playername)) // Si estб registrado...
{
PlayerIsRegistered(playerid);
INI_ParseFile(UserPath(playerid), "LoadUser_pass", .bExtra = true, .extra = playerid);
PlayerTextDrawSetString(playerid, PlayerLoginTextDraw[playerid][0], "Login");
ShowLoginTextDraws(playerid);
SelectTextDraw(playerid, 0xFF0000FF);
//ShowPlayerDialog(playerid,DLOGIN,DIALOG_STYLE_PASSWORD ," ","Ingresa tu contraseсa.","Entrar","Salir");
return 1;
}
else // Si no...
{
PlayerIsNotRegistered(playerid);
PlayerTextDrawSetString(playerid, PlayerLoginTextDraw[playerid][0], "Registro");
ShowLoginTextDraws(playerid);
SelectTextDraw(playerid, 0xFF0000FF);
//ShowPlayerDialog(playerid,DREGISTER,DIALOG_STYLE_PASSWORD ," ","Esta cuenta no estб registrada, introduce una contraseсa.","Registrar","Salir");
return 1;
}
//Stock de showlogin
stock ShowLoginTextDraws(playerid)//Mostramos el login al jugador, en este caso login o registro
{
PlayerTextDrawShow(playerid, PlayerLoginTextDraw[playerid][0]);//Mostramos todas
PlayerTextDrawShow(playerid, PlayerLoginTextDraw[playerid][1]);
TextDrawShowForPlayer(playerid, GlobalLoginTextDraw[0]);
SelectTextDraw(playerid, 0xFF0000FF);
}
Hola no me funcionу, otra forma de hacerlo? Se ejecuta en OnPlayerConnect esa funciуn por si necesitaban la info
|