Tengo los news asн:
Код:
// Progressbar
new Bar:OrinaB[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
new Bar:HambreB[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
new Text:Textdraw89; //Reloj
//Necesidades
new Text:Textdraw99; //Skin
new Text:Textdraw88; //Skin
//Velocimetro
new Bar:SpeedBar[MAX_PLAYERS];
new Bar:SpeedBar2[MAX_PLAYERS];
new Text:veloci[MAX_PLAYERS];
new Text:santiago1[MAX_PLAYERS];
new Text:santiago2[MAX_PLAYERS];
new Text:santiago3[MAX_PLAYERS];
new Text:santiago4[MAX_PLAYERS];
new Text:santiago5[MAX_PLAYERS];
new Text:santiago6[MAX_PLAYERS];
new Text:santiago7[MAX_PLAYERS];
En ongamemodeInit tengo :
Primero la barrita negra:
Код:
Textdraw2 = TextDrawCreate(650.000000, 434.000000, "_");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 2.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetShadow(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 255);
TextDrawTextSize(Textdraw2, -21.000000, 0.000000);
TextDrawSetSelectable(Textdraw2, 0);
Y abajo del todo tengo el del velocimetro
Код:
for(new i = 0; i<MAX_PLAYERS; i++) // FUCK OFF SCOTT xD
{
TextTut[i] =
TextDrawCreate(172.000000, 342.000000, "Bienvenido, este servidor es ");
TextDrawBackgroundColor(TextTut[i], 255);
TextDrawFont(TextTut[i], 1);
TextDrawLetterSize(TextTut[i], 0.220000, 1.200000);
TextDrawColor(TextTut[i], -1);
TextDrawSetOutline(TextTut[i], 0);
TextDrawSetProportional(TextTut[i], 1);
TextDrawSetShadow(TextTut[i], 1);
veloci[i] = TextDrawCreate(491.000000, 420.000000, "Velocidad: ~g~%.0f~n~~w~Combustible: ~y~%d");
TextDrawBackgroundColor(veloci[i], 255);
TextDrawFont(veloci[i], 3);
TextDrawLetterSize(veloci[i], 0.440000, 1.400000);
TextDrawColor(veloci[i], -1);
TextDrawSetOutline(veloci[i], 1);
TextDrawSetProportional(veloci[i], 1);
SpeedBar[i] = CreateProgressBar(543.00, 423.00, 85.50, 3.20, 0x0088F5FF, 100.0);
SetProgressBarMaxValue(SpeedBar[i], 200);
SpeedBar2[i] = CreateProgressBar(543.00, 377.00, 85.50, 3.20, 0xFFFF00FF, 100.0);
SetProgressBarMaxValue(SpeedBar2[i], 200);
santiago1[i] = TextDrawCreate(537.000000, 390.000000, "_");
TextDrawBackgroundColor(santiago1[i], 255);
TextDrawFont(santiago1[i], 1);
TextDrawLetterSize(santiago1[i], 0.419999, 4.399998);
TextDrawColor(santiago1[i], -1);
TextDrawSetOutline(santiago1[i], 0);
TextDrawSetProportional(santiago1[i], 1);
TextDrawSetShadow(santiago1[i], 1);
TextDrawUseBox(santiago1[i], 1);
TextDrawBoxColor(santiago1[i], 124);
TextDrawTextSize(santiago1[i], 634.000000, 1.000000);
santiago2[i] = TextDrawCreate(537.000000, 343.000000, "_");
TextDrawBackgroundColor(santiago2[i], 255);
TextDrawFont(santiago2[i], 1);
TextDrawLetterSize(santiago2[i], 0.449999, 4.699998);
TextDrawColor(santiago2[i], -1);
TextDrawSetOutline(santiago2[i], 0);
TextDrawSetProportional(santiago2[i], 1);
TextDrawSetShadow(santiago2[i], 1);
TextDrawUseBox(santiago2[i], 1);
TextDrawBoxColor(santiago2[i], 124);
TextDrawTextSize(santiago2[i], 634.000000, 0.000000);
santiago3[i] = TextDrawCreate(594.000000, 401.000000, "Km/h");
TextDrawBackgroundColor(santiago3[i], 255);
TextDrawFont(santiago3[i], 2);
TextDrawLetterSize(santiago3[i], 0.209998, 1.099998);
TextDrawColor(santiago3[i], 16777215);
TextDrawSetOutline(santiago3[i], 0);
TextDrawSetProportional(santiago3[i], 1);
TextDrawSetShadow(santiago3[i], 2);
santiago4[i] = TextDrawCreate(559.000000, 387.000000, "Velocidad");
TextDrawBackgroundColor(santiago4[i], 255);
TextDrawFont(santiago4[i], 1);
TextDrawLetterSize(santiago4[i], 0.260000, 1.399998);
TextDrawColor(santiago4[i], -1);
TextDrawSetOutline(santiago4[i], 0);
TextDrawSetProportional(santiago4[i], 1);
TextDrawSetShadow(santiago4[i], 2);
santiago5[i] = TextDrawCreate(556.000000, 400.000000, "300");
TextDrawBackgroundColor(santiago5[i], 255);
TextDrawFont(santiago5[i], 2);
TextDrawLetterSize(santiago5[i], 0.469998, 1.899999);
TextDrawColor(santiago5[i], -1);
TextDrawSetOutline(santiago5[i], 0);
TextDrawSetProportional(santiago5[i], 1);
TextDrawSetShadow(santiago5[i], 3);
santiago6[i] = TextDrawCreate(556.000000, 339.000000, "Combustible");
TextDrawBackgroundColor(santiago6[i], 255);
TextDrawFont(santiago6[i], 1);
TextDrawLetterSize(santiago6[i], 0.260000, 1.299996);
TextDrawColor(santiago6[i], -1);
TextDrawSetOutline(santiago6[i], 0);
TextDrawSetProportional(santiago6[i], 1);
TextDrawSetShadow(santiago6[i], 3);
santiago7[i] = TextDrawCreate(554.000000, 353.000000, "30/100");
TextDrawBackgroundColor(santiago7[i], 255);
TextDrawFont(santiago7[i], 2);
TextDrawLetterSize(santiago7[i], 0.419999, 1.899999);
TextDrawColor(santiago7[i], -1);
TextDrawSetOutline(santiago7[i], 0);
TextDrawSetProportional(santiago7[i], 1);
TextDrawSetShadow(santiago7[i], 3);
}
//VELOCIMETRO//
PD: Las barras no las tengo creadas en ongamemodeInit
las tengo en un stock.
Код:
stock MostrarProgress(playerid){
new string[50];
OrinaB[playerid] = CreateProgressBar(450.00, 437.00, 87.50, 6.19, 0x00CFDEFF, 100.0);
ShowProgressBarForPlayer(playerid, OrinaB[playerid]);
SetProgressBarValue(OrinaB[playerid], NInfo[playerid][pOrina]);
UpdateProgressBar(OrinaB[playerid], playerid);
HambreB[playerid] = CreateProgressBar(547.00, 437.00, 81.50, 6.19, 0x00DF75FF, 100.0);
ShowProgressBarForPlayer(playerid, HambreB[playerid]);
SetProgressBarValue(HambreB[playerid], NInfo[playerid][pHambre]);
UpdateProgressBar(HambreB[playerid], playerid);
format(string, sizeof(string), "ORINA: %d%", NInfo[playerid][pOrina]);
PlayerTextDrawSetString(playerid, Textdraw0[playerid], string);
format(string, sizeof(string), "HAMBRE: %d%", NInfo[playerid][pHambre]);
PlayerTextDrawSetString(playerid, Textdraw1[playerid], string);
return 1;
}
stock ActualizarProgress(playerid){
SetProgressBarValue(OrinaB[playerid], NInfo[playerid][pOrina]);
UpdateProgressBar(OrinaB[playerid], playerid);
SetProgressBarValue(HambreB[playerid], NInfo[playerid][pHambre]);
UpdateProgressBar(HambreB[playerid], playerid);
return 1;
}