How can I stop that. Here is the code.
pawn Код:
buylevel()
{
foreach(Player, i)
{
new nxtlevel = GetPVarInt(i, "Level")+1;
//new costlevel = nxtlevel*levelcost;
new expamount = nxtlevel*levelexp;
new infostring[96];
new exp = GetPVarInt(i, "RespectPoints");
if (exp < expamount)
{
format(infostring, sizeof(infostring), " You need %d respect points! You only have [%d] !",expamount,GetPVarInt(i,"RespectPoints"));
SendClientMessage(i, COLOR_LIGHTRED, infostring);
continue;
}
format(infostring, sizeof(infostring), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
GameTextForPlayer(i, infostring, 5000, 1);
PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(i);
//GiveMoneyEx(playerid, -costlevel);
SetPVarInt(i, "Level", nxtlevel);
SetPlayerScore(i, nxtlevel);
exp -= expamount;
SetPVarInt(i, "RespectPoints", exp);
}
}
Thank you very much.