Less than or equal to
#1

For some reason the bank is not letting me deposit any cash. Its saying the client message when i do /deposit 100 and not /deposit -100

pawn Код:
if(amount <= 0) return SendClientMessage(playerid,COLOR_RED,"You have to add atleast $1 into the bank!");
Reply
#2

Above code is perfect.

Show us the full code.
Reply
#3

I guess ammount equals GetPlayerMoney(playerid),right?If no,thewn try this:
pawn Код:
if(GetPlayerMoney(playerid)<=0)
Reply
#4

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
I guess ammount equals GetPlayerMoney(playerid),right?If no,thewn try this:
pawn Код:
if(GetPlayerMoney(playerid)<=0)
O_o no, amount equals to the amount he wants to deposit
Reply
#5

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
I guess ammount equals GetPlayerMoney(playerid),right?If no,thewn try this:
pawn Код:
if(GetPlayerMoney(playerid)<=0)
Probably not

he said he is using /deposit 100

Amount must be 100.

We need /deposit CMD to fix it.
Reply
#6

I fixed it. It was placed in the wrong spot lol +rep anyway :P
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)