Want more features on Pastebin? Sign Up, it's FREE!
Guest

Colors Menu

By: a guest on Aug 13th, 2011  |  syntax: PAWN  |  size: 3.02 KB  |  views: 862  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include a_samp
  2. #include dini
  3. #define Red 0xFF0000FF
  4. #define Blue 0x0000FFFF
  5. #define Yellow 0xFFFF00FF
  6. #define Green 0x008000FF
  7. #define Black 0x000000FF
  8. #define Purple 0x800080FF
  9. #define Orange 0xFFA500FF
  10. #define Gray 0x808080FF
  11. #define Gold 0xFFD700FF
  12. #define Pink 0xFFC0CBFF
  13. #define Silver 0xC0C0C0FF
  14. #define LightBlue 0xADD8E6FF
  15. #define GreenYellow 0xADFF2FFF
  16. #define DarkGreen 0x006400FF
  17. #define LightYellow 0xFFFFE0FF
  18. #define LightPink 0xFFB6C1FF
  19. #define LightCoral 0xF08080FF
  20. #define DarkGray 0xA9A9A9FF
  21. #define White 0xFFFFFFFF
  22. #define Brown 0x400000FF
  23.  
  24. public OnPlayerCommandText(playerid, cmdtext[])
  25. {
  26.     if (strcmp("/Colors", cmdtext, true) == 0) {
  27.         ShowPlayerDialog(playerid, 24, DIALOG_STYLE_LIST, "Choose The Color WhatEver You Like", "Red\nBlue\nYellow\nGreen\nBlack\nPurple\nOrange\nBrown\nGray\nWhite\nGold\nPink\nSilver\nLightBlue\nGreenYellow\nDarkGreen\nLightYellow\nLightPink\nLightCoral\nDarkGray", "Select", "Cancel");
  28.         return 1;
  29.     }
  30.     return 0;
  31. }
  32.  
  33.  
  34. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  35. {
  36.     if(dialogid == 24) {
  37.         if(response) {
  38.             if(listitem == 0) {
  39.                 SetPlayerColor(playerid,Red);
  40.             }
  41.             if(listitem == 1) {
  42.                 SetPlayerColor(playerid,Blue);
  43.             }
  44.             if(listitem == 2) {
  45.                 SetPlayerColor(playerid,Yellow);
  46.             }
  47.             if(listitem == 3) {
  48.                 SetPlayerColor(playerid,Green);
  49.             }
  50.             if(listitem == 4) {
  51.                 SetPlayerColor(playerid,Black);
  52.             }
  53.             if(listitem == 5) {
  54.                 SetPlayerColor(playerid,Purple);
  55.             }
  56.             if(listitem == 6) {
  57.                 SetPlayerColor(playerid,Orange);
  58.             }
  59.             if(listitem == 7) {
  60.                 SetPlayerColor(playerid,Brown);
  61.             }
  62.             if(listitem == 8) {
  63.                 SetPlayerColor(playerid,Gray);
  64.             }
  65.             if(listitem == 9) {
  66.                 SetPlayerColor(playerid,White);
  67.             }
  68.             if(listitem == 10) {
  69.                 SetPlayerColor(playerid,Gold);
  70.             }
  71.             if(listitem == 11) {
  72.                 SetPlayerColor(playerid,Silver);
  73.             }
  74.             if(listitem == 12) {
  75.                 SetPlayerColor(playerid,LightBlue);
  76.             }
  77.             if(listitem == 13) {
  78.                 SetPlayerColor(playerid,GreenYellow);
  79.             }
  80.             if(listitem == 14) {
  81.                 SetPlayerColor(playerid,DarkGreen);
  82.             }
  83.             if(listitem == 15) {
  84.                 SetPlayerColor(playerid,LightYellow);
  85.             }
  86.             if(listitem == 16) {
  87.                 SetPlayerColor(playerid,LightPink);
  88.             }
  89.             if(listitem == 17) {
  90.                 SetPlayerColor(playerid,LightCoral);
  91.             }
  92.             if(listitem == 18) {
  93.                 SetPlayerColor(playerid,DarkGray);
  94.             }
  95.         }
  96.     }
  97.     return 1;
  98. }
  99.  
  100.  
  101. //Enjoy :D
clone this paste RAW Paste Data