A server problem.
#1

Hello, I get this message every second in the game "You need %d respect points! You only have [%d] !
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.
Reply


Messages In This Thread
A server problem. - by VladimirMark - 14.06.2014, 20:46
Re: A server problem. - by cleanboy - 14.06.2014, 22:40
AW: A server problem. - by Nero_3D - 15.06.2014, 00:16
Re: A server problem. - by VladimirMark - 15.06.2014, 16:31
Re: A server problem. - by Konstantinos - 15.06.2014, 16:43
Re: A server problem. - by VladimirMark - 15.06.2014, 16:50
Re: A server problem. - by Konstantinos - 15.06.2014, 16:53
Re: A server problem. - by VladimirMark - 15.06.2014, 17:49
Re: A server problem. - by Konstantinos - 15.06.2014, 17:54

Forum Jump:


Users browsing this thread: 2 Guest(s)