Speedo PreviewModel problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Speedo PreviewModel problem (
/showthread.php?tid=565419)
Speedo PreviewModel problem -
ilepopivanov - 27.02.2015
I made speedo. And add preview model for Vehicle Models. Now when I enter into vehicle speedo working but Preview Model always show CJ's skin ( 0 ). Here is image:
http://prntscr.com/6ah57a .. and here is code for update speedo and textdraw
Код:
stock UpdateSpeedo(playerid)
{
new GorivoString[10], BrzinaString[10], InfoString[100];
new vehicleid = GetPlayerVehicleID(playerid);
new Float:vozilosila;
GetVehicleHealth(vehicleid, vozilosila);
PlayerTextDrawSetPreviewModel(playerid, ModelTD[playerid], GetVehicleModel(vehicleid));
format(GorivoString, sizeof(GorivoString), "%d", Gorivo[vehicleid]);
PlayerTextDrawSetString(playerid, GorivoTD[playerid], GorivoString);
format(BrzinaString, sizeof(BrzinaString), "%d", VoziloBrzina(vehicleid));
PlayerTextDrawSetString(playerid, BrzinaTD[playerid], BrzinaString);
format(InfoString, sizeof(InfoString), "~l~%0.0f~n~~h~~g~~h~Registrirano~n~~l~%d", vozilosila, KM[vehicleid]);
PlayerTextDrawSetString(playerid, InfoTD[playerid], InfoString);
}
Код:
ModelTD[playerid] = CreatePlayerTextDraw(playerid, 580.800109, 314.346649, "New Textdraw");
PlayerTextDrawLetterSize(playerid, ModelTD[playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, ModelTD[playerid], 54.399978, 51.519985);
PlayerTextDrawAlignment(playerid, ModelTD[playerid], 1);
PlayerTextDrawColor(playerid, ModelTD[playerid], -1);
PlayerTextDrawUseBox(playerid, ModelTD[playerid], true);
PlayerTextDrawBoxColor(playerid, ModelTD[playerid], 0);
PlayerTextDrawSetShadow(playerid, ModelTD[playerid], 0);
PlayerTextDrawSetOutline(playerid, ModelTD[playerid], 1);
PlayerTextDrawFont(playerid, ModelTD[playerid], 5);
PlayerTextDrawSetProportional(playerid, ModelTD[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, ModelTD[playerid], 0x00000000);