[Ajuda] Coloquei Velocimetro no meu gm e entro no carro e nao aparece
#1

Codigos agora entro no carro e nao aparece
Observe coloquei todas new !
PHP код:
public Velocimetro()
{
    new 
Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
    new 
Float:PlayerSpeedDistance,value;
    new 
Float:Speedo_HP;
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
        {
            
GetPlayerPos(iSpeedo_XSpeedo_YSpeedo_Z);
            
GetPlayerVehicleID(i);
            
GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
            
PlayerSpeedDistance floatsqroot(floatpower(floatabs(floatsub(Speedo_X,SavePlayerPosV[i][sX])),2)+floatpower(floatabs(floatsub(Speedo_Y,SavePlayerPosV[i][sY])),2)+floatpower(floatabs(floatsub(Speedo_Z,SavePlayerPosV[i][sZ])),2));
            
value floatround(PlayerSpeedDistance 5000);
            new 
vehicle GetPlayerVehicleID(i);
            new 
str1[256],str2[256],str3[256],str4[256];
            if(
SpeedoON[i] == 0)
            {
                
TextDrawShowForPlayer(ibox[i]);
                
//TextDrawShowForPlayer(i, tacho[i]);
                
TextDrawShowForPlayer(ifahrzeug[i]);
                
TextDrawShowForPlayer(ikmh[i]);
                
TextDrawShowForPlayer(ihoehe[i]);
                
TextDrawShowForPlayer(izustand[i]);
                
TextDrawHideForPlayer(iforum[i]);
            }
            new 
kmh_anzahl floatround(value/1600);
            
format(str1,sizeof(str1),"~d~ Veiculo: ~p~%s            ~n~~n~~n~        ~g~|~y~|~b~|~w~www.~g~brasil~y~style~b~city~w~.com~g~|~y~|~b~|",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
            
TextDrawSetString(fahrzeug[i], str1);
            if(
kmh_anzahl >= 150)
            {
                
format(str2,sizeof(str2),"~d~ KM/H: ~g~%d",kmh_anzahl);
                
TextDrawSetString(kmh[i], str2);
            }
            else if(
kmh_anzahl >= 100)
            {
                
format(str2,sizeof(str2),"~d~ KM/H: ~g~%d",kmh_anzahl);
                
TextDrawSetString(kmh[i], str2);
            }
            else if(
kmh_anzahl >= 50)
            {
                
format(str2,sizeof(str2),"~d~ KM/H: ~g~%d",kmh_anzahl);
                
TextDrawSetString(kmh[i], str2);
            }
            else
            {
                
format(str2,sizeof(str2),"~d~ KM/H: ~g~%d",kmh_anzahl);
                
TextDrawSetString(kmh[i], str2);
            }
            
format(str3,sizeof(str3),"~d~ Combustivel: ~p~%d%"Gas[vehicle]);
            
TextDrawSetString(hoehe[i], str3);
            if(
Speedo_HP >= 551)
            {
                
format(str4,sizeof(str4),"~d~ Lataria: ~y~%0.0f%%"Speedo_HP/10);
                
TextDrawSetString(zustand[i], str4);
            }
            else if(
Speedo_HP >= 361)
            {
                
format(str4,sizeof(str4),"~d~ Lataria: ~y~%0.0f%%"Speedo_HP/10);
                
TextDrawSetString(zustand[i], str4);
            }
            else if(
Speedo_HP >= 250)
            {
                
format(str4,sizeof(str4),"~d~ Lataria: ~y~%0.0f%%"Speedo_HP/10);
                
TextDrawSetString(zustand[i], str4);
            }
            else
            {
                
format(str4,sizeof(str4),"~d~ Lataria: ~y~%0.0f%%"Speedo_HP/10);
                
TextDrawSetString(zustand[i], str4);
            }
        }
        
SavePlayerPosV[i][sX] = Speedo_XSavePlayerPosV[i][sY] = Speedo_YSavePlayerPosV[i][sZ] = Speedo_Z;
    }
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(!
IsPlayerInAnyVehicle(i))
        {
            
TextDrawHideForPlayer(ibox[i]); TextDrawHideForPlayer(ifahrzeug[i]); TextDrawHideForPlayer(ikmh[i]);
            
TextDrawHideForPlayer(ihoehe[i]); TextDrawHideForPlayer(izustand[i]);TextDrawShowForPlayer(iforum[i]);
            
SpeedoON[i] = 0;
        }
    }

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)