Jump to content
  • 0

Problemema respect point


mafia_wars

Question

6 answers to this question

Recommended Posts

Nu mai postati degeaba in topicuri daca nu ajutati.

Cauta la /buylevel ce functii folosesti pentru respect points.

In modurile GF de obicei e cam asa ceva

[pawn]new expamount = nxtlevel*levelexp;[/pawn]

Daca levelexp e setat pe 2 si tu ai level 3..ca sa treci la lvl 4 trebuie sa ai nxtlevel*levelexp adica nextlevel find 4

Inmultit cu 2 care este levelexp,deci trebuie sa ai 8 respect points.

De aici calculeaza tu si schimba cum vrei.

gXvsYS
Link to comment
Share on other sites


Cauta la /buylevel ce functii folosesti pentru respect points.
In modurile GF de obicei e cam asa ceva

new expamount = nxtlevel*levelexp;

Daca levelexp e setat pe 2 si tu ai level 3..ca sa treci la lvl 4 trebuie sa ai nxtlevel*levelexp adica nextlevel find 4
Inmultit cu 2 care este levelexp,deci trebuie sa ai 8 respect points.
De aici calculeaza tu si schimba cum vrei.

Nu prea am inteles am gasit

[pawn]new expamount = nxtlevel*levelexp;[/pawn]

Dar dupa nu am inteles ce vroiai sa zici

Uite aici comanda /buylevel daca  ai putea sa fii mai explicit sau sa incerci sa o faci tu

[pawn]//-------------------------------[buyLevel]--------------------------------------------------------------------------

if (strcmp(cmd, "/buylevel", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

if (gPlayerLogged[playerid] != 0)

{

PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);

if(PlayerInfo[playerid][pLevel] >= 0)

{

new nxtlevel = PlayerInfo[playerid][pLevel]+1;

new costlevel = nxtlevel*levelcost;

new expamount = nxtlevel*levelexp;

new infostring[256];

if(GetPlayerMoney(playerid) < costlevel)

{

format(infostring, 256, "  Nu ai bani destui ($%d) !",costlevel);

SendClientMessage(playerid, COLOR_GRAD1, infostring);

return 1;

}

else if (PlayerInfo[playerid][pExp] < expamount)

{

format(infostring, 256, "  Ai nevoie de %d respect points, Tu ai [%d] !",expamount,PlayerInfo[playerid][pExp]);

SendClientMessage(playerid, COLOR_GRAD1, infostring);

return 1;

}

else

{

format(string, sizeof(string), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

PlayerPlayMusic(playerid);

GivePlayerMoney(playerid, (-costlevel));

PlayerInfo[playerid][pLevel]++;

if(PlayerInfo[playerid][pDonateRank] > 0)

{

    PlayerInfo[playerid][pExp] -= expamount;

    new total = PlayerInfo[playerid][pExp];

    if(total > 0)

    {

        PlayerInfo[playerid][pExp] = total;

    }

    else

    {

        PlayerInfo[playerid][pExp] = 0;

    }

}

else

{

PlayerInfo[playerid][pExp] = 0;

}

PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;

GameTextForPlayer(playerid, string, 5000, 1);

format(infostring, 256, "* Ai cumparat Level %d cu ($%d) scrie /upgrade", nxtlevel, costlevel);

SendClientMessage(playerid, COLOR_LIGHTBLUE, infostring);

format(infostring, 256, "* Ai primit %d puncte upgrade",PlayerInfo[playerid][gPupgrade]);

SendClientMessage(playerid, COLOR_LIGHTBLUE, infostring);

}

}

return 1;

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  Nu esti logat !");

}

}

return 1;

}[/pawn]

Multumesc

Link to comment
Share on other sites

Trebuie sa ai si putina minte sa iti dai seama si sa stii si matematica de clasa intai cel putin.

new expamount = nxtlevel*levelexp;

nextlevel fiind levelul urmator

levelexp este definit cu un numar.

Cauta in gm levelexp si schimbi acel numar cu "1" sau cu cat vrei.

gXvsYS
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.