3dlabel doesnt show
#1

Why does this not work?

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
    {
        new PausedSeconds = gettime()-PauseTime[i], string[50];
        if(PausedSeconds > 2) // 5
        if(PausedSeconds > 60) // check if it's above 1 minute.
        {
            format(string, sizeof(string), ""COL_YELLOW"Paused for (%d) minutes\n|\nV\n", SecondsToMinutes(PausedSeconds));
            Update3DTextLabelText(masklabel[i], GREY, string);
            masklabel[i] = Create3DTextLabel(""COL_YELLOW"Paused for (%d) minutes\n|\nV\n", GREY, -1.0, -1.0, -1.0, -1.0, 0, SecondsToMinutes(PausedSeconds));
            Attach3DTextLabelToPlayer(masklabel[i], i, 0.0, 0.0, 0.7);
        }
        else if(PausedSeconds < 60 && PausedSeconds > 0) // checks if it's below 1 minute but above 0 seconds.
        {
            format(string, sizeof(string), ""COL_YELLOW"Paused for (%d) seconds\n|\nV\n", PausedSeconds);
            Update3DTextLabelText(masklabel[i], GREY, string);
            masklabel[i] = Create3DTextLabel(""COL_YELLOW"Paused for (%d) seconds\n|\nV\n", GREY, -1.0, -1.0, -1.0, -1.0, 0, PausedSeconds);
            Attach3DTextLabelToPlayer(masklabel[i], i, 0.0, 0.0, 0.7);
        }
    }
Reply
#2

PHP код:
Attach3DTextLabelToPlayer(masklabel[i], i0.00.00.7); 
You didn't attach the label on the player position.

PHP код:
new Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
Attach3DTextLabelToPlayer(masklabel[i], ixyz); 
Reply
#3

Does this even compile
Код:
for(new i=0; i<MAX_PLAYERS; i++)
    {
	    new PausedSeconds = gettime()-PauseTime[i], string[50];
		if(PausedSeconds > 2) // 5
        if(PausedSeconds > 60) // check if it's above 1 minute.
        {
            format(string, sizeof(string), ""COL_YELLOW"Paused for (%d) minutes\n|\nV\n", SecondsToMinutes(PausedSeconds));
		    Update3DTextLabelText(masklabel[i], GREY, string);
		    masklabel[i] = Create3DTextLabel(""COL_YELLOW"Paused for (%d) minutes\n|\nV\n", GREY, -1.0, -1.0, -1.0, -1.0, 0, SecondsToMinutes(PausedSeconds));
		    Attach3DTextLabelToPlayer(masklabel[i], i, 0.0, 0.0, 0.7);
        }
        else if(PausedSeconds < 60 && PausedSeconds > 0) // checks if it's below 1 minute but above 0 seconds.
        {
            format(string, sizeof(string), ""COL_YELLOW"Paused for (%d) seconds\n|\nV\n", PausedSeconds);
		    Update3DTextLabelText(masklabel[i], GREY, string);
		    masklabel[i] = Create3DTextLabel(""COL_YELLOW"Paused for (%d) seconds\n|\nV\n", GREY, -1.0, -1.0, -1.0, -1.0, 0, PausedSeconds);
		    Attach3DTextLabelToPlayer(masklabel[i], i, 0.0, 0.0, 0.7);
        }
	}
That highlighted part doesn't have a starting brace.
Reply
#4

Quote:
Originally Posted by oMa37
Посмотреть сообщение
PHP код:
Attach3DTextLabelToPlayer(masklabel[i], i0.00.00.7); 
You didn't attach the label on the player position.

PHP код:
new Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
Attach3DTextLabelToPlayer(masklabel[i], ixyz); 
This is so wrong, you're now placing the label 2x radius of the player.
Reply
#5

Anyone know how to fix this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)