SA-MP Forums Archive
3dlabel doesnt show - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3dlabel doesnt show (/showthread.php?tid=612249)



3dlabel doesnt show - MayaEU - 15.07.2016

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);
        }
    }



Re: 3dlabel doesnt show - oMa37 - 15.07.2016

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); 



Re: 3dlabel doesnt show - Gammix - 15.07.2016

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.


Re: 3dlabel doesnt show - Luicy. - 15.07.2016

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.


Re: 3dlabel doesnt show - MayaEU - 16.07.2016

Anyone know how to fix this?