help me problem : Player3DTextLabel
#1

I encountered a difficulty

this Code
Код HTML:
CMD:showtext(playerid, params[])
{
	new PlayerText3D:FamedLogo = CreatePlayer3DTextLabel(playerid,"Old School",0xFF6600, 30.0, 40.0, 50.0, 40.0, 0);
	new RemoteFamed[MAX_PLAYERS];
	
 	if(RemoteFamed[playerid] == 0)
 	{
    	Attach3DTextLabelToPlayer(FamedLogo, playerid, 0.0, 0.0, 0.5);//erro in here
     	SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " show");
     	RemoteFamed[playerid] = 1;
      	return 1;
	}
	else if(RemoteFamed[playerid] == 1)
	{

 		DeletePlayer3DTextLabel(playerid, FamedLogo);
   		SendClientMessageEx(playerid, COLOR_GREY, " Hide ");
   		RemoteFamed[playerid] = 0;
  	    return 1;
	}
 	return 1;
}
This Error

Код HTML:
./includes/ngg.pwn(68352) : warning 213: tag mismatch
Help Me , Pleasee
Reply
#2

I get it, just leave it won't do nothing
Reply
#3

Quote:
Originally Posted by HoussemGaming
Посмотреть сообщение
I get it, just leave it won't do nothing
What The F*
Help Meeee please
Reply
#4

The return 1; must same
Reply
#5

Quote:
Originally Posted by crukk11
Посмотреть сообщение
The return 1; must same
I do not understand ?
Reply
#6

You are trying to attach a player 3D Text Label to a Player.
This is not possible, since Attach3DTextLabelToPlayer is for global 3D Text Labels.

Even if it would work, it makes no sense to attach a Player 3D Text Label to the Player it is created for, because Players don't see labels attached to them and Player Text Labels can only be seen by the Player it is created for.
Create a Global Text Label and attach it. But like I said, it will only be visible to others.

Or use the attachedplayer argument in CreatePlayer3DTextLabel for attaching. It is useless though if you attach it to the same player.

Код:
CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer=INVALID_PLAYER_ID, attachedvehicle=INVALID_VEHICLE_ID, testLOS=0)
Reply
#7

Helpme ..
Reply
#8

Read the comment of NaS lol, He already said what to you need..
Reply
#9

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Read the comment of NaS lol, He already said what to you need..
but i do not understand
Reply
#10

Quote:
Originally Posted by wilking
Посмотреть сообщение
but i do not understand
You cannot use Attach3DTextLabelToPlayer on the Label you created because it is for Global Labels. You used a Player Label.

Instead use it like this:

Код:
CreatePlayer3DTextLabel(playerid, "Your text here", 0xFF0000FF, 0.0, 0.0, 1.0, 20.0, playerid);
X, Y, Z (0.0, 0.0, 1.0) are now the offsets to attach.

But like I said before, you cannot see the Labels attached to yourself, so attaching playerid's Label to playerid is pointless.

If you want to attach a Label that should be visible to other Players, use Create3DTextLabel in combination with Attach3DTextLabelToPlayer(). For that you just have to replace CreatePlayer3DTextLabel in your code with Create3DTextLabel (and remove the playerid parameter).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)