[HELP] Attach And 3DTextLabel -
M0HAMMAD - 11.11.2014
Hi Everybody
when i compiler my gamemode, i get a warning :
pawn Код:
E:\...\gm.pwn(7548) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
And line 7548:
pawn Код:
Attach3DTextLabelToPlayer(MyLabel, playerid, 0.0, 0.0, 0.4);
This codes from a whisper command :
pawn Код:
dcmd_w(playerid,params[])
{
new string[128];
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /W (Message)");
return 1;
}
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10)
{
MyLabel = CreatePlayer3DTextLabel(playerid,params,COLOR_WHITE,0.0,0.0,0.0,40.0);
Attach3DTextLabelToPlayer(MyLabel, playerid, 0.0, 0.0, 0.4);
return 1;
}
}
return 1;
}
Re: [HELP] Attach And 3DTextLabel -
dominik523 - 11.11.2014
Does MyLabel have tag Text3D?
Re: [HELP] Attach And 3DTextLabel -
M0HAMMAD - 11.11.2014
Quote:
Originally Posted by dominik523
Does MyLabel have tag Text3D?
|
No :
pawn Код:
new PlayerText3D:MyLabel;
Re: [HELP] Attach And 3DTextLabel -
Glossy42O - 11.11.2014
Not sure if it will work but try that :\
PHP код:
dcmd_w(playerid,params[])
{
new string[128];
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /W (Message)");
return 1;
}
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10)
{
MyLabel = CreatePlayer3DTextLabel(playerid,params,COLOR_WHITE,0.0,0.0,0.0);
Attach3DTextLabelToPlayer(MyLabel, playerid, 0.0, 0.0, 0.4);
return 1;
}
}
return 1;
}
Because i had similar problem before.
Re: [HELP] Attach And 3DTextLabel -
M0HAMMAD - 11.11.2014
Stuun:
not work. the warning is from line 7548
when i try your code, i get warn form line 7547 too.
Re: [HELP] Attach And 3DTextLabel -
Sawalha - 11.11.2014
nvm. fail
Re: [HELP] Attach And 3DTextLabel -
M4D - 11.11.2014
Try This:
pawn Код:
dcmd_w(playerid,params[])
{
new string[128];
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /W (Message)");
return 1;
}
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10)
{
MyLabel = CreatePlayer3DTextLabel(playerid,params,COLOR_WHITE,0.0,0.0,0.0,40.0,0);
Attach3DTextLabelToPlayer(MyLabel, playerid, 0.0, 0.0, 0.4);
return 1;
}
}
return 1;
}
your problem is "CreatePlayer3DTextLabel" Parameters.
pawn Код:
CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS)
you forgot to add "testLOS"
Re: [HELP] Attach And 3DTextLabel -
Sawalha - 11.11.2014
EDIT:
Код:
CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS)
playerid The player which should see the newly created 3DText Label.
text[] The text to display.
color The text color
x X Coordinate (or offset if attached)
y Y Coordinate (or offset if attached)
z Z Coordinate (or offset if attached)
DrawDistance The distance where you are able to see the 3D Text Label
attachedplayer The player you want to attach the 3D Text Label to. (None: INVALID_PLAYER_ID)
attachedvehicle The vehicle you want to attach the 3D Text Label to. (None: INVALID_VEHICLE_ID)
testLOS 0/1 Test the line-of-sight so this text can't be seen through walls
Attach3DTextLabelToPlayer used for global 3D texts, there's no such function for player 3dtext
Re: [HELP] Attach And 3DTextLabel -
M0HAMMAD - 11.11.2014
Friends,
the warn is from attach not create3dtext !
Re: [HELP] Attach And 3DTextLabel -
Sawalha - 11.11.2014
Quote:
Originally Posted by M0HAMMAD
Friends,
the warn is from attach not create3dtext !
|
Yeah, be cause you can't use Attach3DTextLabelToPlayer with PlayerText3D ... read again...
so you
don't even need that function , Just put the attached id in the "CreatePlayer3DTextLabel" , read it's format again please.