Advertisement
Guest User

NourdinTRP - Simple announcement thread

a guest
Jan 30th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.98 KB | None | 0 0
  1.  /*
  2.  
  3.  _   _                     _ _     _____ ____  ____  
  4. | \ | | ___  _   _ _ __ __| (_)_ _|_   _|  _ \|  _ \
  5. |  \| |/ _ \| | | | '__/ _` | | '_ \| | | |_) | |_) |
  6. | |\  | (_) | |_| | | | (_| | | | | | | |  _ <|  __/
  7. |_| \_|\___/ \__,_|_|  \__,_|_|_| |_|_| |_| \_\_|    
  8.  
  9.     -- Simple message filterscript --
  10.  
  11.  
  12. */
  13.  
  14.  
  15. #include <a_samp>
  16. #include <zcmd>
  17. #include <sscanf2>
  18.  
  19. #define DIALOG_COLORS 1
  20. #define DIALOG_COLORS2 2
  21.  
  22. #define COLOR_GREY 0xAFAFAFAA
  23. #define COLOR_GREEN 0x33AA33AA
  24. #define COLOR_RED 0xAA3333AA
  25. #define COLOR_YELLOW 0xFFFF00AA
  26. #define COLOR_WHITE 0xFFFFFFAA
  27. #define COLOR_BLUE 0x0000BBAA
  28. #define COLOR_LIGHTBLUE 0x33CCFFAA
  29. #define COLOR_ORANGE 0xFF9900AA
  30. #define COLOR_RED 0xAA3333AA
  31. #define COLOR_LIME 0x10F441AA
  32. #define COLOR_MAGENTA 0xFF00FFFF
  33. #define COLOR_NAVY 0x000080AA
  34. #define COLOR_AQUA 0xF0F8FFAA
  35. #define COLOR_CRIMSON 0xDC143CAA
  36. #define COLOR_FLBLUE 0x6495EDAA
  37. #define COLOR_BISQUE 0xFFE4C4AA
  38. #define COLOR_BLACK 0x000000AA
  39. #define COLOR_CHARTREUSE 0x7FFF00AA
  40. #define COLOR_BROWN 0XA52A2AAA
  41. #define COLOR_CORAL 0xFF7F50AA
  42. #define COLOR_GOLD 0xB8860BAA
  43. #define COLOR_GREENYELLOW 0xADFF2FAA
  44. #define COLOR_INDIGO 0x4B00B0AA
  45. #define COLOR_IVORY 0xFFFF82AA
  46. #define COLOR_LAWNGREEN 0x7CFC00AA
  47.  
  48. new colorformsg[MAX_PLAYERS];
  49.  
  50. CMD:information(playerid, params[])
  51. {
  52.     new HugeString[1024];
  53.     format(HugeString, sizeof(HugeString), "{FFFFFF}Simple Message System has been created by {6EF83C}NourdinTRP.");
  54.     ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX, "Simple Message", HugeString, "OK", "");
  55.  
  56.     return 1;
  57. }
  58.  
  59. CMD:message(playerid, params[])
  60. {
  61.     ShowPlayerDialog(playerid, DIALOG_COLORS, DIALOG_STYLE_LIST, "What colour do you want?", "Red\nBlue\nYellow\nGreen\nIndigo\nGold\nWhite\nCrimson", "Continue", "Cancel");
  62.     return 1;
  63. }
  64.  
  65. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  66. {
  67.     switch(dialogid)
  68.     {
  69.         case DIALOG_COLORS:
  70.         {
  71.             if(response)
  72.             {
  73.                 colorformsg[playerid] = listitem;
  74.                 ShowPlayerDialog(playerid, DIALOG_COLORS2, DIALOG_STYLE_INPUT,"Message","Type your message in","Send","Cancel");
  75.             }
  76.         }
  77.         case DIALOG_COLORS2:
  78.         {
  79.             if(response)
  80.             {
  81.                 switch(colorformsg[playerid])
  82.                 {
  83.                     case 0: SendClientMessageToAll(COLOR_RED, inputtext);
  84.                     case 1: SendClientMessageToAll(COLOR_BLUE, inputtext);
  85.                     case 2: SendClientMessageToAll(COLOR_YELLOW, inputtext);
  86.                     case 3: SendClientMessageToAll(COLOR_GREEN, inputtext);
  87.                     case 4: SendClientMessageToAll(COLOR_INDIGO, inputtext);
  88.                     case 5: SendClientMessageToAll(COLOR_GOLD, inputtext);
  89.                     case 6: SendClientMessageToAll(COLOR_WHITE, inputtext);
  90.                     case 7: SendClientMessageToAll(COLOR_CRIMSON, inputtext);
  91.                 }
  92.             }
  93.         }
  94.     }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement