User: John_Prodan Pass: 12345
User: John_Prodan Pass: 98798797 (random password)
if(dialogid == dlogin)
{
if(!response) return Kick(playerid);
if(response)
{
new hashpass[129];
WP_Hash(hashpass, sizeof(hashpass), inputtext);
if(!strcmp(hashpass, Info[playerid][pPass], false))
{
INI_ParseFile(Path(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
SetPlayerScore(playerid, Info[playerid][pLevel]);
GivePlayerMoney(playerid, Info[playerid][pDinero]);
SetPlayerSkin(playerid, Info[playerid][pSkin]);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
SendClientMessage(playerid, -1, "Has entrado a Napsix Roleplay.");
}
else
{
ShowPlayerDialog(playerid, dlogin, DIALOG_STYLE_PASSWORD, "Login", "Bienvenido a Napsix Roleplay.\nIngresa tu contraseсa.\nContraseсa Incorrecta!", "Aceptar", "Salir");
return 1;
}
}
}
if(dialogid == dregistro)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, dregistro, DIALOG_STYLE_PASSWORD, "Nueva Cuenta", "Bienvenido a Napsix Roleplay.\nPara crear una cuenta, ingresa una contraseсa.", "Aceptar", "Salir");
return 1;
}
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
SetPlayerPos(playerid, 2770.641113, -1871.648925, 22.665542);
InterpolateCameraPos(playerid, 2770.641113, -1871.648925, 22.665542, 2761.425292, -1992.413574, 18.984594, 12000);
InterpolateCameraLookAt(playerid, 2770.638427, -1876.626953, 22.197479, 2764.325683, -1996.359497, 17.975938, 6000);
new hashpass[129];
WP_Hash(hashpass, sizeof(hashpass), inputtext);
new INI:File = INI_Open(Path(playerid));
INI_SetTag(File, "Player Data");
INI_WriteString(File, "Contraseсa", hashpass);
INI_WriteInt(File, "Admin", 0);
INI_WriteInt(File, "Dinero", 0);
INI_WriteInt(File, "Nivel", 0);
INI_WriteInt(File, "Skin", 299);
INI_Close(File);
SendClientMessage(playerid, -1, "Te has registrado en Napsix Roleplay.");
return 1;
}
}
forward LoadUser_data(playerid, name[], value[]);
public LoadUser_data(playerid, name[], value[])
{
INI_String("Contraseсa", Info[playerid][pPass], 129);
INI_Int("Admin", Info[playerid][pAdmin]);
INI_Int("Dinero", Info[playerid][pDinero]);
INI_Int("Nivel", Info[playerid][pLevel]);
INI_Int("Skin", Info[playerid][pSkin]);
INI_Float("Vida", Info[playerid][pVida]);
INI_Float("Chaleco", Info[playerid][pChaleco]);
INI_Float("PosX", Info[playerid][pPosX]);
INI_Float("PosY", Info[playerid][pPosX]);
INI_Float("PosZ", Info[playerid][pPosZ]);
INI_Float("PosR", Info[playerid][pPosR]);
INI_Int("VirtualWorld", Info[playerid][pVW]);
INI_Int("Interior", Info[playerid][pInt]);
return 1;
}
if(dialogid == dlogin)
{
if(!response) return Kick(playerid);
if(response)
{
new hashpass[129];
INI_ParseFile(Path(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
WP_Hash(hashpass, sizeof(hashpass), inputtext);
if(!strcmp(hashpass, Info[playerid][pPass], false))
{
SetPlayerScore(playerid, Info[playerid][pLevel]);
GivePlayerMoney(playerid, Info[playerid][pDinero]);
SetPlayerSkin(playerid, Info[playerid][pSkin]);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
SendClientMessage(playerid, -1, "Has entrado a Napsix Roleplay.");
}
else
{
ShowPlayerDialog(playerid, dlogin, DIALOG_STYLE_PASSWORD, "Login", "Bienvenido a Napsix Roleplay.\nIngresa tu contraseсa.\nContraseсa Incorrecta!", "Aceptar", "Salir");
return 1;
}
}
}
Try this
pawn Код:
|
if(dialogid == dregistro)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, dregistro, DIALOG_STYLE_PASSWORD, "Nueva Cuenta", "Bienvenido a Napsix Roleplay.\nPara crear una cuenta, ingresa una contraseсa.", "Aceptar", "Salir");
return 1;
}
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
SetPlayerPos(playerid, 2770.641113, -1871.648925, 22.665542);
InterpolateCameraPos(playerid, 2770.641113, -1871.648925, 22.665542, 2761.425292, -1992.413574, 18.984594, 12000);
InterpolateCameraLookAt(playerid, 2770.638427, -1876.626953, 22.197479, 2764.325683, -1996.359497, 17.975938, 6000);
new hashpass[129];
WP_Hash(hashpass, sizeof(hashpass), inputtext);
new INI:File = INI_Open(Path(playerid));
INI_SetTag(File, "data");
INI_WriteString(File, "Contraseсa", hashpass);
INI_WriteInt(File, "Admin", 0);
INI_WriteInt(File, "Dinero", 0);
INI_WriteInt(File, "Nivel", 0);
INI_WriteInt(File, "Skin", 299);
INI_Close(File);
SendClientMessage(playerid, -1, "Te has registrado en Napsix Roleplay.");
return 1;
}
}