Textdraws disappears
#4

the fuel bar dissapear too.

Код:
public OnPlayerUpdate(playerid)
{
        new
            Float:fPos[3],
            Float:Pos[4][2],
            Float:fSpeed;

        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
                GetVehicleVelocity(GetPlayerVehicleID(playerid), fPos[0], fPos[1], fPos[2]);

                fSpeed = floatsqroot(floatpower(fPos[0], 2) + floatpower(fPos[1], 2) +
                 floatpower(fPos[2], 2)) * 200;

                new Float:alpha = 320 - fSpeed;
                if(alpha < 60)
                    alpha = 60;

                for(new i; i < 4; i++)
                {
                        TextDrawHideForPlayer(playerid, TextDrawsd[playerid][i]);
                        TextDrawDestroy(TextDrawsd[playerid][i]);
                        GetDotXY(548, 401, Pos[i][0], Pos[i][1], alpha, (i + 1) * 8);
                        TextDrawsd[playerid][i] = TextDrawCreate(Pos[i][0], Pos[i][1], "~b~.");
                        TextDrawLetterSize(TextDrawsd[playerid][i], 0.73, -2.60);
                        TextDrawSetOutline(TextDrawsd[playerid][i], 0);
                        TextDrawSetShadow(TextDrawsd[playerid][i], 1);
                        TextDrawShowForPlayer(playerid, TextDrawsd[playerid][i]);
                }
                new szString[128];
			    TextDrawHideForPlayer(playerid, GPSText[playerid]);
                TextDrawDestroy(GPSText[playerid]);
   			    format(szString, 128, "%s", GetPlayerArea(playerid));
         		GPSText[playerid] = TextDrawCreate(507.000000, 423.000000, szString);
         		TextDrawBackgroundColor(GPSText[playerid], 255);
         		TextDrawFont(GPSText[playerid], 1);
         		TextDrawLetterSize(GPSText[playerid], 0.320000, 1.500000);
         		TextDrawColor(GPSText[playerid], -16776961);
         		TextDrawSetOutline(GPSText[playerid], 0);
         		TextDrawSetProportional(GPSText[playerid], 1);
         		TextDrawSetShadow(GPSText[playerid], 1);
                TextDrawShowForPlayer(playerid, GPSText[playerid]);
				// Fuel
                SetProgressBarValue(GasBar[playerid], Gas[GetPlayerVehicleID(playerid)]);
                UpdateProgressBar(GasBar[playerid], playerid);
		}
        return 1;
}
Reply


Messages In This Thread
Textdraws disappears - by Danyels - 06.06.2013, 18:57
Re: Textdraws disappears - by OpticKiller - 06.06.2013, 18:58
Re: Textdraws disappears - by Pottus - 06.06.2013, 18:58
Re: Textdraws disappears - by Danyels - 08.06.2013, 10:56
Re: Textdraws disappears - by Danyels - 09.06.2013, 06:22
Re: Textdraws disappears - by Stefand - 09.06.2013, 07:04
Re: Textdraws disappears - by Danyels - 12.06.2013, 20:06
Re: Textdraws disappears - by ReVo_ - 12.06.2013, 22:50

Forum Jump:


Users browsing this thread: 1 Guest(s)