26.03.2010, 21:05
Hello guys, I need little help with this command...
Here is the code
Everything works fine, except when I try /buylevel it does everything good but it shows "You don't have enough cash or experience." even it works... it always show that message, can anyone help please!?
Here is the code
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
}
if(PlayerInfo[playerid][Level] == 1 && PlayerInfo[playerid][Exppoints] >= LVL_2 && GetPlayerMoney(playerid) >= MLVL_2)
{
//something
}
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;
}