Black box
#1

I put textdraw for speedometer, when sit in the car, a black box appears in the form of textdraw
https://imgur.com/a/1il8pBM
sorry for my bad english
Reply
#2

Show the code we can't guess how to fix it when we don't see code.
Reply
#3

Sorry
pawn Код:
new PlayerText:BRZINOMER[41][MAX_PLAYERS];
pawn Код:
new vozilo = GetPlayerVehicleID(playerid);
    if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
    {
        new string[128];
        if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[40][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[40][playerid]), format(string, sizeof(string), "F: %d%", Fuel[GetPlayerVehicleID(playerid)]), PlayerTextDrawSetString(playerid, BRZINOMER[40][playerid], string);
        if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[39][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[39][playerid]), format(string, sizeof(string), "%d", GetSpeed(playerid)), PlayerTextDrawSetString(playerid, BRZINOMER[39][playerid], string);
        else if(newstate == PLAYER_STATE_DRIVER)
        {
            new newcar = GetPlayerVehicleID(playerid);
            gLastCar[playerid] = newcar;
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
            if(engine == 0 || engine == -1)
            {
                SCM(playerid,SVETLOPLAVA,"Pritisni 2 da upalis vozilo");
                GameTextForPlayer(playerid, "~w~Pritisni ~b~2 ~w~da ~b~upalis ~w~vozilo!", 5000, 3);
            }
            else if(engine == 1)
            {
                SCM(playerid,COLOR_GREEN,"Motor je uspjesno upaljen!");
            }
        }
    }
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
    {
        if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
        {
            new sspeed[50];
            format(sspeed, sizeof(sspeed), "~h~%d", GetSpeed(playerid));
            PlayerTextDrawSetString(playerid, BRZINOMER[39][playerid], sspeed);
            new Float: Pos[4];
            GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
            new keys, ud, lr;
            GetPlayerKeys(playerid, keys, ud, lr);
        }
    }
pawn Код:
BRZINOMER[playerid][39] = CreatePlayerTextDraw(playerid, 604.666381, 377.496368, "222");
    PlayerTextDrawLetterSize(playerid, BRZINOMER[playerid][39], 0.310666, 2.031407);
    PlayerTextDrawAlignment(playerid, BRZINOMER[playerid][39], 3);
    PlayerTextDrawColor(playerid, BRZINOMER[playerid][39], -1);
    PlayerTextDrawSetShadow(playerid, BRZINOMER[playerid][39], 0);
    PlayerTextDrawSetOutline(playerid, BRZINOMER[playerid][39], 1);
    PlayerTextDrawBackgroundColor(playerid, BRZINOMER[playerid][39], 255);
    PlayerTextDrawFont(playerid, BRZINOMER[playerid][39], 2);
    PlayerTextDrawSetProportional(playerid, BRZINOMER[playerid][39], 1);
    PlayerTextDrawSetShadow(playerid, BRZINOMER[playerid][39], 0);

    BRZINOMER[playerid][40] = CreatePlayerTextDraw(playerid, 528.333007, 377.496307, "F:_45%");
    PlayerTextDrawLetterSize(playerid, BRZINOMER[playerid][40], 0.171999, 1.106370);
    PlayerTextDrawAlignment(playerid, BRZINOMER[playerid][40], 1);
    PlayerTextDrawColor(playerid, BRZINOMER[playerid][40], -1);
    PlayerTextDrawSetShadow(playerid, BRZINOMER[playerid][40], 0);
    PlayerTextDrawSetOutline(playerid, BRZINOMER[playerid][40], 1);
    PlayerTextDrawBackgroundColor(playerid, BRZINOMER[playerid][40], 255);
    PlayerTextDrawFont(playerid, BRZINOMER[playerid][40], 2);
    PlayerTextDrawSetProportional(playerid, BRZINOMER[playerid][40], 1);
    PlayerTextDrawSetShadow(playerid, BRZINOMER[playerid][40], 0);
Reply
#4

Help please?
Reply
#5

Bump
Reply
#6

Bump
Reply
#7

Solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)