Guest User

[FilterScript] Announce in Dialog (Simple)

a guest
Apr 28th, 2012
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.48 KB | None | 0 0
  1. /*
  2.                         -= Do not remove the credits =-
  3.                               Announce in Dialog
  4.                               By - @Riichard
  5.                               Sorry for english errors!
  6.                               I am bad in English ;s
  7.                         -= Do not remove the credits =-
  8. */
  9. #include <a_samp>
  10. #define Ann 30 // if ID is already being used, modify!
  11.  
  12. #if defined FILTERSCRIPT
  13. public OnFilterScriptInit()
  14. {
  15.     print("\n--------------------------------------");
  16.     print(" [FS] Announce Dialog || By @Riichard");
  17.     print("--------------------------------------\n");
  18.     return 1;
  19. }
  20.  
  21. #endif
  22.  
  23.  
  24. public OnPlayerConnect(playerid)
  25. {
  26.     SendClientMessage(playerid,0x9C9C9CAA,"System [FS] Announcement Dialog. By : @Riichard");
  27.     return 0;
  28. }
  29.  
  30. public OnPlayerCommandText(playerid, cmdtext[])
  31. {
  32. if (!strcmp(cmdtext, "/an", true) || !strcmp(cmdtext, "/Announce", true) || !strcmp(cmdtext, "/ann", true)) {
  33.     ShowPlayerDialog(playerid, Ann, DIALOG_STYLE_INPUT, "{FF0000}- Announce", "{4F4F4F}Enter the Ad below", "Advertise", "Cancel");
  34.     return 1;
  35. }
  36. return 0;
  37. }
  38. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  39. {
  40. if (dialogid == Ann) {
  41.     if (response) {
  42.         new str[200];
  43.         GetPlayerName(playerid, str, sizeof(str));
  44.         SendClientMessageToAll(-1, "{6C7B8B}________________ [ Announce New's ]________________");
  45.         format(str, sizeof(str), "{4682B4}[Announce] » {A9A9A9}%s{4682B4}(ID:%d) {A9A9A9}Says :{4682B4} %s", str, playerid, inputtext[0]);
  46.         SendClientMessageToAll(-1, str);
  47.     }
  48. }
  49. return 0;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment