29.07.2018, 20:32
Can someone help me with this problem?
I've created a custom shop, everything works except armor buy.
Basically, i want to check if the player armor is full, if is positive, don't let him buy more armor.
The problem is, even if my armour is at maximum, i still can buy more armor but im getting that gametext message. Any help?
I've created a custom shop, everything works except armor buy.
pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour);
if(armour >= MAX_ARMOUR)
{
PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~You cannot buy any more armor.", 5000, 3);
}
else OnPlayerBuyInAmmuNation(playerid, 0, 100, COST_ARMOR);
The problem is, even if my armour is at maximum, i still can buy more armor but im getting that gametext message. Any help?