help me problem : Player3DTextLabel -
wilking - 23.06.2017
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
Re: help me problem : Player3DTextLabel -
HoussemGaming - 23.06.2017
I get it, just leave it won't do nothing
Re: help me problem : Player3DTextLabel -
wilking - 23.06.2017
Quote:
Originally Posted by HoussemGaming
I get it, just leave it won't do nothing
|
What The F*
Help Meeee please
Re: help me problem : Player3DTextLabel -
crukk11 - 23.06.2017
The return 1; must same
Re: help me problem : Player3DTextLabel -
wilking - 23.06.2017
Quote:
Originally Posted by crukk11
The return 1; must same
|
I do not understand ?
Re: help me problem : Player3DTextLabel -
NaS - 23.06.2017
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)
Re: help me problem : Player3DTextLabel -
wilking - 24.06.2017
Helpme ..
Re: help me problem : Player3DTextLabel -
JasonRiggs - 24.06.2017
Read the comment of NaS lol, He already said what to you need..
Re: help me problem : Player3DTextLabel -
wilking - 24.06.2017
Quote:
Originally Posted by JasonRiggs
Read the comment of NaS lol, He already said what to you need..
|
but i do not understand
Re: help me problem : Player3DTextLabel -
NaS - 24.06.2017
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).