Hi Leute ich finde den Fehler nicht:
new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
Fehler:
Tag Mismatch?
- Phi
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
Schreib mal den ganzen code.
oder probiere es:
new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(playerid));
-
new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(playerid));
Kann nichts bringen, da er es (vermutlich) in einer Schleife aufruft, somit dürfte es nur ein paar Errors mehr bescheren, aber auch nicht mehr.BTT: Bitte poste je 5 Zeilen davor und 5 Zeilen danach, dann kann man auch eher helfen.
-
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(TextDrawsShown[i] == false)
{
TextDrawShowForPlayer(i, Text:Black0);
TextDrawShowForPlayer(i, Text:White1);
TextDrawShowForPlayer(i, Text:White2);
TextDrawShowForPlayer(i, Text:BlackHealth);
TextDrawShowForPlayer(i, Text:DarkRedHealth);
TextDrawShowForPlayer(i, Text:BlackSpeed);
TextDrawShowForPlayer(i, Text:DarkYellowSpeed);
TextDrawShowForPlayer(i, Text:Marker);
TextDrawsShown[i] = true;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
new String[128];
new Float:Speed;
// new Float:X, Float:Y, Float:Z, Float:Speed;
// GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 100.0);
new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
PlayerVehicleModelID -= 400;
format(String,sizeof(String),"~b~Auto:~n~~w~%s~n~~b~Zustand:~n~~n~Geschwindigkeit:~n~~w~%ikm/h", PlayerVehicle[PlayerVehicleModelID],floatround(Speed, floatround_floor));
if(VHSCreated[i] == true)
{
TextDrawDestroy(VHS[i]);
}
VHS[i] = TextDrawCreate(485.000000,355.000000,String);
TextDrawAlignment(VHS[i],0);
TextDrawBackgroundColor(VHS[i],0x000000ff);
TextDrawFont(VHS[i],1);
TextDrawLetterSize(VHS[i],0.299999,1.000000);
TextDrawColor(VHS[i],0xffffffff);
TextDrawSetOutline(VHS[i],1);
TextDrawSetProportional(VHS[i],1);
TextDrawSetShadow(VHS[i],1);
TextDrawShowForPlayer(i, VHS[i]);
VHSCreated[i] = true;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
new Float:CarHealth;
GetVehicleHealth(GetPlayerVehicleID(i), CarHealth);
if(LightRedHealthCreated[i] == true)
{
TextDrawDestroy(LightRedHealth[i]);
}
LightRedHealth[i] = TextDrawCreate(488.000000,386.000000,"_");
TextDrawUseBox(LightRedHealth[i],1);
TextDrawBoxColor(LightRedHealth[i],0xff000099);
TextDrawTextSize(LightRedHealth[i], floatadd(484.0, floatdiv(CarHealth, 9.5238095238)),0.000000);
TextDrawAlignment(LightRedHealth[i],0);
TextDrawBackgroundColor(LightRedHealth[i],0x000000ff);
TextDrawFont(LightRedHealth[i],3);
TextDrawLetterSize(LightRedHealth[i],1.000000,0.199999);
TextDrawColor(LightRedHealth[i],0xffffffff);
TextDrawSetOutline(LightRedHealth[i],1);
TextDrawSetProportional(LightRedHealth[i],1);
TextDrawSetShadow(LightRedHealth[i],1);
TextDrawShowForPlayer(i, LightRedHealth[i]);
LightRedHealthCreated[i] = true;
if(CarHealth < 250)
{
if(ExclamationShown[i] == true)
{
TextDrawHideForPlayer(i, Text:Exclamation);
ExclamationShown[i] = false;
}
else
{
TextDrawShowForPlayer(i, Text:Exclamation);
ExclamationShown[i] = true;
}
}
else if(CarHealth > 250)
{
if(ExclamationShown[i] == true)
{
TextDrawHideForPlayer(i, Text:Exclamation);
ExclamationShown[i] = false;
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(LightYellowSpeedCreated[i] == true)
{
TextDrawDestroy(LightYellowSpeed[i]);
}
LightYellowSpeed[i] = TextDrawCreate(537.000000,404.000000,"_");
TextDrawUseBox(LightYellowSpeed[i],1);
TextDrawBoxColor(LightYellowSpeed[i],0xffff0066);
if(Speed >= 150)
{
TextDrawTextSize(LightYellowSpeed[i],589.000000,0.000000);
}
else
{
TextDrawTextSize(LightYellowSpeed[i], floatadd(533.0, floatmul(Speed, 0.373333333333)),0.000000);
}
TextDrawAlignment(LightYellowSpeed[i],0);
TextDrawBackgroundColor(LightYellowSpeed[i],0x000000ff);
TextDrawFont(LightYellowSpeed[i],3);
TextDrawLetterSize(LightYellowSpeed[i],1.000000,1.200000);
TextDrawColor(LightYellowSpeed[i],0xffffffff);
TextDrawSetOutline(LightYellowSpeed[i],1);
TextDrawSetProportional(LightYellowSpeed[i],1);
TextDrawSetShadow(LightYellowSpeed[i],1);
TextDrawShowForPlayer(i, LightYellowSpeed[i]);
LightYellowSpeedCreated[i] = true;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
else
{
if(TextDrawsShown[i] == true)
{
TextDrawHideForPlayer(i, Text:Black0);
TextDrawHideForPlayer(i, Text:White1);
TextDrawHideForPlayer(i, Text:White2);
TextDrawHideForPlayer(i, Text:BlackHealth);
TextDrawHideForPlayer(i, Text:DarkRedHealth);
TextDrawHideForPlayer(i, Text:BlackSpeed);
TextDrawHideForPlayer(i, Text:DarkYellowSpeed);
TextDrawHideForPlayer(i, Text:Marker);
TextDrawHideForPlayer(i, Text:Exclamation);
TextDrawsShown[i] = false;
}
TextDrawHideForPlayer(i, Text:VHS[i]);
TextDrawHideForPlayer(i, Text:LightRedHealth[i]);
TextDrawHideForPlayer(i, Text:LightYellowSpeed[i]);
}
}
}
return 1;
}
das ist es -
breadfish.de
Hat das Thema geschlossen.