Posts: 137
Threads: 24
Joined: Dec 2008
Reputation:
0
i have levels, but there is one problem:
i wanted that, when you buy level 1 you cant buy, example, level 3. you have buy level 1, then level 2 and then level 3, but i can buy level 3, not buying level 1 or level 2.
How can I make thatI have buy lvl 1 -> lvl 2 -> lvl 3 . not lvl 1 ->lvl 3 ?
please help, I really need this!
Posts: 1,087
Threads: 103
Joined: Mar 2009
Posts: 1,087
Threads: 103
Joined: Mar 2009
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... -_-
Posts: 137
Threads: 24
Joined: Dec 2008
Reputation:
0
the command was ok - i just wrote wrong numbers!
but now i have some bugs with message what shows when you are trying to use command what is for higher level:
when i write wrong command (what is not in my server) it shows not ''Server - Unknown Command'' , but the message what shows when you're not high enough level? how can i fix this?