How to do more except this?
#3

if you wanna do more then just use brackets ( { } )

pawn Код:
dcmd_login(playerid, params[])
{
  new Name[MAX_PLAYER_NAME+1];
  GetPlayerName(playerid, Name, sizeof(Name));
 
  if(_LOGIN_LoggedIn[playerid] == 0)
  {
   if(!strlen(params) || strcmp(params, dini_Get("Players.ini", Name), true) != 0)
   {
   // here your stuff you wanna do if the password is wrong
   return SendClientMessage(playerid, COLOR_RED, "Invalid Password! Please Retry.");
   }
   
   SendClientMessage(playerid, COLOR_DARKGREEN, "Logged In.");
   
   if(!strcmp(Name, "Eros"))
   {
     _LOGIN_Rank[playerid] = 2;
   } else if (!strcmp(Name, "Decysen")) {
     _LOGIN_Rank[playerid] = 3;
   } else {
      _LOGIN_Rank[playerid] = 1;
   }
   
    printf("%s (%d) Has Logged In. (Rank Set To: %d)", Name, playerid, _LOGIN_Rank[playerid]);
   
    _LOGIN_LoggedIn[playerid] = 1;
  } else {
    SendClientMessage(playerid, COLOR_RED, "Already Logged In!");
  }
  return 1;
}
Reply


Messages In This Thread
How to do more except this? - by Robbin237 - 29.03.2009, 11:11
Re: How to do more except this? - by worxds - 29.03.2009, 11:21
Re: How to do more except this? - by hamptonin - 29.03.2009, 11:29

Forum Jump:


Users browsing this thread: 1 Guest(s)