Hallo COmmunity,
ich möchte, dass das Tacho weggeht wenn man auf einem Fahrrad ist.
Ich hab zwar ein Code aber er funktioniert net.
if(IsPlayerInVehicle(playerid, 481))
{
TextDrawDestroy(speedo1[playerid]);
TextDrawDestroy(speedo2[playerid]);
TextDrawDestroy(speedo3[playerid]);
TextDrawDestroy(speedo4[playerid]);
}
Tacho weg wenn man aufm Fahrrad ist
- John_Sanclear
- Geschlossen
- Erledigt
In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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
-
-
TextDrawHideForPlayer(playerid, speedo1[playerid]);
TextDrawHideForPlayer(playerid, speedo2[playerid]);
TextDrawHideForPlayer(playerid, speedo3[playerid]);
TextDrawHideForPlayer(playerid, speedo4[playerid]);Da
-
Okey Problem doch nicht gelöst.
if((newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) && oldstate == PLAYER_STATE_ONFOOT)
{
new string[50];
new vid = GetPlayerVehicleID(playerid);
format(string,sizeof(string),"Fahrzeug: ~y~%s",CarName[GetVehicleModel(vid)-400]);
speedo1[playerid] = TextDrawCreate(4.000000,437.000000," ");
TextDrawSetString(speedo1[playerid],string);
TextDrawSetShadow(speedo1[playerid],false);
TextDrawSetOutline(speedo1[playerid],1);
TextDrawLetterSize(speedo1[playerid], 0.280000, 1.000000);
TextDrawSetProportional(speedo1[playerid],1);
TextDrawFont(speedo1[playerid],TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid,speedo1[playerid]);new Float:vh;
GetVehicleHealth(vid,vh);
new h = floatround(vh) / 10;
format(string,sizeof(string),"Schaden: ~y~%d\%",h);
speedo2[playerid] = TextDrawCreate(249.000000,437.000000," ");
TextDrawSetString(speedo2[playerid],string);
TextDrawSetShadow(speedo2[playerid],false);
TextDrawSetOutline(speedo2[playerid],1);
TextDrawLetterSize(speedo2[playerid], 0.280000, 1.000000);
TextDrawSetProportional(speedo2[playerid],1);
TextDrawFont(speedo2[playerid],TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid,speedo2[playerid]);new Float:s = GetPlayerSpeed(playerid);
new ss = floatround(s);
format(string,sizeof(string),"Geschwindigkeit: ~y~~%s~%d km/h",DamageColor(h),ss);
speedo3[playerid] = TextDrawCreate(106.000000,437.000000," ");
TextDrawSetString(speedo3[playerid],string);
TextDrawSetShadow(speedo3[playerid],false);
TextDrawSetOutline(speedo3[playerid],1);
TextDrawLetterSize(speedo3[playerid], 0.280000, 1.000000);
TextDrawSetProportional(speedo3[playerid],1);
TextDrawFont(speedo3[playerid],TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid,speedo3[playerid]);new vehicleid = GetPlayerVehicleID(playerid);
format(string, sizeof(string), "Tank: ~y~~%s~%d\%", FuelColor(vid), Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)));
speedo4[playerid] = TextDrawCreate(336.000000, 437.000000, " ");
TextDrawSetString(speedo4[playerid], string);
TextDrawSetShadow(speedo4[playerid], false);
TextDrawSetOutline(speedo4[playerid], 1);
TextDrawLetterSize(speedo4[playerid], 0.280000, 1.000000);
TextDrawSetProportional(speedo4[playerid], 1);
TextDrawFont(speedo4[playerid], TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid, speedo4[playerid]);new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
PlayerPos[0][playerid] = x;
PlayerPos[1][playerid] = y;
PlayerPos[2][playerid] = z;
}
else if(IsANoTachoVehicle(playerid))
{
TextDrawHideForPlayer(playerid, speedo1[playerid]);
TextDrawHideForPlayer(playerid, speedo2[playerid]);
TextDrawHideForPlayer(playerid, speedo3[playerid]);
TextDrawHideForPlayer(playerid, speedo4[playerid]);
}Das Tacho will einfach nicht weggehen. -.-
-
Mach das mal so:
else
{
TextDrawHideForPlayer(playerid, speedo1[playerid]);
TextDrawHideForPlayer(playerid, speedo2[playerid]);
TextDrawHideForPlayer(playerid, speedo3[playerid]);
TextDrawHideForPlayer(playerid, speedo4[playerid]);
} -
breadfish.de
Hat das Thema geschlossen.