SA-MP Forums Archive
Attach 3D text - 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: Attach 3D text (/showthread.php?tid=502087)



Attach 3D text - CroM256 - 22.03.2014

I made command /title in dialog and it's showing your text above your head...It works fine, but when i do /title again it writes new text over old one. I don't know how to delete that old text
Код:
if(response)
{
			new string2[128];
            new Float:x,Float:y,Float:z;
            new Text3D:label = Create3DTextLabel(inputtext, textc[playerid],x,y,z, 40.0, 0, 0);
            GetPlayerPos(playerid,x,y,z); 
			format(string2, sizeof(string2), "%s", inputtext);
            SendClientMessage(playerid,textc[playerid], string2);
            Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7);

}



Re: Attach 3D text - iThePunisher - 22.03.2014

try this
pawn Код:
if(response)
{
        new string2[128];
            new Float:x,Float:y,Float:z;
            new Text3D:label = Create3DTextLabel(inputtext, textc[playerid],x,y,z, 40.0, 0, 0);
            GetPlayerPos(playerid,x,y,z);
            format(string2, sizeof(string2), "%s", inputtext);
            SendClientMessage(playerid,textc[playerid], string2);
            Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7);
}
else
{
            DeletePlayer3DTextLabel(playerid, PlayerText3D:label);

}