Some one please
#3

Quote:
Originally Posted by Steven82
Naked?
Im so watching this topic.

and i think by naked he means a Unedited login code.

pawn Код:
if(strcmp(cmd, "/login", true) == 0)
  {
    if(logged[playerid] == 1)
    {
      SendClientMessage(playerid, COLOR_RED, "You are already logged in!");
      return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
      SendClientMessage(playerid, COLOR_SS, "USAGE: /login [password]");
    }
    else
    {
      if (dini_Exists(udb_encode(playername)))
      {
        tmp2 = dini_Get(udb_encode(playername), "password");
        if (udb_hash(tmp) != strval(tmp2))
        {
          SendClientMessage(playerid, COLOR_RED, "Wrong/Invalid Password!");
        }
        else
        {
          logged[playerid] = 1;
          adminlevel[playerid] = dini_Int(udb_encode(playername), "adminlevel");
          format(string, sizeof(string), "%s, you are now logged in );
          SendClientMessage(playerid, COLOR, string);
        }
      }
      else
      {
        format(string, sizeof(string), "
You are not registered Type /register [password] to create an account!", playername);
        SendClientMessage(playerid, COLOR_RED, string);
      }
    }
    return 1;
  }
Reply


Messages In This Thread
Some one please - by kujox32 - 05.05.2010, 17:36
Re: Some one please - by Steven82 - 05.05.2010, 17:42
Re: Some one please - by -Rebel Son- - 05.05.2010, 18:22
Re: Some one please - by kujox32 - 05.05.2010, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)