Creating 3D text on my position
#1

Hello, so I've tried a few things but I cannot make it so it will create Dynamic 3D Text on my position.


So, how could I make it so when I do a command for example:

CMD:text(playerid, params[])
{
SendClientMessage(playerid, COLOR_WHITE, "Text created");
// dynamic text thing here!
return 1;
}


Like, I want it to say the same thing everything I do that command but How can I make it so when I do the command, it creates the text at my exact position

thanks guys
Reply
#2

Anyone?
Reply
#3

pawn Code:
CMD:text(playerid, params[])
{
     SendClientMessage(playerid, COLOR_WHITE, "Text created");
     new Float:X, Float:Y, Float:Z;
     GetPlayerPos(playerid, X, Y, Z);
     Create3DTextLabel("This is a yellow text",0xFFFF00AA,X,Y,Z,100,0,10);
     return 1;
}
Reply
#4

Great, it worked! +rep

thank you

How would I make it so it would save into like a 'text.ini' file in scriptfiles?
Reply
#5

Do it with Y_Ini or Dini and store the X,Y,Z in file!
Reply
#6

INI_Float("Xpos", PlayerInfo[playerid][pX]);
INI_Float("Ypos", PlayerInfo[playerid][pY]);
INI_Float("Zpos", PlayerInfo[playerid][pZ]);

How would I make it so it would save the text though?

Above is what I use to save the players co-ordinates, I have no idea about saving text sorry :/
Reply
#7

Quote:
Originally Posted by RLGaming
View Post
INI_Float("Xpos", PlayerInfo[playerid][pX]);
INI_Float("Ypos", PlayerInfo[playerid][pY]);
INI_Float("Zpos", PlayerInfo[playerid][pZ]);

How would I make it so it would save the text though?

Above is what I use to save the players co-ordinates, I have no idea about saving text sorry :/
Store the string:
pawn Code:
new labelstr[] = "This is a yellow text";
Create3DTextLabel(labelstr,0xFFFF00AA,X,Y,Z,100,0,10);
and then save it with Y_ini!
Reply
#8

Great, thank you!

Whenever I do the text inside an interior(different interior/vw) it doesnt stay, it appears for a second or so but when im not inside an interior it works fine?

Also, how can I create a 3D Pickup?
Reply
#9

No problem!

There is an interior parameter, specifically between "100" and "10" -> simply change "0" to your interior!
Example:
pawn Code:
Create3DTextLabel(labelstr,0xFFFF00AA,X,Y,Z,100,GetPlayerInterior(playerid),10);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)