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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 3D Text Labels (
/showthread.php?tid=180049)
3D Text Labels -
Mr.Jvxmc - 29.09.2010
How i can make 3D Text Labels
I read in sa-mp wiki, but i don't understand please some teach me.
Regards.
Mr.Jvxmc
Re: 3D Text Labels -
Scenario - 29.09.2010
The code below gets some standard information about a player (i.e. their name, ID and score) then displays it above their head. Instead of showing a players health and armor, I show this. It looks 10x better (IMO) and it doesn't allow for meta-gaming. (seeing a players health)
pawn Код:
format(string, sizeof(string), "%s (%d)\n Score: %i", GetName(playerid), playerid, GetPlayerScore(playerid));
pNameTag[playerid] = Create3DTextLabel(string, COLOR_YELLOW, 30.0, 40.0, 50.0, 15.0, -1, 1);
Attach3DTextLabelToPlayer(pNameTag[playerid], playerid, 0.0, 0.0, 0.2);
Basically we're formating a string, making the label and of course, attaching the label to a players head. I used custom functions, so do not attempt using this code. It'll just be stupid!
Re: 3D Text Labels -
Mr.Jvxmc - 29.09.2010
I was thinking differently.
I want to be on the ground
And it would be some sort of text
You understand?
Re: 3D Text Labels -
Scenario - 29.09.2010
Quote:
Originally Posted by Mr.Jvxmc
I was thinking differently.
I want to be on the ground
And it would be some sort of text
You understand?
|
You just want random text sitting on the ground?
Re: 3D Text Labels -
Thebest96 - 29.09.2010
Its easy:
pawn Код:
public OnGameModeInit()
{
Create3DTextLabel("MESSAGE",COLOR,30.0,40.0,50.0,40.0,0);
return 1;
}
DrawDistance The distance from where you are able to see the 3D Text Label
VirtualWorld The virtual world in which you are able to see the 3D Text
testLOS 0/1 Test the line-of-sight so this text can't be seen through objects
Re: 3D Text Labels -
Mr.Jvxmc - 29.09.2010
thx you so much!
Re: 3D Text Labels -
Mr.Jvxmc - 29.09.2010
Topic Locked