How can i do a false of this command? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How can i do a false of this command? (
/showthread.php?tid=142187)
How can i do a false of this command? -
0ne - 17.04.2010
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?:\
Re: How can i do a false of this command? -
iLinx - 17.04.2010
Try
pawn Код:
if(!(GetPlayerMoney(playerid) < dragMoneyAmount))
I dont see why you cant just do this though :
pawn Код:
if(GetPlayerMoney(playerid) > dragMoneyAmount)
Re: How can i do a false of this command? -
xCoder - 17.04.2010
pawn Код:
if(!(GetPlayerMoney(playerid) < dragMoneyAmount))
not tested
Re: How can i do a false of this command? -
Jakku - 17.04.2010
No, use this
pawn Код:
if(GetPlayerMoney(playerid) > dragMoneyAmount) {
//Functions here
}
Re: How can i do a false of this command? -
Nero_3D - 17.04.2010
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) {}