Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- -= Do not remove the credits =-
- Announce in Dialog
- By - @Riichard
- Sorry for english errors!
- I am bad in English ;s
- -= Do not remove the credits =-
- */
- #include <a_samp>
- #define Ann 30 // if ID is already being used, modify!
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" [FS] Announce Dialog || By @Riichard");
- print("--------------------------------------\n");
- return 1;
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,0x9C9C9CAA,"System [FS] Announcement Dialog. By : @Riichard");
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (!strcmp(cmdtext, "/an", true) || !strcmp(cmdtext, "/Announce", true) || !strcmp(cmdtext, "/ann", true)) {
- ShowPlayerDialog(playerid, Ann, DIALOG_STYLE_INPUT, "{FF0000}- Announce", "{4F4F4F}Enter the Ad below", "Advertise", "Cancel");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if (dialogid == Ann) {
- if (response) {
- new str[200];
- GetPlayerName(playerid, str, sizeof(str));
- SendClientMessageToAll(-1, "{6C7B8B}________________ [ Announce New's ]________________");
- format(str, sizeof(str), "{4682B4}[Announce] » {A9A9A9}%s{4682B4}(ID:%d) {A9A9A9}Says :{4682B4} %s", str, playerid, inputtext[0]);
- SendClientMessageToAll(-1, str);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment