Advertisement
Fr3ak

Color Changer

Oct 14th, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.33 KB | None | 0 0
  1. /////Color Changer/////
  2. ////////By Fr3ak///////
  3.  
  4. //INCLUDES//
  5.  
  6. #include <a_samp>
  7.  
  8. //INCLUDES//
  9.  
  10. //DEFINES//
  11.  
  12. #define DIALOGID 6969
  13.  
  14. //DEFINES//
  15.  
  16. public OnPlayerCommandText(playerid, cmdtext[])
  17. {
  18.     if (strcmp("/cmenu", cmdtext, true, 10) == 0)
  19.     {
  20.         ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Player Color Changer ~ By Fr3ak", "Purple\nYellow\nRed\nLightblue\nOrange\nGreen\nIndigo\nPink\nBlack", "Select", "Cancel");
  21.         return 1;
  22.     }
  23.     return 0;
  24. }
  25.  
  26. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  27. {
  28.     if(dialogid == DIALOGID)
  29.     {
  30.         if(response)
  31.         {
  32.             if(listitem == 0)
  33.             {
  34.                 SetPlayerColor(playerid, 0x800080AA);
  35.             }
  36.             if(listitem == 1)
  37.             {
  38.                 SetPlayerColor(playerid, 0xFFFF00AA);
  39.             }
  40.             if(listitem == 2)
  41.             {
  42.                 SetPlayerColor(playerid, 0xff0000ff);
  43.             }
  44.             if(listitem == 3)
  45.             {
  46.                 SetPlayerColor(playerid, 0x33CCFFAA);
  47.             }
  48.             if(listitem == 4)
  49.             {
  50.                 SetPlayerColor(playerid, 0xFF9900AA);
  51.             }
  52.             if(listitem == 5)
  53.             {
  54.                 SetPlayerColor(playerid, 0x33AA33AA);
  55.             }
  56.             if(listitem == 6)
  57.             {
  58.                 SetPlayerColor(playerid, 0x4B00B0AA);
  59.             }
  60.             if(listitem == 7)
  61.             {
  62.                 SetPlayerColor(playerid, 0xFF66FFAA);
  63.             }
  64.             if(listitem == 8)
  65.             {
  66.                 SetPlayerColor(playerid, 0x00000000);
  67.             }
  68.         }
  69.         return 1;
  70.     }
  71.  
  72.     return 0;
  73.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement