Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /* [iPs]Mensagens Ramdomicas (Multi-Linguas)
  2.    Já existem vários scripts destes, mas com opção de linguas não existe nenhum.  
  3.    
  4.    Como funciona:
  5.    Quando você entrar no servidor irá aparecer um dialog com 3 opções:
  6.    Português/Portuguese ; Inglês/English ; Espanhol/Español.
  7.    Se escolher Português/Portuguese as mensagens randómicas para sí serão só as que estão em Português.
  8.    Se escolher Inglês/English as mensagens randómicas para sí só serão só as que estão em Inglês.
  9.    Se escolher Espanhol/Español as mensagens randómicas para sí só serão as que estão em Espanhol.
  10.  
  11.    As mensagens podem ser modificadas no script, tal como as Linguas.  
  12.  
  13.    Criador Geral: [iPs]DiogoBras  
  14.    Contato: diogobrandao_9@hotmail.com  
  15.    Bugs: Testei e não encontrei, mas se encontrarem, contatem-me.  
  16.    [iPs]Team Project! */  
  17.  
  18. //==================================[Includes]==================================
  19. #include <a_samp>
  20. #include <DL>
  21. //==================================[Includes]==================================
  22. //==================================[Forwards]==================================
  23. forward MsgsRandomicas(playerid);
  24. //==================================[Forwards]==================================
  25. //==================================[Defines]===================================
  26. #define Lingua 1
  27. //==================================[Defines]===================================
  28. //===================================[New's]====================================
  29. new string[78];
  30. new Cores[] = {
  31.    0x9C9C9CFF, //Cinzento  
  32.    0xEEAD0EFF, //Amarelo Torrado
  33.    0xFF7F00FF, //Laranja
  34.    0x228B22FF, //Verde  
  35.    0x4682B4, //Azul  
  36.    0x5CACEE, //Azull
  37.    0x9C9C9C, //Azulll    
  38.    0xFF6A6AFF, //Rosa  
  39.    0x9F79EEFF, //Roxo
  40.  
  41. }
  42.  
  43. new MsgsPT[5][256] = {
  44.     "MENSAGEM EM PORTUGUÊS",
  45.     "MENSAGEM EM PORTUGUÊS",    
  46.     "MENSAGEM EM PORTUGUÊS",    
  47.     "MENSAGEM EM PORTUGUÊS",    
  48.     "MENSAGEM EM PORTUGUÊS"
  49. }
  50.  
  51. new MsgsENG[5][256] = {
  52.     "MENSAGEM EM INGLÊS",    
  53.     "MENSAGEM EM INGLÊS",
  54.     "MENSAGEM EM INGLÊS",
  55.     "MENSAGEM EM INGLÊS",
  56.     "MENSAGEM EM INGLÊS"    
  57. }
  58.  
  59. new MsgsESP[5][256] = {
  60.     "MENSAGEM EM ESPANHOL",    
  61.     "MENSAGEM EM ESPANHOL",
  62.     "MENSAGEM EM ESPANHOL",
  63.     "MENSAGEM EM ESPANHOL",
  64.     "MENSAGEM EM ESPANHOL"        
  65. }
  66. //===================================[New's]====================================
  67.  
  68. public OnGameModeInit()
  69. {
  70.    SetTimer("MsgsRandomicas", 60000, 1); //Mude o 60000(1 minuto) para o tempo que quer.
  71. }
  72.  
  73. public OnPlayerConnect(playerid)
  74. {
  75.    new dialog[128] = "Português/Portuguese\nInglês/English\nEspanhol/Español";
  76.    return ShowPlayerDialog(playerid, Lingua, DIALOG_STYLE_LIST, "{5CACEE}Language:", dialog, "Selecionar", "Cancelar");  
  77. }
  78.  
  79. public MsgsRandomicas(playerid)
  80. {
  81.    if(LinguagemJogador[playerid] == 0)    
  82.    {
  83.       new randomPT = random(sizeof(MsgsPT));
  84.       new randomPT2 = random(sizeof(Cores));
  85.       format(string, sizeof(string), "%s", MsgsPT[randomPT]);
  86.       return SendClientMessageToAll(Cores[randomPT2], string);    
  87.    }    
  88.    if(LinguagemJogador[playerid] == 1)    
  89.    {    
  90.       new randomENG = random(sizeof(MsgsENG));    
  91.       new randomENG2 = random(sizeof(Cores));    
  92.       format(string, sizeof(string), "%s", MsgsENG[randomENG]);    
  93.       return SendClientMessageToAll(Cores[randomENG2], string);    
  94.    }    
  95.    if(LinguagemJogador[playerid] == 2)    
  96.    {    
  97.       new randomESP = random(sizeof(MsgsESP));    
  98.       new randomESP2 = random(sizeof(Cores));    
  99.       format(string, sizeof(string), "%s", MsgsESP[randomESP]);    
  100.       return SendClientMessageToAll(Cores[randomESP2], string);    
  101.    }
  102.    return 1;
  103. }
  104.  
  105. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  106. {
  107.    if(dialogid == Lingua)
  108.    {
  109.       if(response)
  110.       {
  111.          if(listitem == 0)
  112.          {
  113.             LinguagemJogador[playerid] = 0;            
  114.             return SendClientMessage(playerid, 0xFFF000AA, "{5CACEE}Lingua escolhida: {FFFFFF}Português");
  115.          }
  116.          else if(listitem == 1)
  117.          {
  118.             LinguagemJogador[playerid] = 1;
  119.             return SendClientMessage(playerid, 0xFFF000AA, "{5CACEE}Chosen language: {FFFFFF}English");
  120.          }
  121.          else if(listitem == 3)
  122.          {
  123.             LinguagemJogador[playerid] = 2;
  124.             return SendClientMessage(playerid, 0xFFF000AA, "{5CACEE}Idioma elegido: {FFFFFF}Español");
  125.          }
  126.          return 1;      
  127.       }
  128.    }
  129.    return 0;
  130. }