How can i do a false of this command?
#1

pawn Код:
if(GetPlayerMoney(playerid) < dragMoneyAmount)
I need to do a false, like:
pawn Код:
if(!GetPlayerMoney(playerid) < dragMoneyAmount)
but doing that ! i get an tag mismatch, doing it like: <! or !< tag mismatch too. what to do?:\
Reply
#2

Try
pawn Код:
if(!(GetPlayerMoney(playerid) < dragMoneyAmount))
I dont see why you cant just do this though :
pawn Код:
if(GetPlayerMoney(playerid) > dragMoneyAmount)

Reply
#3

pawn Код:
if(!(GetPlayerMoney(playerid) < dragMoneyAmount))
not tested
Reply
#4

No, use this

pawn Код:
if(GetPlayerMoney(playerid) > dragMoneyAmount) {
//Functions here
}
Reply
#5

If I must decide between this
Quote:
Originally Posted by Jakku
pawn Код:
if(GetPlayerMoney(playerid) > dragMoneyAmount) {
//Functions here
}
and this
Quote:
Originally Posted by CoverH.ng
pawn Код:
if(!(GetPlayerMoney(playerid) < dragMoneyAmount))
I would take the second because with the first it wouldnt work if the player had exactly the same amount of money

These two would be the correct inversion
pawn Код:
if(!(GetPlayerMoney(playerid) < dragMoneyAmount)) {}
pawn Код:
if(GetPlayerMoney(playerid) >= dragMoneyAmount) {}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)