Hallo
Ich habe ein Textdraw Problem
wenn ich 20 Minuten am Zocken bin verschwindet komischer weise Mein Tacho und wird auch nicht mehr angezeigt
Ich habe den Im Sekundentimer drin und ich weiß nicht wiso der dauernt verschwindet
Hier mal mein Code
forward onSecond();
public onSecond()
{
new sendstr[128],colorstr[128],vid,speed,tank14;
for(new i; i < MAX_PLAYERS; i++)
{
format(sendstr,sizeof sendstr,"");
format(colorstr,sizeof sendstr,"~w~");
new Float:xg,Float:yg,Float:zg;
new Float:distance,value;
GetPlayerPos(i,xg,yg,zg);
distance = floatsqroot(floatpower(floatabs(floatsub(xg,SavedPOSx[i])),2)+floatpower(floatabs(floatsub(yg,SavedPOSy[i])),2)+floatpower(floatabs(floatsub(zg,SavedPOSz[i])),2));
value = floatround(distance * 11000);
SavedPOSx[i] = xg;
SavedPOSy[i] = yg;
SavedPOSz[i] = zg;
speed=floatround(value/3200);
if(IsPlayerInAnyVehicle(i))
{
vid=GetPlayerVehicleID(i);
if(GetPlayerState(i)==PLAYER_STATE_DRIVER)
{
if(speed>20)xTank[vid]--;
if(speed>50)xTank[vid]--;
if(speed>80)xTank[vid]--;
if(speed>110)xTank[vid]--;
}
tank14=1;
if(vTank(vid)>7)tank14=2;
if(vTank(vid)>14)tank14=3;
if(vTank(vid)>21)tank14=4;
if(vTank(vid)>28)tank14=5;
if(vTank(vid)>35)tank14=6;
if(vTank(vid)>42)tank14=7;
if(vTank(vid)>49)tank14=8;
if(vTank(vid)>56)tank14=9;
if(vTank(vid)>63)tank14=10;
if(vTank(vid)>70)tank14=11;
if(vTank(vid)>77)tank14=12;
if(vTank(vid)>84)tank14=13;
if(vTank(vid)>92)tank14=14;
for(new x;x<tank14;x++)
{
format(sendstr,sizeof sendstr,"%sI",sendstr);
}
switch(tank14)
{
case 0,1,2:format(colorstr,sizeof colorstr,"~r~");
case 3,4,5:format(colorstr,sizeof colorstr,"~p~");
case 6,7,8,9:format(colorstr,sizeof colorstr,"~y~");
case 10,11:format(colorstr,sizeof colorstr,"~b~");
case 12,13,14:format(colorstr,sizeof colorstr,"~g~");
}
format(sendstr,sizeof sendstr,"%d Km/h~n~%s%s",speed,colorstr,sendstr);
TextDrawSetString(kmh[i],sendstr);
if(GetPlayerVehicleSeat(i)==0)TextDrawShowForPlayer(i,kmh[i]);
if(xTank[vid]<12&&GetPlayerState(i)==PLAYER_STATE_DRIVER&&!noTank[i])
{
new engine,lights,alarm,doors,bonnet,boot,objective;
#pragma unused engine
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Motor[vid] = 0;
Tank[vid]=0;
SendClientMessage(i,cYellow,"[Benzin alle]");
noTank[i]=1;
}
}
else
{
TextDrawHideForPlayer(i,kmh[i]);
}
}
Ich hoffe, das ihr helfen könnt
MFG
(h)antoine