Posts: 362
Threads: 15
Joined: Jun 2009
Reputation:
0
I maked a thread now because many peoples ask only little script questions. post it here.
I have too a question. I use 2 Filterscripts and both use a Dialog. 1 dialog work, but with the other dialog and if i klick on it the dialog just disapear. if i only load 1 then it works...
And i maked a Dialog and want to make if some klick on a Dialogtext that it SendCommand. But that Feature is only for NPCs... how do i can make for normal players?
Greets
Posts: 641
Threads: 44
Joined: Feb 2009
Reputation:
0
RE: Try other dialog IDs for both FS.
And command text by dialog?
try something like this under OnDialogResponse:
if(dialogid == DIALOG)
{
if(response)
{
OnPlayerCommandText(playerid, inputtext);
}
return 1;
}
Posts: 641
Threads: 44
Joined: Feb 2009
Reputation:
0
oh no... you have to set the dialog style to dialog_style_inputbox
Posts: 362
Threads: 15
Joined: Jun 2009
Reputation:
0
can you show me please? ^^ the menu works perfect but if i klick on it nothing happens
Posts: 641
Threads: 44
Joined: Feb 2009
Reputation:
0
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_INPUTBOX, "Dialog", "Enter command text", "Ok", "Cancel");
and this under OnDialogResponse:
if(dialogid == DIALOGID)
{
if(!response) return 1;
if(response)
{
OnPlayerCommandText(playerid, inputtext);
}
return 0;
}
and this under OnPlayerCommandText:
if(!strcmp(cmdtext, "/car", true))
{
//COMMANDS HERE
return 1;
}
Posts: 6,340
Threads: 58
Joined: May 2009
Reputation:
0
It's "DIALOG_STYLE_INPUT", not "DIALOG_STYLE_INPUTBOX".
Posts: 362
Threads: 15
Joined: Jun 2009
Reputation:
0
Sorry for bump, couldn't script because of school. If i change bot DialogID's, i have the same problem. do they need to be the same or what?!
thanks, too for the menuscript.