10.01.2010, 20:09
Quote:
Originally Posted by pooooolo
No entiendo una cosa, tio podrias acerlo 1 poco mas completo?
esque v eras ponen /sesion [pass] la ponen Invalida y No dice nada, Almenos podrias Poner "Contraseсa Invalida" Si me Puedes ayudar te estare agradecido |
pawn Код:
if(strcmp(cmd, "/Sesion", true) == 0)
{
new tmp[256];
new tmp2[256];
new Nombre[MAX_PLAYERS];
new file[MAX_PLAYERS];
GetPlayerName(playerid, Nombre, sizeof(Nombre));
format(file, sizeof(file), "%s.ini", Nombre);
tmp = strtok(cmdtext, idx);
tmp2 = dini_Get(file, "Password");
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFFF, "Use: /Sesion [Contraseсa]");
return 1;
}
if(IsLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_VERDE, "Tъ ya estбs identificado!");
return 1;
}
else
{
if(fexist(file))
{
if(udb_hash(tmp) == strval(tmp2))
{
IsLogged[playerid] = 1;
PlayerInfo[playerid][pAdmin] = dini_Int(file, "Admin");
PlayerInfo[playerid][pKills] = dini_Int(file, "Kills");
PlayerInfo[playerid][pDeaths] = dini_Int(file, "Deaths");
PlayerInfo[playerid][pLogins] = dini_Int(file, "Logins");
PlayerInfo[playerid][pLogins] ++;
SendClientMessage(playerid, COLOR_VERDE, "Te has identificado exitosamente.");
}
else
{
SendClientMessage(playerid, COLOR_VERDE, "Contraseсa invalida");
}
}
}
return 1;
}