SA-MP Forums Archive
tag mismatch ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: tag mismatch ? (/showthread.php?tid=344787)



tag mismatch ? - [D]ry[D]esert - 22.05.2012

Hi i wanna make When admin or vip spawn 3D laber Attached to them like this but Warning Show to me
Код:
tag mismatch
I hate Warnings in my Gamemode >.<
This is my Code
pawn Код:
new Label;
Код:
Label = LabelText(playerid);
 /*Line 1891*/Attach3DTextLabelToPlayer(Label, playerid, 0.0, 0.0, 0.7);
pawn Код:
stock LabelText(playerid)
    {
    /*============================Gold VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Owner & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 4 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Head Admin & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 3 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Administrator & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 2 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Moderator & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 1 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Trail Moderator & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    /*============================Silver VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Owner & "Silver"Silver "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 4 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Head Admin & "Silver"Silver "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 3 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Administrator & "Silver"Silver "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 2 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Moderator & "Silver"Silver "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 1 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Trail Moderator & "Silver"Silver "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    /*============================Bronze VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Owner & "Bronze"Bronze "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 4 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Head Admin & "Bronze"Bronze "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 3 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Administrator & "Bronze"Bronze "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 2 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Moderator & "Bronze"Bronze "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 1 && AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""RED"Trail Moderator & "Bronze"Bronze "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    /*============================Just VIP==================================*/
    if(AccountInfo[playerid][VIPlevel] == 1)
    {
    Create3DTextLabel(""Bronze"Bronze "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][VIPlevel] == 2)
    {
    Create3DTextLabel(""Silver"Silver "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][VIPlevel] == 3)
    {
    Create3DTextLabel(""Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    return 1;
    }



Re: tag mismatch ? - iggy1 - 22.05.2012

pawn Код:
new Text3D:Label;



Re: tag mismatch ? - Faisal_khan - 22.05.2012

EDIT: LOL Late


Re: tag mismatch ? - [D]ry[D]esert - 22.05.2012

Quote:
Originally Posted by iggy1
Посмотреть сообщение
pawn Код:
new Text3D:Label;
Nothing Change
btw i am Using Stock i mean like this
Label = Stock not Createblablab
Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
EDIT: LOL Late
:O !


Re: tag mismatch ? - iggy1 - 22.05.2012

Have your function return "Create3DTextLabel(...)" and remove return 1;.

pawn Код:
stock LabelText(playerid)
    {
    /*============================Gold VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
        return Create3DTextLabel(""RED"Owner & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }



Re: tag mismatch ? - [D]ry[D]esert - 23.05.2012

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Have your function return "Create3DTextLabel(...)" and remove return 1;.

pawn Код:
stock LabelText(playerid)
    {
    /*============================Gold VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
        return Create3DTextLabel(""RED"Owner & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
Not Working


Any one ?


Re: tag mismatch ? - iggy1 - 23.05.2012

If you pass the "Label" var by reference that will definitely work.

pawn Код:
stock LabelText(playerid, &Text3D: Label)
{
    /*============================Gold VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
        Label = Create3DTextLabel("test",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    if(AccountInfo[playerid][AdminLevel] == 4 && AccountInfo[playerid][VIPlevel] == 3)
    {
        Label = Create3DTextLabel("test",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
    //...and so on
}
To use it.
pawn Код:
new Text3D: label;
LabelText(playerid, label);//the function will make "label" equal to a new 3DText if one is made
Its the same really as label = Create3DTextLabel(...) in your version. Use it the same way you use GetPlayerHealth.


Re: tag mismatch ? - Vince - 23.05.2012

Hmm, I think you can just tag the whole function instead.
pawn Код:
stock Text3D:LabelText(playerid)
{
    /*============================Gold VIP==================================*/
    if(AccountInfo[playerid][AdminLevel] == 5 && AccountInfo[playerid][VIPlevel] == 3)
    {
        return Create3DTextLabel(""RED"Owner & "Gold"Gold "PURPLE"VIP *",0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    }
}
pawn Код:
new Text3D:gMyLabel = LabelText(playerid);
Unsure if it works.