Advertisement
Jonas_Alves

Sistema de Cores Simples v2.0

Oct 9th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.27 KB | None | 0 0
  1. /* Jonas Emanuel */
  2. #include <a_samp>
  3. #include <zcmd>
  4.  
  5. #define COR_VERMELHO 0xFF0037FF
  6. #define COR_AZUL 0x0000FFFF
  7. #define COR_VERDECLARO 0x19FF00FF
  8. #define COR_AMARELO 0xFFFF00AA
  9. #define COR_LARANJA 0xFF9933AA
  10. #define COR_AZULCLARO 0x46BBAA00
  11. #define COR_BRANCO 0xFFFFFFAA
  12. #define COR_AZULESCURO 0x3399FFAA
  13. #define COR_PRETO 0x00000000
  14. #define COR_ROXO 0x9900FFAA
  15. #define COR_ROSA 0xFF66FFAA
  16. #define COR_INVISIVEL 0xAFAFAF00
  17. #define COR_BEJE 0x999900AA
  18. #define COR_MARROM 0x993300AA
  19. #define COR_CINZA 0xAFAFAFAA
  20. #define COR_VIOLETA 0x9955DEEE
  21.  
  22. new CORES[16]={
  23.     COR_VERMELHO,
  24.     COR_AZUL,
  25.     COR_VERDECLARO,
  26.     COR_AMARELO,
  27.     COR_LARANJA,
  28.     COR_AZULCLARO,
  29.     COR_BRANCO,
  30.     COR_AZULESCURO,
  31.     COR_PRETO,
  32.     COR_ROXO,
  33.     COR_ROSA,
  34.     COR_INVISIVEL,
  35.     COR_BEJE,
  36.     COR_MARROM,
  37.     COR_CINZA,
  38.     COR_VIOLETA
  39. };
  40.  
  41. public OnFilterScriptInit()
  42. {
  43.     print("\n--------------------------------------------");
  44.     print(" Sistema de Cores Carregado by: Jonas_Emanuel ");
  45.     print("--------------------------------------------\n");
  46.     return 1;
  47. }
  48.  
  49. CMD:cores(playerid)
  50. {
  51.     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Escolhe sua Cor:", "{FF0000}Vermelho\n{3D00FF}Azul\n{09FF00}Verde Claro\n{FFFF00}Amarelo\n{FFB900}Laranja\n{00FFFF}Azul Claro\n{FFFFFF}Branco\n{00008C}Azul Escuro\n{000000}Preto\n{7400BA}Roxo\n{FD63E4}Rosa\nInvisivel\n{FFE8C0}Beje\n{A36E00}Marrom\n{636665}Cinza\n{BA5FFF}Violeta", "Escolher", "Cancelar");
  52.     return 1;
  53. }
  54.  
  55. public OnPlayerSpawn(playerid)
  56. {
  57.     SetPlayerColor(playerid, CORES[random(sizeof(CORES))]);
  58.     return 1;
  59. }
  60. public OnDialogResponse(playerid, dialogid, response, listitem)
  61. {
  62.     if(dialogid == 1)
  63.     {
  64.         switch(listitem)
  65.         {
  66.             case 0:
  67.             {
  68.                 SetPlayerColor(playerid, COR_VERMELHO);
  69.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {FF0000}Vermelho");
  70.                 return 1;
  71.             }
  72.             case 1:
  73.             {
  74.                 SetPlayerColor(playerid, COR_AZUL);
  75.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {3D00FF}Azul");
  76.                 return 1;
  77.             }
  78.             case 2:
  79.             {
  80.                 SetPlayerColor(playerid, COR_VERDECLARO);
  81.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {09FF00}Verde Claro");
  82.                 return 1;
  83.             }
  84.             case 3:
  85.             {
  86.                 SetPlayerColor(playerid, COR_AMARELO);
  87.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {FFFF00}Amarelo");
  88.                 return 1;
  89.             }
  90.             case 4:
  91.             {
  92.                 SetPlayerColor(playerid, COR_LARANJA);
  93.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {FFB900}Laranja");
  94.                 return 1;
  95.             }
  96.             case 5:
  97.             {
  98.                 SetPlayerColor(playerid, COR_AZULCLARO);
  99.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {00FFFF}Azul Claro");
  100.                 return 1;
  101.             }
  102.             case 6:
  103.             {
  104.                 SetPlayerColor(playerid, COR_BRANCO);
  105.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {FFFFFF}Branco");
  106.                 return 1;
  107.             }
  108.             case 7:
  109.             {
  110.                 SetPlayerColor(playerid, COR_AZULESCURO);
  111.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {00008C}Azul Escuro");
  112.                 return 1;
  113.             }
  114.             case 8:
  115.             {
  116.                 SetPlayerColor(playerid, COR_PRETO);
  117.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {000000}Preto");
  118.                 return 1;
  119.             }
  120.             case 9:
  121.             {
  122.                 SetPlayerColor(playerid, COR_ROXO);
  123.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {7400BA}Roxo");
  124.                 return 1;
  125.             }
  126.             case 10:
  127.             {
  128.                 SetPlayerColor(playerid, COR_ROSA);
  129.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {FD63E4}Rosa");
  130.                 return 1;
  131.             }
  132.             case 11:
  133.             {
  134.                 SetPlayerColor(playerid, COR_INVISIVEL);
  135.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: Invisivel");
  136.                 return 1;
  137.             }
  138.             case 12:
  139.             {
  140.                 SetPlayerColor(playerid, COR_BEJE);
  141.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {FFE8C0}Beje");
  142.                 return 1;
  143.             }
  144.             case 13:
  145.             {
  146.                 SetPlayerColor(playerid, COR_MARROM);
  147.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {A36E00}Marrom");
  148.                 return 1;
  149.             }
  150.             case 14:
  151.             {
  152.                 SetPlayerColor(playerid, COR_CINZA);
  153.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {636665}Cinza");
  154.                 return 1;
  155.             }
  156.             case 15:
  157.             {
  158.                 SetPlayerColor(playerid, COR_VIOLETA);
  159.                 SendClientMessage(playerid, COR_AMARELO, "Cor alterada para: {BA5FFF}Violeta");
  160.                 return 1;
  161.             }
  162.         }
  163.     }
  164.     return 1;
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement