22.05.2017, 06:50
You have to change it to
Put this under OnPlayerConnect:
And use the code below to show or hide it.
To destroy it use:
Код:
new PlayerText:vSpeedBox;
Код:
vSpeedBox = CreatePlayerTextDraw(540.666259, 418.637756, "0"); PlayerTextDrawLetterSize(vSpeedBox, 0.000000, -3.155556); PlayerTextDrawTextSize(vSpeedBox, 649.999572, 0.000000); PlayerTextDrawAlignment(vSpeedBox, 1); PlayerTextDrawColor(vSpeedBox, 0); PlayerTextDrawUseBox(vSpeedBox, true); PlayerTextDrawBoxColor(vSpeedBox, 102); PlayerTextDrawSetShadow(vSpeedBox, 0); PlayerTextDrawSetOutline(vSpeedBox, 0); PlayerTextDrawFont(vSpeedBox, 2);
Код:
forward speedinfotd(playerid); public speedinfotd(playerid) { new String [ 30 ]; new Float:X; new Float:Y; new Float:Z; GetVehicleVelocity(GetPlayerVehicleID(playerid),X,Y,Z); format(String,150,"~W~~Y~%d",floatround(floatsqroot(X * X + Y * Y + Z * Z) * 200.0000)); PlayerTextDrawSetString(playerid, vSpeedBox, String); return 1; }
Код:
PlayerTextDrawShow(playerid, vSpeedBox); PlayerTextDrawHide(playerid, vSpeedBox);
Код:
PlayerTextDrawDestroy(playerid, vSpeedBox);