3d text labels - 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: 3d text labels (
/showthread.php?tid=588708)
3d text labels -
Cheesus - 11.09.2015
Hello, can i attach one 3DTextLabel to multiple players?
like:
Код:
new Text3D:label = Create3DTextLabel("Example text", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Код:
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
Attach3DTextLabelToPlayer(label, killerid, 0.0, 0.0, 0.7);
Or when i attach it to the next player the first one gets deleted?
Re: 3d text labels -
J0sh... - 11.09.2015
You could do new Text3D:label[MAX_PLAYERS];
Then onconnect
label[playerid] = Create3DTextLabel("Example text", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
Not sure though.
Re: 3d text labels -
Cheesus - 11.09.2015
Thats looks like it should work, ill test it now.
Re: 3d text labels -
jlalt - 11.09.2015
well, why not:
PHP код:
new Text3D:label[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
label[playerid] = Create3DTextLabel(" ", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Update3DTextLabelText(label[playerid], 0x008080FF, "Example text");
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
Update3DTextLabelText(label[killerid], 0x008080FF, "Example text");
Attach3DTextLabelToPlayer(label[killerid], killerid, 0.0, 0.0, 0.7);
return 1;
}
Re: 3d text labels -
Cheesus - 11.09.2015
Thanks a lot guys
+rep
Re: 3d text labels -
Cheesus - 11.09.2015
Btw, is it possible to have wanted stars in 3d text labels, like in gametext?
Re: 3d text labels -
J0sh... - 11.09.2015
Quote:
Originally Posted by Cheesus
Btw, is it possible to have wanted stars in 3d text labels, like in gametext?
|
No, but, you can always do something like:
PHP код:
new tlabel[67];
format(tlabel, 67, "[Wanted Level: %d]", GetWantedLevel(playerid));
Re: 3d text labels -
Cheesus - 11.09.2015
K thanks