07.09.2014, 08:56
(
Последний раз редактировалось Kyance; 07.09.2014 в 11:09.
)
le solved
if((gPlayerInfo[playerid][gExperience] >= gPlayerInfo[playerid][gNeededExp]) && gPlayerInfo[playerid][gLevel] < 50)
{
//...
}
else if((gPlayerInfo[playerid][gExperience] < gPlayerInfo[playerid][gNeededExp]) && gPlayerInfo[playerid][gLevel] >= 1)
{
//...
}
Not sure it it will solve the problem, but maybe it will.
pawn Код:
|
else if(gPlayerInfo[playerid][gExperience] < gPlayerInfo[playerid][gNeededExp] && gPlayerInfo[playerid][gLevel] >= 1)
else if(gPlayerInfo[playerid][gExperience] < 0 && gPlayerInfo[playerid][gLevel] >= 1)
pawn Код:
pawn Код:
But your code was if his experience is less than needed experience then he will be level downed I hope u understand |
else
{
format(Text, sizeof(Text), "You've received {FC4949}%d experience!", amount), SendClientMessage(playerid, -1, Text);
gPlayerInfo[playerid][gExperience] -= amount;
}
else
{
format(Text, sizeof(Text), "A amount of {FC4949}%d experience was taken from you..", amount), SendClientMessage(playerid, -1, Text);
gPlayerInfo[playerid][gExperience] -= amount;
}
not sure
but i think there is same message when giving or taking exp so u got confused so pawn Код:
pawn Код:
|
if(gPlayerInfo[playerid][gRExperience] >= 50) SendClientMessage(playerid, -1, "Nitestick bought for 50 xp!"), GiveExperience(playerid, -50), gPlayerInfo[playerid][Slot][1] = 1;