29.04.2014, 12:00
In your /ad command, show the dialog. Look at the 2nd example that uses DIALOG_STYLE_INPUT from the first link.
Then in OnDialogResponse callback, check if the dialogid is same as the dialog ID you used in your dialog and if the response is 1. The only left now is to format a message with the player's name and pass the inputtext as argument and then send that format message to all.
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/Format
https://sampwiki.blast.hk/wiki/SendClientMessageToAll
Then in OnDialogResponse callback, check if the dialogid is same as the dialog ID you used in your dialog and if the response is 1. The only left now is to format a message with the player's name and pass the inputtext as argument and then send that format message to all.
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/Format
https://sampwiki.blast.hk/wiki/SendClientMessageToAll