Whats wrong with CreatePlayer3DTextLabel? -
imagician - 12.03.2011
Hello Dear members.
I have an ad created for the cops to CreatePlayer3DTextLabel, which is not displayed.
Can you help me?
Cheers, Unkn0wnX.
PS: Sorry for my bad English, i'm German.
Here is my Code:
new PlayerText3D:WantedLabel[MAX_PLAYERS];
&
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsACop(i))
{
for(new suspect=0; suspect<MAX_PLAYERS; suspect++)
{
if(LabelCreated[suspect] == 0)
{
if(WantedLevel[suspect] >= 1)
{
GetPlayerPos(suspect,wX,wY,wZ);
format(text,sizeof(text),"Wanteds: %d\nGrund: %s\nZeuge: %s",WantedLevel[suspect],reason,turner);
WantedLabel[i] = CreatePlayer3DTextLabel(i,text,COLOR_LIGHTRED,wX,w Y,wZ,25.0,suspect,INVALID_VEHICLE_ID,0);
LabelCreated[suspect] = 1;
}
}
else
{
format(text,sizeof(text),"Wanteds: %d\nGrund: %s\nZeuge: %s",WantedLevel[suspect],reason,turner);
UpdatePlayer3DTextLabelText(i, WantedLabel[i], COLOR_LIGHTRED, text);
}
}
}
}
Re: Whats wrong with CreatePlayer3DTextLabel? -
Stigg - 12.03.2011
pawn Код:
new PlayerText3D:WantedLabel[MAX_PLAYERS];
&
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsACop(i))
{
for(new suspect=0; suspect<MAX_PLAYERS; suspect++)
{
if(LabelCreated[suspect] == 0)
{
if(WantedLevel[suspect] >= 1)
{
GetPlayerPos(suspect,wX,wY,wZ);
format(text,sizeof(text),"Wanteds: %d\nGrund: %s\nZeuge: %s",WantedLevel[suspect],reason,turner);
WantedLabel[i] = CreatePlayer3DTextLabel(i,text,COLOR_LIGHTRED,wX,w Y,wZ,25.0,suspect,INVALID_VEHICLE_ID,0);
LabelCreated[suspect] = 1;
}
}
else
{
format(text,sizeof(text),"Wanteds: %d\nGrund: %s\nZeuge: %s",WantedLevel[suspect],reason,turner);
UpdatePlayer3DTextLabelText(i, WantedLabel[i], COLOR_LIGHTRED, text);
}
}
}
}
Pawn Tag's. More readable dont you think ?
Re: Whats wrong with CreatePlayer3DTextLabel? -
Sasino97 - 12.03.2011
CreatePlayer3DTextLabel creates a text that only the 'playerid' can see
Use Create3DTextLabel + Attach3DTextLabelToPlayer
Re: Whats wrong with CreatePlayer3DTextLabel? -
imagician - 12.03.2011
The advertisement should only for cops, that is why I use CreatePlayer3DTextLabel.
Re: Whats wrong with CreatePlayer3DTextLabel? -
imagician - 12.03.2011
Can anybody help me?
Re: Whats wrong with CreatePlayer3DTextLabel? -
MadeMan - 12.03.2011
pawn Код:
new PlayerText3D:WantedLabel[MAX_PLAYERS][MAX_PLAYERS];
new LabelCreated[MAX_PLAYERS][MAX_PLAYERS];
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsACop(i))
{
for(new suspect=0; suspect<MAX_PLAYERS; suspect++)
{
if(LabelCreated[i][suspect] == 0)
{
if(WantedLevel[suspect] >= 1)
{
format(text,sizeof(text),"Wanteds: %d\nGrund: %s\nZeuge: %s",WantedLevel[suspect],reason,turner);
WantedLabel[i][suspect] = CreatePlayer3DTextLabel(i,text,COLOR_LIGHTRED,0,0,0,25.0,suspect,INVALID_VEHICLE_ID,0);
LabelCreated[i][suspect] = 1;
}
}
else
{
format(text,sizeof(text),"Wanteds: %d\nGrund: %s\nZeuge: %s",WantedLevel[suspect],reason,turner);
UpdatePlayer3DTextLabelText(i, WantedLabel[i][suspect], COLOR_LIGHTRED, text);
}
}
}
}
Re : Whats wrong with CreatePlayer3DTextLabel? -
Dear - 18.03.2011
0.3c?