[Ayuda] Comando
#2

No he probado si compila*

pawn Код:
dcmd_login(playerid, params[])
{
   new File[100], Nombre[MAX_PLAYER_NAME], string[128];
   new Contrasena[100];
   new ContrasenaIngresada[100];
   GetPlayerName(playerid, Nombre, sizeof(Nombre));
   format(File, sizeof(File), PlayerFile, Nombre);

   if(sscanf(params, "s", ContrasenaIngresada)) SendClientMessage(playerid, COLOR_ROJO, "Usa: /login [Contraseсa]");
   else if(!dini_Exists(File)) SendClientMessage(playerid, COLOR_ROJO, "Error: Cuenta sin registrar");
   else if(IsLogged[playerid]) SendClientMessage(playerid, COLOR_ROJO, "Error: Ya has iniciado sesion");

   strcat(Contrasena, dini_Get(File, "hashPW"));
   else if(strcmp(udb_hash(Contrasena), ContrasenaIngresada,false)) SendClientMessage(playerid, COLOR_ROJO, "Error: Contraseсa Incorrecta!");
   else
   {
     IsLogged[playerid] = 1;
     pInfo[playerid][Nivel] = dini_Int(File, "Nivel");
     SetPlayerScore(playerid, pInfo[playerid][Score]);
     GivePlayerMoney(playerid, dini_Int(File, "Dinero")-GetPlayerMoney(playerid));
     format(string, sizeof(string), "|- %s Has iniciado sesion correctamente -|", Nombre);
     SendClientMessage(playerid, COLOR_VERDE, string);
   }
   return 1;
}
Reply


Messages In This Thread
[Ayuda] Comando - by [00]Luis - 29.09.2011, 21:28
Re: [Ayuda] Comando - by Xyrex - 29.09.2011, 21:42
Respuesta: [Ayuda] Comando - by [00]Luis - 30.09.2011, 18:51
Respuesta: [Ayuda] Comando - by leaNN! - 30.09.2011, 20:33
Respuesta: [Ayuda] Comando - by [00]Luis - 30.09.2011, 20:47
Respuesta: [Ayuda] Comando - by leaNN! - 30.09.2011, 23:40

Forum Jump:


Users browsing this thread: 1 Guest(s)