(barra de progresso indica segundos)
(eu ia postar um video mas como ficou muito pesado 400mb '-' eu nao vou upar, e nao deu para deixar menor dava erro)
pawn Code:
//por Axll #include a_samp #include progressold new Text:r_fundo; new Text:r_hora; new Text:r_borda; new Text:r_borda2; new Text:r_borda3; new Bar:r_segundos; public OnGameModeInit() { r_segundos = CreateProgressBar(548.00, 37.00, 76.50, 7.19, -1048321, 60.0); r_fundo = TextDrawCreate(628.352600, 6.750000, "usebox"); TextDrawLetterSize(r_fundo, 0.000000, 2.988888); TextDrawTextSize(r_fundo, 544.352844, 0.000000); TextDrawAlignment(r_fundo, 1); TextDrawColor(r_fundo, 0); TextDrawUseBox(r_fundo, true); TextDrawBoxColor(r_fundo, 102); TextDrawSetShadow(r_fundo, 0); TextDrawSetOutline(r_fundo, 0); TextDrawFont(r_fundo, 0); r_hora = TextDrawCreate(550.588134, 0.583346, "00:00"); TextDrawLetterSize(r_hora, 0.609529, 3.705832); TextDrawAlignment(r_hora, 1); TextDrawColor(r_hora, -1); TextDrawSetShadow(r_hora, -1); TextDrawSetOutline(r_hora, 0); TextDrawBackgroundColor(r_hora, 51); TextDrawFont(r_hora, 2); TextDrawSetProportional(r_hora, 1); r_borda = TextDrawCreate(546.352966, 1.750000, "LD_SPAC:white"); TextDrawLetterSize(r_borda, 0.000000, 0.000000); TextDrawTextSize(r_borda, 80.470588, 2.916666); TextDrawAlignment(r_borda, 1); TextDrawColor(r_borda, 255); TextDrawSetShadow(r_borda, 0); TextDrawSetOutline(r_borda, 0); TextDrawFont(r_borda, 4); r_borda2 = TextDrawCreate(545.941223, 43.000000, "LD_SPAC:white"); TextDrawLetterSize(r_borda2, 0.000000, 0.000000); TextDrawTextSize(r_borda2, 80.470588, 2.916666); TextDrawAlignment(r_borda2, 1); TextDrawColor(r_borda2, 255); TextDrawSetShadow(r_borda2, 0); TextDrawSetOutline(r_borda2, 0); TextDrawFont(r_borda2, 4); r_borda3 = TextDrawCreate(546.000061, 36.416671, "LD_SPAC:white"); TextDrawLetterSize(r_borda3, 0.000000, 0.000000); TextDrawTextSize(r_borda3, 2.352943, 9.333333); TextDrawAlignment(r_borda3, 1); TextDrawColor(r_borda3, 255); TextDrawSetShadow(r_borda3, 0); TextDrawSetOutline(r_borda3, 0); TextDrawFont(r_borda3, 4); SetTimer("r_atualizar", 500, true); return true; } public OnPlayerSpawn(playerid) { MostrarRelogio(playerid); return true; } forward r_atualizar(); public r_atualizar() { new string[10], hora, minutos, segundos; gettime(hora, minutos, segundos); format(string, sizeof string, "%02d:%02d", hora, minutos), TextDrawSetString(r_hora, string); SetProgressBarValue(r_segundos, segundos), UpdateProgressBar(r_segundos); } stock MostrarRelogio(playerid) { ShowProgressBarForPlayer(playerid, r_segundos); TextDrawShowForPlayer(playerid, r_fundo); TextDrawShowForPlayer(playerid, r_hora); TextDrawShowForPlayer(playerid, r_borda); TextDrawShowForPlayer(playerid, r_borda2); TextDrawShowForPlayer(playerid, r_borda3); return true; }
0 comentários:
Postar um comentário