Textdraws disappears
#1

Hi, i have a problem with textraws for players [MAX_PLAYERS] . don't work, or if are working, it's disappear after a while. were it's the problem? i tried many filterscripts, i have included in gamemode but don't working good.
Reply
#2

mind showing the code. also did you add textdrawshowforplayer
Reply
#3

The problem is you didn't even post any code of the problem.
Reply
#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
#5

Up, the problem can be the hight ping ?
Reply
#6

....

Post them under "ON PLAYER CONNECT"
then they should work.
Reply
#7

Quote:
Originally Posted by Stefand
Посмотреть сообщение
....

Post them under "ON PLAYER CONNECT"
then they should work.
hmm but i need a timer..
Reply
#8

If a Textdraw disappear without a reason the cause can be a conflict of id.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)