Need Help Plz
#7

Add this at the end of your code: http://pawn.pastebin.com/f263f249e

And:

pawn Код:
dcmd_login(playerid, params[])
{
  if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)
  {
    if(gPlayerInfo[playerid][PLAYER_LOGGED] == 0)
    {
      new
        Password[81];

      if(sscanf(params, "s", Password)) return SendClientMessage(playerid, COLOR, "USAGE: /login [password]");
      else if(strmp(Password, gPlayerInfo[playerid][PLAYER_PASS], false) != 0) return SendClientMessage(playerid, COLOR, "ERROR: Incorrent password!");
      else
      {
        gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
        SendClientMessage(playerid, COLOUR, "You have successfully logged into your account!");
        OnPlayerLogin(playerid);        
      }    
    }
    else SendClientMessage(playerid, COLOR, "ERROR: You are already logged in!");
  }
  else SendClientMessage(playerid, COLOR, "ERROR: You must register first to do that! Use /register [password] to register and login.");
  return 1;
}
Remember to load/save the password into the variable gPlayerInfo[playerid][PLAYER_PASS] when registering and connecting to the server.
Reply


Messages In This Thread
Need Help Plz - by sggassasin - 03.02.2010, 11:14
Re: Need Help Plz - by smeti - 03.02.2010, 12:24
Re: Need Help Plz - by sggassasin - 04.02.2010, 01:13
Re: Need Help Plz - by Eazy_Efolife - 04.02.2010, 01:15
Re: Need Help Plz - by sggassasin - 04.02.2010, 01:22
Re: Need Help Plz - by sggassasin - 05.02.2010, 02:04
Re: Need Help Plz - by Miguel - 05.02.2010, 05:37

Forum Jump:


Users browsing this thread: 2 Guest(s)