[Help] A limit for armour.
#1

So the thing i try to do, is to make a max. amount of armour which can be given in the situation. (In this case, drugs)
I tried this:
pawn Код:
}
            if(GetPlayerArmour(playerid, armour == 60));
            {
                SendClientMessage(playerid, COLOR_WHITE, "** You cannot use any more drugs.");
                return 1;
            }
So any help? :/
Reply
#2

So this doesn't work?
Reply
#3

Learn the correct usage of GetPlayerArmour.
Reply
#4

pawn Код:
new armour;
GetPlayerArmour(playerid, armour);
if(armour == 60.0)
{
    SendClientMessage(playerid, COLOR_WHITE, "** You cannot use any more drugs.");
    return 1;
}
Reply
#5

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
pawn Код:
new armour;
GetPlayerArmour(playerid, armour);
if(armour == 60.0)
{
    SendClientMessage(playerid, COLOR_WHITE, "** You cannot use any more drugs.");
    return 1;
}
I doubt he wants it only to work only at 60, so wouldn't it be better to do like

pawn Код:
new armour;
GetPlayerArmour(playerid, armour);
if(armour >= 60.0)
{
    SendClientMessage(playerid, COLOR_WHITE, "** You cannot use any more drugs.");
    return 1;
}
?
Reply
#6

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
I doubt he wants it only to work only at 60, so wouldn't it be better to do like

pawn Код:
new armour;
GetPlayerArmour(playerid, armour);
if(armour >= 60.0)
{
    SendClientMessage(playerid, COLOR_WHITE, "** You cannot use any more drugs.");
    return 1;
}
?
That is 60, it's irrelevant.
Reply
#7

Quote:
Originally Posted by Norn
Посмотреть сообщение
That is 60, it's irrelevant.
Tho my code checks if its MORE or EXACTLY 60.
Reply
#8

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
Tho my code checks if its MORE or EXACTLY 60.
Oh sorry it's 7am here, I thought you just added a deciminal point haha my bad.
Reply
#9

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
I doubt he wants it only to work only at 60, so wouldn't it be better to do like

pawn Код:
new armour;
GetPlayerArmour(playerid, armour);
if(armour >= 60.0)
{
    SendClientMessage(playerid, COLOR_WHITE, "** You cannot use any more drugs.");
    return 1;
}
?
Wit hthis, it only lets me use the drugsonce, and mo mor. Even not untill the 60 comes up.
Reply
#10

Your variable called "armour" should be a Float.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)