A small help.
#10

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);
    }

}
Reply


Messages In This Thread
A small help. - by VladimirMark - 14.06.2014, 17:06
Re: A small help. - by youssefehab500 - 14.06.2014, 17:09
Re: A small help. - by RenovanZ - 14.06.2014, 17:10
Re: A small help. - by VladimirMark - 14.06.2014, 17:11
Re: A small help. - by VladimirMark - 14.06.2014, 17:50
Re: A small help. - by iZN - 14.06.2014, 17:53
Re: A small help. - by VladimirMark - 14.06.2014, 17:56
Re: A small help. - by iZN - 14.06.2014, 18:00
Re: A small help. - by VladimirMark - 14.06.2014, 18:03
AW: A small help. - by Macronix - 14.06.2014, 18:07

Forum Jump:


Users browsing this thread: 3 Guest(s)