#3

The TextDraw have it reset as follows:

Код:
new Text:Reinicio;

Reinicio = TextDrawCreate (233.000000, 346.000000, "");
By placing /reboot:

Код:
TextDrawShowForAll (Reinicio);
Every second is updated if "ServerRestart" is equal to 1:

Код:
format (string, 22, "Restart in: %02d:%02d", tiempito[1], tiempito[2]);
TextDrawSetString (Reinicio, string);
Speedometer:

Код:
enum playerData 
{
        ...,
	PlayerText:pTextdraws[6]
};
Код:
PlayerData[playerid][pTextdraws][2] = CreatePlayerTextDraw(playerid, 511.000000, 376.000000, "");
1000 ms (1 second)

Код:
forward GetVehicleSpeed(vehicleid);
public GetVehicleSpeed(vehicleid)
{
    new Float:X, Float:Y, Float:Z;
    GetVehicleVelocity(vehicleid, X, Y, Z);
    return floatround(floatsqroot(X * X + Y * Y + Z * Z) * 200);
}

velocidad = GetVehicleSpeed(GetPlayerVehicleID(i));

format(string, sizeof(string), "Velocidad:~w~ %0.0fkm", velocidad);
PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][2], string);
No #pragma dynamic 100000 rolls the next (long optimize cells, leaving the fair for every situation, though, do not know why it keeps pulling):

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          29032 bytes
Code size:          3704132 bytes
Data size:          8573192 bytes
Stack/heap size:      16384 bytes; estimated max. usage=64173 cells (256692 bytes)
Total requirements:12322740 bytes
Reply


Messages In This Thread
Help - by Marshall2015 - 03.04.2016, 21:53
Respuesta: Help - by Zume - 03.04.2016, 23:49
Re: Help - by Marshall2015 - 04.04.2016, 01:29

Forum Jump:


Users browsing this thread: 1 Guest(s)