Whats wrong with CreatePlayer3DTextLabel?
#1

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);
}
}
}
}
Reply
#2

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 ?
Reply
#3

CreatePlayer3DTextLabel creates a text that only the 'playerid' can see

Use Create3DTextLabel + Attach3DTextLabelToPlayer
Reply
#4

The advertisement should only for cops, that is why I use CreatePlayer3DTextLabel.
Reply
#5

Can anybody help me?
Reply
#6

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);
            }
        }
    }
}
Reply
#7

0.3c?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)