24.12.2012, 14:13
Bom dia
no meu hamachi os textdraws funfam normal, e o cronometro tbm, mas no server host nao, oq pode ser?
feliz natal!
no meu hamachi os textdraws funfam normal, e o cronometro tbm, mas no server host nao, oq pode ser?
feliz natal!
Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define END 0.0
////////
#include <zcmd>
// ====== [Variaveis] ======//
new
Text:Borda1[MAX_PLAYERS],
Text:Borda2[MAX_PLAYERS],
Text:Titulo[MAX_PLAYERS],
Text:Borda3[MAX_PLAYERS],
Text:Borda4[MAX_PLAYERS],
Text:Cronometro[MAX_PLAYERS],
bool:cAtivado[MAX_PLAYERS],
croTemp[MAX_PLAYERS],
pHoras[MAX_PLAYERS],
pMinutos[MAX_PLAYERS],
pSegundos[MAX_PLAYERS],
bool:TeclaAtivada[MAX_PLAYERS],
bool:VisualAtivado[MAX_PLAYERS]
;
// ====== [Definiзхes] ======//
#define cMenu 550
#define Text1 551
#define Text2 552
#define Text3 553
#define tCor1 554
#define tCor2 555
#define tCor3 556
#define tFont1 557
#define tFont2 558
#define Inicio 560
#define Avisos 561
#define rTempo 562
// ====== [Cores] ======//
#define Branco 0xFFFFFFAA
#define Preto 0x000000AA
#define Vermelho 0xFF0000AA
#define Verde 0x00FF00AA
#define Cinza 0xA9A9A9AA
#define Azul 0x0000FFAA
#define Amarelo 0xFFFF00AA
#define Rosa 0xEE82EEAA
#define Roxo 0x9400D3AA
/////////////////////////////////////////////////////
new Trocar[MAX_PLAYERS];
new Float:CheckPoints[12][3] = {
{2341.0217,323.9201,32.2856},
{2501.7925,315.7704,29.6092},
{2775.6860,130.8791,21.6115},
{2757.2200,-154.1377,32.4367 },
{2716.8186,-327.2493,26.6834 },
{2848.8269,-479.0710,17.4299 },
{2896.3057,-676.9141,10.4600 },
{2888.4778,-1043.9095,10.4991 },
{2922.5042,-1367.0665,10.5038 },
{2907.9243,-1560.3260,10.4998 },
{2840.0322,-1895.4971,10.5595 },
{2837.8315,-2008.2612,10.5623 }
};
// ====== [Cores] ======//
public OnFilterScriptInit()
{
print(" - rCronometro Pessoal v1.0 -");
print(" - By: @Riichard -");
print(" - Carregado! - ");
// TextDraw's
for (new r = 0; r < MAX_PLAYERS; r++)
{
Titulo[r] = TextDrawCreate(507.000000, 403.000000, "Meu Cronometro:");
TextDrawLetterSize(Titulo[r], 0.170000, 1.199999);
TextDrawFont(Titulo[r], 2);
TextDrawUseBox(Titulo[r], 0);
TextDrawSetOutline(Titulo[r], 1);
TextDrawAlignment(Titulo[r], 0);
TextDrawColor(Titulo[r], -589505281);
TextDrawBoxColor(Titulo[r], 255);
// Cronometro
Cronometro[r] = TextDrawCreate(509.000000, 415.000000, "00:00:00");
TextDrawLetterSize(Cronometro[r], 0.520000, 2.799999);
TextDrawFont(Cronometro[r], 3);
TextDrawUseBox(Cronometro[r], 0);
TextDrawSetOutline(Cronometro[r], 1);
TextDrawAlignment(Cronometro[r], 0);
TextDrawColor(Cronometro[r], 16711935);
TextDrawBackgroundColor(Cronometro[r], 471604479);
// Bordas
Borda1[r] = TextDrawCreate(452.000000, 410.000000, "-");
TextDrawLetterSize(Borda1[r], 13.340015, 0.700000);
TextDrawFont(Borda1[r], 1);
TextDrawSetOutline(Borda1[r], 1);
TextDrawColor(Borda1[r], 16711935);
// --
Borda2[r] = TextDrawCreate(453.000000, 439.000000, "-");
TextDrawLetterSize(Borda2[r], 13.340015, 0.700000);
TextDrawFont(Borda2[r], 1);
TextDrawSetOutline(Borda2[r], 1);
TextDrawColor(Borda2[r], 16711935);
// --
Borda3[r] = TextDrawCreate(487.000000, 398.000000, "I");
TextDrawLetterSize(Borda3[r], -0.099999, 6.300000);
TextDrawFont(Borda3[r], 1);
TextDrawSetOutline(Borda3[r], 1);
TextDrawColor(Borda3[r], 16711935);
// --
Borda4[r] = TextDrawCreate(611.000000, 398.000000, "I");
TextDrawLetterSize(Borda4[r], -0.099999, 6.300000);
TextDrawFont(Borda4[r], 1);
TextDrawSetOutline(Borda4[r], 1);
TextDrawColor(Borda4[r], 16711935);
}
return 1;
}
public OnPlayerConnect(playerid)
{
cAtivado[playerid] = false;
TeclaAtivada[playerid] = false;
VisualAtivado[playerid] = false;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
pHoras[playerid] = 0;
return 0;
}
CMD:preparar(playerid)
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[0][0], CheckPoints[0][1], CheckPoints[0][2], CheckPoints[1][0], CheckPoints[1][1], CheckPoints[1][2], 10);
Trocar[playerid] = 1;
return 1;
}
CMD:iniciar(playerid)
{
if(cAtivado[playerid] == true)
return SendClientMessage(playerid, Cinza, "[rERRO] Vocк jб inнciou uma cronometragem.");
ShowPlayerDialog(playerid, Inicio, DIALOG_STYLE_MSGBOX, "rCronometro Pessoal", "{778899}Ч Para inнciar o cronometro, vocк dever ler a lista de avisos!", "Ler", "Cancelar");
return 1;
}
CMD:textedit(playerid)
{
if(cAtivado[playerid] == true)
return SendClientMessage(playerid, Cinza, "[rERRO] Uma cronometragem estб em andamento, vocк nгo pode usar isto agora!");
ShowPlayerDialog(playerid, cMenu, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", "{778899}Editar Texto: {00FF00}Meu Cronometro:\n{778899}Editar Texto: {00FF00}00:00:00\n{778899}Editar Texto: {00FF00}Bordas\n{0000FF} Prй-Visualizar", "Editar", "Cancelar");
return 1;
}
CMD:comecarcro(playerid)
{
new String[128];
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
cAtivado[playerid] = true;
TextDrawShowForPlayer(playerid, Titulo[playerid]);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
croTemp[playerid] = SetTimerEx("AtualizarCronometro", 1000, true, "d", playerid);
return 1;
}
CMD:t1t(playerid)
{
new String[128];
KillTimer(croTemp[playerid]);
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
format(String, sizeof(String), "[rINFO] O cronometro de, %s, parou em %02d:%02d:%02d.", pNome(playerid), pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
SendClientMessageToAll(Vermelho, String);
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
return 1;
}
CMD:ctecla(playerid)
{
if(TeclaAtivada[playerid] == true)
{
SendClientMessage(playerid, Cinza, "[AVISO] Vocк desativou o ativamento/desativamento do cronometro por tecla.");
TeclaAtivada[playerid] = false;
}else{
SendClientMessage(playerid, Cinza, "[AVISO] Vocк ativou o ativamento/desativamento do cronometro por tecla.");
TeclaAtivada[playerid] = true;
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new String[128];
if(newkeys == KEY_SUBMISSION)
{
if(TeclaAtivada[playerid] == true)
{
if(cAtivado[playerid] == true)
{
KillTimer(croTemp[playerid]);
format(String, sizeof(String), "{778899}Ч Seu cronometro parou em: {FFFF00}%02d:%02d:%02d{778899} Ч\n\nЧ Desejб mandar uma mensagem para todos do servidor? Ч", pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
ShowPlayerDialog(playerid, rTempo, DIALOG_STYLE_MSGBOX, "rCronometro Pessoal {TEMPO}", String, "Sim", "Nгo");
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
cAtivado[playerid] = false;
}else{
ShowPlayerDialog(playerid, Inicio, DIALOG_STYLE_MSGBOX, "rCronometro Pessoal", "{778899}Ч Para inнciar o cronometro, vocк dever ler a lista de avisos!", "Ler", "Cancelar");
}
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new String[500], String2[500];
if (dialogid == Inicio)
{
if(response)
{
strcat(String, "{778899}Ч Ao passar de 99 horas o cronometro й resetado.\n");
strcat(String, "Ч O cronometro tem forma de: HORAS:MINUTOS:SEGUNDOS\n");
strcat(String, "Ч Para desativar/ativar o cronometro pressione a tecla {FF0000}1{778899}\n");
strcat(String, "Ч Para desativar/ativar pressionando teclas deve usar: {FF0000}/cTecla\n");
ShowPlayerDialog(playerid, Avisos, DIALOG_STYLE_MSGBOX, "rCronometro Pessoal {AVISOS}", String, "Iniciar", "Cancelar");
}
if(!response)
{
SendClientMessage(playerid, Amarelo, "[rINFO] Vocк cancelou o cronometro.");
}
}
if (dialogid == Avisos)
{
if(response)
{
SendClientMessage(playerid, Amarelo, "[rINFO] Vocк ativou o cronometro.");
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
cAtivado[playerid] = true;
TextDrawShowForPlayer(playerid, Titulo[playerid]);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
croTemp[playerid] = SetTimerEx("AtualizarCronometro", 1000, true, "d", playerid);
}
if(!response)
{
SendClientMessage(playerid, Amarelo, "[rINFO] Vocк cancelou o cronometro.");
}
}
if (dialogid == cMenu)
{
if(response)
{
if(listitem == 0)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "- Modificar Fonte\n");
strcat(String, "{FF0000}< Voltar");
TextDrawShowForPlayer(playerid, Titulo[playerid]);
ShowPlayerDialog(playerid, Text1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
if(listitem == 1)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "- Modificar Fonte\n");
strcat(String, "{FF0000}< Voltar");
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
ShowPlayerDialog(playerid, Text2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
if(listitem == 2)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "{FF0000}< Voltar");
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
ShowPlayerDialog(playerid, Text3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
if(listitem == 3)
{
if(VisualAtivado[playerid] == false)
{
TextDrawShowForPlayer(playerid, Titulo[playerid]);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
ShowPlayerDialog(playerid, cMenu, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", "{778899}Editar Texto: {00FF00}Meu Cronometro:\n{778899}Editar Texto: {00FF00}00:00:00\n{778899}Editar Texto: {00FF00}Bordas\n{0000FF} Prй-Visualizar", "Editar", "Cancelar");
VisualAtivado[playerid] = true;
}
else if(VisualAtivado[playerid] == true)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
ShowPlayerDialog(playerid, cMenu, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", "{778899}Editar Texto: {00FF00}Meu Cronometro:\n{778899}Editar Texto: {00FF00}00:00:00\n{778899}Editar Texto: {00FF00}Bordas\n{0000FF} Prй-Visualizar", "Editar", "Cancelar");
VisualAtivado[playerid] = false;
}
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
if (dialogid == Text1)
{
if(response)
{
if(listitem == 0)
{
strcat(String, "- Padrгo\n");
strcat(String, "- Branco\n");
strcat(String, "- Preto\n");
strcat(String, "- Azul\n");
strcat(String, "- Verde\n");
strcat(String, "- Rosa\n");
strcat(String, "- Roxo\n");
strcat(String, "- Amarelo\n");
strcat(String, "- Vermelho\n");
strcat(String, "- Cinza\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Editar", "Cancelar");
}
if(listitem == 1)
{
strcat(String, "- Fonte 0\n");
strcat(String, "- Fonte 1\n");
strcat(String, "- Fonte 2\n");
strcat(String, "- Fonte 3\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Editar", "Cancelar");
}
if(listitem == 2)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
ShowPlayerDialog(playerid, cMenu, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", "{778899}Editar Texto: {00FF00}Meu Cronometro:\n{778899}Editar Texto: {00FF00}00:00:00\n{778899}Editar Texto: {00FF00}Bordas\n{0000FF} Prй-Visualizar", "Editar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
if (dialogid == Text2)
{
if(response)
{
if(listitem == 0)
{
strcat(String, "- Padrгo\n");
strcat(String, "- Branco\n");
strcat(String, "- Preto\n");
strcat(String, "- Azul\n");
strcat(String, "- Verde\n");
strcat(String, "- Rosa\n");
strcat(String, "- Roxo\n");
strcat(String, "- Amarelo\n");
strcat(String, "- Vermelho\n");
strcat(String, "- Cinza\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Editar", "Cancelar");
}
if(listitem == 1)
{
strcat(String, "- Fonte 0\n");
strcat(String, "- Fonte 1\n");
strcat(String, "- Fonte 2\n");
strcat(String, "- Fonte 3\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Editar", "Cancelar");
}
if(listitem == 2)
{
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
ShowPlayerDialog(playerid, cMenu, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", "{778899}Editar Texto: {00FF00}Meu Cronometro:\n{778899}Editar Texto: {00FF00}00:00:00\n{778899}Editar Texto: {00FF00}Bordas\n{0000FF} Prй-Visualizar", "Editar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
if (dialogid == Text3)
{
if(response)
{
if(listitem == 0)
{
strcat(String, "- Padrгo\n");
strcat(String, "- Branco\n");
strcat(String, "- Preto\n");
strcat(String, "- Azul\n");
strcat(String, "- Verde\n");
strcat(String, "- Rosa\n");
strcat(String, "- Roxo\n");
strcat(String, "- Amarelo\n");
strcat(String, "- Vermelho\n");
strcat(String, "- Cinza\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Editar", "Cancelar");
}
if(listitem == 1)
{
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
ShowPlayerDialog(playerid, cMenu, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", "{778899}Editar Texto: {00FF00}Meu Cronometro:\n{778899}Editar Texto: {00FF00}00:00:00\n{778899}Editar Texto: {00FF00}Bordas\n{0000FF} Prй-Visualizar", "Editar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
// Texto 1 (Meu Cronometro:)
if (dialogid == tCor1)
{
if(response)
{
if(listitem == 0)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], -589505281);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 1)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Branco);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 2)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Preto);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 3)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Azul);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 4)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Verde);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 5)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Rosa);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 6)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Roxo);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 7)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Amarelo);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 8)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Vermelho);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 9)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawColor(Titulo[playerid], Cinza);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 10)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "- Modificar Fonte\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, Text1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
if (dialogid == tFont1)
{
if(response)
{
if(listitem == 0)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawFont(Titulo[playerid], 0);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 1)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawFont(Titulo[playerid], 1);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 2)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawFont(Titulo[playerid], 2);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 3)
{
format(String, sizeof(String), "Meu Cronometro:");
TextDrawFont(Titulo[playerid], 3);
TextDrawSetString(Titulo[playerid], String);
TextDrawShowForPlayer(playerid, Titulo[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 4)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "- Modificar Fonte\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, Text1, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
// Texto 2 (00:00:00)
if (dialogid == tCor2)
{
if(response)
{
if(listitem == 0)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], 16711935);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 1)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Branco);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 2)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Preto);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 3)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Azul);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 4)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Verde);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 5)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Rosa);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 6)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Roxo);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 7)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Amarelo);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 8)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Vermelho);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 9)
{
format(String, sizeof(String), "00:00:00");
TextDrawColor(Cronometro[playerid], Cinza);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Padrгo\n");
strcat(String2, "- Branco\n");
strcat(String2, "- Preto\n");
strcat(String2, "- Azul\n");
strcat(String2, "- Verde\n");
strcat(String2, "- Rosa\n");
strcat(String2, "- Roxo\n");
strcat(String2, "- Amarelo\n");
strcat(String2, "- Vermelho\n");
strcat(String2, "- Cinza\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 10)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "- Modificar Fonte\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, Text2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
if (dialogid == tFont2)
{
if(response)
{
if(listitem == 0)
{
format(String, sizeof(String), "00:00:00");
TextDrawFont(Cronometro[playerid], 0);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 1)
{
format(String, sizeof(String), "00:00:00");
TextDrawFont(Cronometro[playerid], 1);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 2)
{
format(String, sizeof(String), "00:00:00");
TextDrawFont(Cronometro[playerid], 2);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 3)
{
format(String, sizeof(String), "00:00:00");
TextDrawFont(Cronometro[playerid], 3);
TextDrawSetString(Cronometro[playerid], String);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
strcat(String2, "- Fonte 0\n");
strcat(String2, "- Fonte 1\n");
strcat(String2, "- Fonte 2\n");
strcat(String2, "- Fonte 3\n");
strcat(String2, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tFont2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String2, "Editar", "Cancelar");
}
if(listitem == 4)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "- Modificar Fonte\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, Text2, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
// Texto 3 (Bordas)
if (dialogid == tCor3)
{
new String3[10], String4[10], String5[500];
if(response)
{
if(listitem == 0)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], 16711935);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], 16711935);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], 16711935);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], 16711935);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 1)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Branco);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Branco);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Branco);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Branco);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 2)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Preto);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Preto);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Preto);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Preto);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 3)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Azul);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Azul);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Azul);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Azul);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 4)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Verde);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Verde);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Verde);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Verde);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 5)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Rosa);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Rosa);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Rosa);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Rosa);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 6)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Roxo);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Roxo);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Roxo);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Roxo);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 7)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Amarelo);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Amarelo);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Amarelo);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Amarelo);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 8)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Vermelho);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Vermelho);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Vermelho);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Vermelho);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 9)
{
format(String, sizeof(String), "-");
TextDrawColor(Borda1[playerid], Cinza);
format(String2, sizeof(String2), "-");
TextDrawColor(Borda2[playerid], Cinza);
format(String3, sizeof(String3), "I");
TextDrawColor(Borda3[playerid], Cinza);
format(String4, sizeof(String4), "I");
TextDrawColor(Borda4[playerid], Cinza);
TextDrawSetString(Borda1[playerid], String);
TextDrawSetString(Borda2[playerid], String2);
TextDrawSetString(Borda3[playerid], String3);
TextDrawSetString(Borda4[playerid], String4);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
strcat(String5, "- Padrгo\n");
strcat(String5, "- Branco\n");
strcat(String5, "- Preto\n");
strcat(String5, "- Azul\n");
strcat(String5, "- Verde\n");
strcat(String5, "- Rosa\n");
strcat(String5, "- Roxo\n");
strcat(String5, "- Amarelo\n");
strcat(String5, "- Vermelho\n");
strcat(String5, "- Cinza\n");
strcat(String5, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, tCor3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String5, "Editar", "Cancelar");
}
if(listitem == 10)
{
strcat(String, "- Modificar Cor\n");
strcat(String, "{FF0000}< Voltar");
ShowPlayerDialog(playerid, Text3, DIALOG_STYLE_LIST, "rCronometro Pessoal {EDITAR}", String, "Selecionar", "Cancelar");
}
}
if(!response)
{
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
VisualAtivado[playerid] = false;
}
}
if (dialogid == rTempo)
{
if(response)
{
format(String, sizeof(String), "[rINFO] O cronometro de, %s, parou em %02d:%02d:%02d.", pNome(playerid), pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
SendClientMessageToAll(Vermelho, String);
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
TeclaAtivada[playerid] = false;
}
if(!response)
{
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
TeclaAtivada[playerid] = false;
SendClientMessage(playerid, Verde, "[rINFO] Vocк nгo quis mostrar o resultado do seu cronometro para ninguйm.");
}
}
return 0;
}
forward AtualizarCronometro(playerid);
public AtualizarCronometro(playerid)
{
new String[100];
pSegundos[playerid] += 1;
format(String, sizeof(String), "%02d:%02d:%02d", pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
TextDrawSetString(Cronometro[playerid], String);
if(pSegundos[playerid] == 60)
{
pMinutos[playerid] += 1;
pSegundos[playerid] = 0;
format(String, sizeof(String), "%02d:%02d:%02d", pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
TextDrawSetString(Cronometro[playerid], String);
}
if(pMinutos[playerid] == 60 && pSegundos[playerid] == 60)
{
pHoras[playerid] += 1;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
format(String, sizeof(String), "%02d:%02d:%02d", pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
TextDrawSetString(Cronometro[playerid], String);
}
if(pHoras[playerid] == 99 && pMinutos[playerid] == 60 && pSegundos[playerid] == 60)
{
SendClientMessage(playerid, Vermelho, "[rAVISO] Se passaram 99 horas, e o cronometro foi resetado.");
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
KillTimer(croTemp[playerid]);
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
cAtivado[playerid] = false;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/preparar", true) == 0)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[0][0], CheckPoints[0][1], CheckPoints[0][2], CheckPoints[1][0], CheckPoints[1][1], CheckPoints[1][2], 10);
Trocar[playerid] = 1;
return 1;
}
}
}
return 0;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
switch(Trocar[playerid])
{
case 1:
{
new String[128];
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
cAtivado[playerid] = true;
TextDrawShowForPlayer(playerid, Titulo[playerid]);
TextDrawShowForPlayer(playerid, Cronometro[playerid]);
TextDrawShowForPlayer(playerid, Borda1[playerid]);
TextDrawShowForPlayer(playerid, Borda2[playerid]);
TextDrawShowForPlayer(playerid, Borda3[playerid]);
TextDrawShowForPlayer(playerid, Borda4[playerid]);
croTemp[playerid] = SetTimerEx("AtualizarCronometro", 1000, true, "d", playerid);
SendClientMessage(playerid, 0x16EB43FF, "Voce comeзou a correr!!");
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[1][0], CheckPoints[1][1], CheckPoints[1][2], CheckPoints[2][0], CheckPoints[2][1], CheckPoints[2][2], 10);
Trocar[playerid] = 2;
}
case 2:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[2][0], CheckPoints[2][1], CheckPoints[2][2], CheckPoints[3][0], CheckPoints[3][1], CheckPoints[3][2], 10);
Trocar[playerid] = 3;
}
case 3:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[3][0], CheckPoints[3][1], CheckPoints[3][2], CheckPoints[4][0], CheckPoints[4][1], CheckPoints[4][2], 10);
Trocar[playerid] = 4;
}
case 4:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[4][0], CheckPoints[4][1], CheckPoints[4][2], CheckPoints[5][0], CheckPoints[5][1], CheckPoints[5][2], 10);
Trocar[playerid] = 5;
}
case 5:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[5][0], CheckPoints[5][1], CheckPoints[5][2], CheckPoints[6][0], CheckPoints[6][1], CheckPoints[6][2], 10);
Trocar[playerid] = 6;
}
case 6:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[6][0], CheckPoints[6][1], CheckPoints[6][2], CheckPoints[7][0], CheckPoints[7][1], CheckPoints[7][2], 10);
Trocar[playerid] = 7;
}
case 7:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[7][0], CheckPoints[7][1], CheckPoints[7][2], CheckPoints[8][0], CheckPoints[8][1], CheckPoints[8][2], 10);
Trocar[playerid] = 8;
}
case 8:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[8][0], CheckPoints[8][1], CheckPoints[8][2], CheckPoints[9][0], CheckPoints[9][1], CheckPoints[9][2], 10);
Trocar[playerid] = 9;
}
case 9:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[9][0], CheckPoints[9][1], CheckPoints[9][2], CheckPoints[10][0], CheckPoints[10][1], CheckPoints[10][2], 10);
Trocar[playerid] = 10;
}
case 10:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[10][0], CheckPoints[10][1], CheckPoints[10][2],CheckPoints[11][0], CheckPoints[11][1], CheckPoints[11][2], 10);
Trocar[playerid] = 11;
}
case 11:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, CheckPoints[11][0], CheckPoints[11][1], CheckPoints[11][2], END , END, END,10);
Trocar[playerid] = 12;
}
case 12:
{
DisablePlayerRaceCheckpoint(playerid);
new String[128];
KillTimer(croTemp[playerid]);
TextDrawHideForPlayer(playerid, Titulo[playerid]);
TextDrawHideForPlayer(playerid, Cronometro[playerid]);
TextDrawHideForPlayer(playerid, Borda1[playerid]);
TextDrawHideForPlayer(playerid, Borda2[playerid]);
TextDrawHideForPlayer(playerid, Borda3[playerid]);
TextDrawHideForPlayer(playerid, Borda4[playerid]);
format(String, sizeof(String), "[rINFO] O cronometro de, %s, parou em %02d:%02d:%02d.", pNome(playerid), pHoras[playerid], pMinutos[playerid], pSegundos[playerid]);
SendClientMessageToAll(Vermelho, String);
pHoras[playerid] = 0;
pMinutos[playerid] = 0;
pSegundos[playerid] = 0;
}}
return 1;
}
#endif
stock pNome(playerid)
{
new pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, MAX_PLAYER_NAME);
return pnome;
}


