Help with the money :)
#1

I need to check if player has 10,000$ money or less,
so I need to put this in my script

pawn Код:
if(GetPlayerMoney(playerid) < 10000)
But that only checks if you got 10,000 and not less money
so is there any functions to check player money from 1$ to 10,000$
like this:

pawn Код:
if(GetPlayerMoney(playerid) < 1 > 10000)
Thanks for the help !
Reply
#2

Quote:

if(GetPlayerMoney(playerid) >1 || < 10000)

that should help i guess xD
Reply
#3

Quote:
Originally Posted by R@ger
Посмотреть сообщение
that should help i guess xD
Almost.
pawn Код:
if(GetPlayerMoney(playerid) < 10000 && GetPlayerMoney(playerid) > 1)
Reply
#4

Quote:
Originally Posted by R@ger
Посмотреть сообщение
that should help i guess xD
pawn Код:
if(GetPlayerMoney(playerid) > 1 || GetPlayerMoney(playerid) < 10000)
I don't think roger's work, if it does, then i got a lot of inefficient scripting in my gm.
Reply
#5

You meant:
Код:
if(10000 < GetPlayerMoney(playerid) < 1) return // Message or something for not enough money or only between 1 and - 10000;
Reply
#6

oops sorry xD
Reply
#7

Quote:
Originally Posted by Matej_
Посмотреть сообщение
pawn Код:
if(GetPlayerMoney(playerid) < 10000)
That will check if the player has less than $10,000, but that also includes negative numbers, like -20000.

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
if(GetPlayerMoney(playerid) < 10000 && GetPlayerMoney(playerid) > 1)
That will check if the player has less than $10,000, but MORE than $1, so if the player has only $1, it won't work.

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
pawn Код:
if(GetPlayerMoney(playerid) > 1 || GetPlayerMoney(playerid) < 10000)
That will check if the player has ANY number above 1, OR any number below 10,000... which means ANY number...

pawn Код:
if( (GetPlayerMoney(playerid)>=0) && (GetPlayerMoney(playerid)<=10000) )
This will check if the player has any amount between and including $0 and $10,000.
Reply
#8

@RyDeR` - How the?

Checking if a player has more than $10,000 yet less than $1?

Maybe
pawn Код:
if(10000 < GetPlayerMoney(playerid) >= 1)
Reply
#9

So which one of these is the correct
Reply
#10

Quote:
Originally Posted by Matej_
Посмотреть сообщение
So which one of these is the correct
That

Quote:
Originally Posted by SilentHuntR
Посмотреть сообщение
pawn Код:
if( (GetPlayerMoney(playerid)>=0) && (GetPlayerMoney(playerid)<=10000) )
and that

pawn Код:
if(0 <= GetPlayerMoney(playerid) <= 10_000) {}
[XST]O_x you still got a mistake
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)