[Help] Problem with /buy and dialog
#1

Ok hi to all of you
I have a big problem with credit for mobile...Ok in my 24/7 i have puted a command /buy and then a dialog should start up...And everything is good and then if you want to buy credit you just enter credit it's listed there...But what i want is to set a limit like when you are buying that then you can buy max 350$ not just any number that out tipe in please help me...I hope you will soon and I'm a beginner in scripting.. Thx
Reply
#2

post the script , that way we can edit to help u....
Reply
#3

I've puted this but It only says thhat You can't buy more than 350$ but you can

Код:
 {
             if(strval(inputtext) < 1) return SendClientMessage(playerid,-1,"You can't buy under than 1$ credit"),ShowPlayerDialog(playerid, 3667, DIALOG_STYLE_INPUT, "Krediti", "Type here how much credit you want to buy.", "OK", "Decline");
             if(strval(inputtext) > 350) return SendClientMessage(playerid,-1,"You can't buy more than 350$ credit"),ShowPlayerDialog(playerid, 3667, DIALOG_STYLE_INPUT, "Krediti", "Type here how much credit you want to buy.", "OK", "Decline");
         }
Reply
#4

Can anyone help me !
Reply
#5

Quote:
Originally Posted by xXx:FireBlade
Посмотреть сообщение
I've puted this but It only says thhat You can't buy more than 350$ but you can

Код:
 {
             if(strval(inputtext) < 1) return SendClientMessage(playerid,-1,"You can't buy under than 1$ credit"),ShowPlayerDialog(playerid, 3667, DIALOG_STYLE_INPUT, "Krediti", "Type here how much credit you want to buy.", "OK", "Decline");
             if(strval(inputtext) > 350) return SendClientMessage(playerid,-1,"You can't buy more than 350$ credit"),ShowPlayerDialog(playerid, 3667, DIALOG_STYLE_INPUT, "Krediti", "Type here how much credit you want to buy.", "OK", "Decline");
         }
If you enter a value of more than 350 it will say that, so what is the problem?
Reply
#6

The problem is that you can buy over 350 and i want to set it to max of 350!
Reply
#7

Give us your /buy command please.
Reply
#8

Quote:
Originally Posted by xXx:FireBlade
Посмотреть сообщение
I've puted this but It only says thhat You can't buy more than 350$ but you can

Код:
 {
             if(strval(inputtext) < 1) return SendClientMessage(playerid,-1,"You can't buy under than 1$ credit"),ShowPlayerDialog(playerid, 3667, DIALOG_STYLE_INPUT, "Krediti", "Type here how much credit you want to buy.", "OK", "Decline");
             if(strval(inputtext) > 350) return SendClientMessage(playerid,-1,"You can't buy more than 350$ credit"),ShowPlayerDialog(playerid, 3667, DIALOG_STYLE_INPUT, "Krediti", "Type here how much credit you want to buy.", "OK", "Decline");
         }
Also suggestion: Instead of using two checks you could use one. Example:
pawn Код:
if(strval(inputtext) > 350) || (strval(inputtext) < 1) ....
Reply
#9

I've made it thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)