12.10.2010, 07:53
when you have 10/10 EP (experince point)
you can buy a level ( /buylevel ).
But if you have 11/10 I mean higher than 10/10
you cant it just send the message.
I want so you can, can anybody help me with that?
you can buy a level ( /buylevel ).
But if you have 11/10 I mean higher than 10/10
you cant it just send the message.
Код:
You don't have enough Experience Points to buy the next level. (%d/%d)
pawn Код:
command(buylevel, playerid, params[])
{
#pragma unused params
new string[128];
if(Player[playerid][Level] == 25) return SendClientMessage(playerid, WHITE, "You cannot buy a level higher than 25!");
if(Player[playerid][EXP] == ((Player[playerid][Level]+1) * 10))
{
Player[playerid][EXP] = 0;
Player[playerid][Level]++;
format(string, sizeof(string), "You have just bought level %d!", Player[playerid][Level]);
SendClientMessage(playerid, WHITE, string);
}
else
{
format(string, sizeof(string), "You don't have enough Experience Points to buy the next level. (%d/%d)", Player[playerid][EXP], ((Player[playerid][Level]+1) * 10));
SendClientMessage(playerid, WHITE, string);
}
return 1;
}