How to do this
#1

currently im making a system which gives player permission to rob a bank or something
the problem is when players fails 1 time his dialog dissapears but i want the same dialog to come up with different numbers but the dialog wont show up

Код:
if(strcmp(inputtext, randomzznr, true) == 1)return ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Business rob",strings,"Continue","");// Checks if the inputtext returns the word; hi
    {
 randomstr(randomzznr);

 format(strings,sizeof(strings),"---Step 3---\nWrite The following in order to continue\n\n%s",randomzznr);
    ShowPlayerDialog(playerid,1003,DIALOG_STYLE_INPUT,"Drug Production",strings,"Continue","");
    return 1;
    }
 }
Reply
#2

do the same above ondialogresponse of this dialog but remember that to declare a var to check how many times he can do it and each time increment it.
Reply
#3

i did at all 3 of them but still now even if a player presses anything like just 1 letter it passes
Reply
#4

Quote:
Originally Posted by ThatFag
Посмотреть сообщение
Код:
if(strcmp(inputtext, randomzznr, true) == 1)return ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Business rob",strings,"Continue","");// Checks if the inputtext returns the word; hi
    {
 randomstr(randomzznr);

 format(strings,sizeof(strings),"---Step 3---\nWrite The following in order to continue\n\n%s",randomzznr);
    ShowPlayerDialog(playerid,1003,DIALOG_STYLE_INPUT,"Drug Production",strings,"Continue","");
    return 1;
    }
 }
This code seems wrong, you made an if statement (if() return action) and you open brackets again, it makes no sense at all, show full code please
Reply
#5

Your code has some logical mistakes you are opening the if statement that has single statement (return one) on top so your if statement wont work as you expect to.
Reply
#6

here it is
Код:
if(dialogid == 1003)
{
new strings[300];
if(strcmp(inputtext, randomzznr, true) == 0)//; hi
    {
    SendClientMessage(playerid, -1,"You've broken  into the biz");

    return 1;
    }
}
if(dialogid == 1002)
{
new strings[300];
if(strcmp(inputtext, randomzznr, true) == 0)//s if the inputtext returns the word; hi
    {
 randomstr(randomzznr);

 format(strings,sizeof(strings),"---Step 3---\nWrite The following in order to continue\n\n%s",randomzznr);
    ShowPlayerDialog(playerid,1003,DIALOG_STYLE_INPUT,"testing",strings,"Continue","");
    return 1;
    }
 }
if(dialogid == 1001)
 {
  new strings[300];
if(strcmp(inputtext, randomzznr, true) == 0)// Checks if the inputtext returns the word; hi
    {
    randomstr(randomzznr);
    format(strings,sizeof(strings),"---Step 2---\nWrite The following in order to continue\n\n%s",randomzznr);
    ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"testing",strings,"Continue","");
	return 1;
  }
 }
Reply
#7

Quote:
Originally Posted by ThatFag
Посмотреть сообщение
Код:
if(strcmp(inputtext, randomzznr, true) == 1)return ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Business rob",strings,"Continue","");// Checks if the inputtext returns the word; hi
    {
 randomstr(randomzznr);

 format(strings,sizeof(strings),"---Step 3---\nWrite The following in order to continue\n\n%s",randomzznr);
    ShowPlayerDialog(playerid,1003,DIALOG_STYLE_INPUT,"Drug Production",strings,"Continue","");
    return 1;
    }
 }
But where is this part? and explain more what you want to do
Reply
#8

now when player is on a robbery this dialog shows up -- step 2--
what i want is for exxample
player has to say"Hello" and when dialog shows up he presses "hell" or any other things that is not "hello" will reshow the dialog cuz with this code i have it just got gonne
Reply
#9

Please help me i really need this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)