[Help] UpdatePlayer3DTextLabelText - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] UpdatePlayer3DTextLabelText (
/showthread.php?tid=121716)
[Help] UpdatePlayer3DTextLabelText -
zilvernex - 18.01.2010
HI, I'm trying to make the text label in top of my head update but I can't. I'm not sure what I'm doing wrong but the text wont update. I tried everything but no luck. Here's what I got..
This creates the text label. (it works)
pawn Код:
dcmd_test(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "empty..");
new string[128];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
textlabel[playerid] = PlayerText3D:Create3DTextLabel(params, green, x, y, z, 40.0, 0, 0);
Attach3DTextLabelToPlayer(Text3D:textlabel[playerid], playerid, 0.0, 0.0, 0.3);
return 1;
}
The update. (not working)
pawn Код:
dcmd_update(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "empty..");
UpdatePlayer3DTextLabelText(playerid, textlabel[playerid], yellow, params);
return 1;
}
I also did it like this
UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textlabel[playerid], yellow, params); Like the wiki (
https://sampwiki.blast.hk/wiki/UpdatePlayer3DTextLabelText) but it doesn't work.
Thank you in advance for any help.
Re: [Help] UpdatePlayer3DTextLabelText -
bogeymanEST - 18.01.2010
Try this:
pawn Код:
dcmd_test(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "empty..");
new string[128];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
textlabel[playerid] = Create3DTextLabel(params, green, x, y, z, 40.0, 0, 0);
Attach3DTextLabelToPlayer(textlabel[playerid], playerid, 0.0, 0.0, 0.3);
return 1;
}
Re: [Help] UpdatePlayer3DTextLabelText -
zilvernex - 19.01.2010
Quote:
|
Originally Posted by bogeyman_EST
Try this:
pawn Код:
dcmd_test(playerid,params[]) { if(!strlen(params)) return SendClientMessage(playerid, red, "empty.."); new string[128]; new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); textlabel[playerid] = Create3DTextLabel(params, green, x, y, z, 40.0, 0, 0); Attach3DTextLabelToPlayer(textlabel[playerid], playerid, 0.0, 0.0, 0.3); return 1; }
|
That doesn't work, you just copy the same thing I had but removed Text3D: from it, and that will not even work. If I do what you did it (with the working code) will just create a text in top of the text I already had. That's why I want/need to use UpdatePlayer3DTextLabelText.
Re: [Help] UpdatePlayer3DTextLabelText -
zilvernex - 20.01.2010
I'm still with the same problem. Help please.
Re: [Help] UpdatePlayer3DTextLabelText -
MadeMan - 20.01.2010
pawn Код:
Update3DTextLabelText(textlabel[playerid], yellow, params);