Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* [iPs]Mensagens Ramdomicas (Multi-Linguas)
- Já existem vários scripts destes, mas com opção de linguas não existe nenhum.
- Como funciona:
- Quando você entrar no servidor irá aparecer um dialog com 3 opções:
- Português/Portuguese ; Inglês/English ; Espanhol/Español.
- Se escolher Português/Portuguese as mensagens randómicas para sí serão só as que estão em Português.
- Se escolher Inglês/English as mensagens randómicas para sí só serão só as que estão em Inglês.
- Se escolher Espanhol/Español as mensagens randómicas para sí só serão as que estão em Espanhol.
- As mensagens podem ser modificadas no script, tal como as Linguas.
- Criador Geral: [iPs]DiogoBras
- Contato: [email protected]
- Bugs: Testei e não encontrei, mas se encontrarem, contatem-me.
- [iPs]Team Project! */
- //==================================[Includes]==================================
- #include <a_samp>
- #include <DL>
- //==================================[Includes]==================================
- //==================================[Forwards]==================================
- forward MsgsRandomicas(playerid);
- //==================================[Forwards]==================================
- //==================================[Defines]===================================
- #define Lingua 1
- //==================================[Defines]===================================
- //===================================[New's]====================================
- new string[78];
- new Cores[] = {
- 0x9C9C9CFF, //Cinzento
- 0xEEAD0EFF, //Amarelo Torrado
- 0xFF7F00FF, //Laranja
- 0x228B22FF, //Verde
- 0x4682B4, //Azul
- 0x5CACEE, //Azull
- 0x9C9C9C, //Azulll
- 0xFF6A6AFF, //Rosa
- 0x9F79EEFF, //Roxo
- }
- new MsgsPT[5][256] = {
- "MENSAGEM EM PORTUGUÊS",
- "MENSAGEM EM PORTUGUÊS",
- "MENSAGEM EM PORTUGUÊS",
- "MENSAGEM EM PORTUGUÊS",
- "MENSAGEM EM PORTUGUÊS"
- }
- new MsgsENG[5][256] = {
- "MENSAGEM EM INGLÊS",
- "MENSAGEM EM INGLÊS",
- "MENSAGEM EM INGLÊS",
- "MENSAGEM EM INGLÊS",
- "MENSAGEM EM INGLÊS"
- }
- new MsgsESP[5][256] = {
- "MENSAGEM EM ESPANHOL",
- "MENSAGEM EM ESPANHOL",
- "MENSAGEM EM ESPANHOL",
- "MENSAGEM EM ESPANHOL",
- "MENSAGEM EM ESPANHOL"
- }
- //===================================[New's]====================================
- public OnGameModeInit()
- {
- SetTimer("MsgsRandomicas", 60000, 1); //Mude o 60000(1 minuto) para o tempo que quer.
- }
- public OnPlayerConnect(playerid)
- {
- new dialog[128] = "Português/Portuguese\nInglês/English\nEspanhol/Español";
- return ShowPlayerDialog(playerid, Lingua, DIALOG_STYLE_LIST, "{5CACEE}Language:", dialog, "Selecionar", "Cancelar");
- }
- public MsgsRandomicas(playerid)
- {
- if(LinguagemJogador[playerid] == 0)
- {
- new randomPT = random(sizeof(MsgsPT));
- new randomPT2 = random(sizeof(Cores));
- format(string, sizeof(string), "%s", MsgsPT[randomPT]);
- return SendClientMessageToAll(Cores[randomPT2], string);
- }
- if(LinguagemJogador[playerid] == 1)
- {
- new randomENG = random(sizeof(MsgsENG));
- new randomENG2 = random(sizeof(Cores));
- format(string, sizeof(string), "%s", MsgsENG[randomENG]);
- return SendClientMessageToAll(Cores[randomENG2], string);
- }
- if(LinguagemJogador[playerid] == 2)
- {
- new randomESP = random(sizeof(MsgsESP));
- new randomESP2 = random(sizeof(Cores));
- format(string, sizeof(string), "%s", MsgsESP[randomESP]);
- return SendClientMessageToAll(Cores[randomESP2], string);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Lingua)
- {
- if(response)
- {
- if(listitem == 0)
- {
- LinguagemJogador[playerid] = 0;
- return SendClientMessage(playerid, 0xFFF000AA, "{5CACEE}Lingua escolhida: {FFFFFF}Português");
- }
- else if(listitem == 1)
- {
- LinguagemJogador[playerid] = 1;
- return SendClientMessage(playerid, 0xFFF000AA, "{5CACEE}Chosen language: {FFFFFF}English");
- }
- else if(listitem == 3)
- {
- LinguagemJogador[playerid] = 2;
- return SendClientMessage(playerid, 0xFFF000AA, "{5CACEE}Idioma elegido: {FFFFFF}Español");
- }
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment