warning
#1

pawn Код:
new PlayerPaused[MAX_PLAYER_NAME];
new Text3D:Pause3DText[MAX_PLAYER_NAME];

forward PauseCheck();
public PauseCheck()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(OnPlayerUpdate(i) == 0)
            {
                PlayerPaused[i] = 1;
                Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,X,Y,Z,40.0,i,0); //Error line
            }
            if(OnPlayerUpdate(i) == 1)
            {
                PlayerPaused[i] = 0;
                Delete3DTextLabel(Pause3DText[i]);
            }
        }
    }
}
Код:
 warning 213: tag mismatch
Reply
#2

Here you've got wrong parameters

pawn Код:
CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,X,Y,Z,40.0,i,0);
take a look at https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel
Reply
#3

I've seen it, post an example if you can
Reply
#4

Remove the last 0 in that line.

Replace the X, Y and Z by 0.0.

pawn Код:
CreatePlayer3DTextLabel(i, "PAUSED", 0xFF0000AA, 0.0, 0.0, 0.0, 40.0, i);
Reply
#5

pawn Код:
CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,X,Y,Z,40.0);


edit: too late
Reply
#6

Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,0.0, 0.0,0.0,40.0,0);

same error
Reply
#7

Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,0,0, 0,40.0);
same error
Reply
#8

X, Y, Z were not declared with Float tag. You should declare arrays with MAX_PLAYERS and not MAX_PLAYER_NAME.
pawn Код:
new PlayerPaused[MAX_PLAYERS];
new Text3D:Pause3DText[MAX_PLAYERS];

forward PauseCheck();
public PauseCheck()
{
    new Float: pX, Float: pY, Float: pZ;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(OnPlayerUpdate(i) == 0)
            {
                GetPlayerPos(i, pX, pY, pZ);
                PlayerPaused[i] = 1;
                Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,pX, pY, pZ,40.0,i); //Error line
            }
            else
            {
                PlayerPaused[i] = 0;
                Delete3DTextLabel(Pause3DText[i]);
            }
        }
    }
}
I'm not really sure if calling OnPlayerUpdate directly will do what you want.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)