Guest User

Untitled

a guest
Mar 27th, 2012
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. //Simple Colour Name By Awankz
  2. //Please Dont Remove Credits
  3.  
  4. #include <a_samp>
  5.  
  6. #define DIALOG_NAMECOLOR 1
  7.  
  8. #pragma tabsize 0
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n----------------------------------");
  13. print(" Colour Name By Awankz ");
  14. print("----------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. return 1;
  21. }
  22.  
  23. public OnPlayerCommandText(playerid, cmdtext[])
  24. {
  25. if (strcmp("/changecolour", cmdtext, true, 10) == 0){
  26. ShowPlayerDialog(playerid, DIALOG_NAMECOLOR, DIALOG_STYLE_LIST, "{FF0000}Namecolor Menu:", "{33AA33}Green\n{AA3333}Red\n{FFFF00}Yellow\n{0000BB}Blue\n{FF9900}Orange\n{FFC0CB}Pink\n{B8860B}Gold", "Accept", "Cancel");
  27. return 1;
  28. }
  29. return 0;
  30. }
  31.  
  32. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  33. {
  34. if(dialogid == DIALOG_NAMECOLOR)
  35. {
  36. if(response)
  37. {
  38. if(listitem == 0)
  39. {
  40. SetPlayerColor(playerid, 0x33AA33AA);
  41. }
  42. if(listitem == 1)
  43. {
  44. SetPlayerColor(playerid, 0xAA3333AA);
  45. }
  46. if(listitem == 2)
  47. {
  48. SetPlayerColor(playerid, 0xFFFF00AA);
  49. }
  50. if(listitem == 3)
  51. {
  52. SetPlayerColor(playerid, 0x0000BBAA);
  53. }
  54. if(listitem == 4)
  55. {
  56. SetPlayerColor(playerid, 0xFF9900AA);
  57. }
  58. if(listitem == 5)
  59. {
  60. SetPlayerColor(playerid, 0xFFC0CBAA);
  61. }
  62. if(listitem == 6)
  63. {
  64. SetPlayerColor(playerid, 0xB8860BAA);
  65. }
  66. }
  67. return 1;
  68. }
  69. return 0;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment