29.04.2014, 14:39
You should always return 0 at the end of the OnDialogResponse callback so it will allow the callback to be called in other scripts too. Use some other number for the dialogid - a bit longer such as 312 so it won't confict with any other. A suggestion too: switch is faster and better in case you add more dialogs.
pawn Code:
//Under the CMD
ShowPlayerDialog(playerid, 312, DIALOG_STYLE_INPUT, "Advertisment", "Please enter your Advertisment:", "Enter", "Cancel");
//Under OnDialog Responce
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch (dialogid)
{
case 312:
{
if (response)
{
new string[144];
format(string, sizeof(string),"[ADVERTISMENT]:%s", inputtext);
SendClientMessageToAll(0x00F250FF, string);
}
}
}
return 0;
}

