03.10.2009, 11:12
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;
}
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;
}