Player level commands
#4

Quote:
Originally Posted by efeX
To the guy above me: Stop pasting the same shit in every topic...

Hey cigo, this would just require some if statements!

(assuming you still using the code i gave you earlier)

pawn Код:
if (strcmp(cmd, "/buylevel", true) == 0)
  {
    gPlayerMoney[playerid] = GetPlayerMoney(playerid);
    if (GetPlayerMoney(playerid) >= 250000 && gPlayerLevel[playerid] == 1)
    {
      gPlayerLevel[playerid] += 1; // level 2
      SetPlayerMoney(playerid, gPlayerMoney[playerid] - 250000);
    }
    if (GetPlayerMoney(playerid) >= 500000 && gPlayerLevel[playerid] == 2)
    {
      gPlayerLevel[playerid] += 1; // level 3
      SetPlayerMoney(playerid, gPlayerMoney[playerid] - 500000);
    }
    return 1;
  }
&& means "and" so basically it's checking if you have the money AND you are level1,2, etc.

So on, so forth
evrey topic?
wow i dont see it at any topic -_-
only at 2 it not evrey
anyways that what he meant i didnt understand him sorry... -_-
Reply


Messages In This Thread
Player level commands - by cigo - 05.06.2009, 22:00
Re: Player level commands - by propilot - 05.06.2009, 22:03
Re: Player level commands - by efeX - 05.06.2009, 22:08
Re: Player level commands - by propilot - 05.06.2009, 22:11
Re: Player level commands - by cigo - 05.06.2009, 22:26
Re: Player level commands - by efeX - 05.06.2009, 23:17
Re: Player level commands - by cigo - 06.06.2009, 13:53

Forum Jump:


Users browsing this thread: 1 Guest(s)