Guten Tag
Und zwar habe ich das Tutorial Tacho erstellen von McBastard112 nach gemacht, nur ist dieser nicht sehr genau und daher meine frage was muss ich machen das dieser flüssig ist?
Hier der Code
new Text:Tacho[MAX_PLAYERS];
new Float:X1[MAX_PLAYERS],Float:Y1[MAX_PLAYERS],Float:Z1[MAX_PLAYERS];
new Float:X2[MAX_PLAYERS],Float:Y2[MAX_PLAYERS],Float:Z2[MAX_PLAYERS];
for(new x = 0; x < MAX_PLAYERS; x++)
Tacho[x] = TextDrawCreate(357.0000,340.0000,"Uninteressant");
TextDrawBackgroundColor(Tacho[x],gray);
TextDrawLetterSize(Tacho[x],0.4,1.1);
TextDrawFont(Tacho[x],1);
TextDrawSetShadow(Tacho[x],2);
TextDrawSetOutline(Tacho[x],1);
SetTimer("UpdateTacho",TachoTimer,1);
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsPlayerNPC(i))
new Float:Track,Float:Speed;
new vehid = GetPlayerVehicleID(i);
GetVehiclePos(vehid,X1[i],Y1[i],Z1[i]);
Track = floatsqroot(floatpower(floatabs(floatsub(X1[i],X2[i])),2)+floatpower(floatabs(floatsub(Y1[i],Y2[i])),2)+floatpower(floatabs(floatsub(Z1[i],Z2[i])),2));
Speed = (Track / (TachoTimer / 1000)) * 3.6;
format(string,sizeof(string),"%i KmH",floatround(Speed));
TextDrawSetString(Tacho[i],string);
GetVehiclePos(vehid,X2[i],Y2[i],Z2[i]);
TextDrawShowForPlayer(i,Tacho[i]);
TextDrawHideForPlayer(i,Tacho[i]);
wäre echt nett wenn mir jemand helfen könnte.