[SOLVED] Need help with /buylevel command
#2

Change the middle part to else if

pawn Код:
dcmd_buylevel(playerid, cmdtext[]) {
  #pragma unused cmdtext
  new str[256];
  if(PlayerInfo[playerid][Level] == 10) return SendClientMessage(playerid, COLOR_RED, "You have reached highest level and can't buy any more");
  if(PlayerInfo[playerid][Level] == 0 && PlayerInfo[playerid][Exppoints] >= LVL_1 && GetPlayerMoney(playerid) >= MLVL_1)
  {
//something
  }
  else if(PlayerInfo[playerid][Level] == 1 && PlayerInfo[playerid][Exppoints] >= LVL_2 && GetPlayerMoney(playerid) >= MLVL_2)
  {
//something
  }
  else if(PlayerInfo[playerid][Level] == 2 && PlayerInfo[playerid][Exppoints] >= LVL_3 && GetPlayerMoney(playerid) >= MLVL_3)
  {
//something

//MORE OF THESE BELOW....
//..............
//..............
  }
  else
  {
  SendClientMessage(playerid, COLOR_RED, "You don't have enough cash or experience.");
  }
  return 1;
}
Reply


Messages In This Thread
[SOLVED] Need help with /buylevel command - by leapfish - 26.03.2010, 21:05
Re: Need help with /buylevel command - by MadeMan - 26.03.2010, 21:13
Re: Need help with /buylevel command - by leapfish - 26.03.2010, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)