SA-MP Forums Archive
Delete3DTextLabel - 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: Delete3DTextLabel (/showthread.php?tid=473083)



Delete3DTextLabel - Beckett - 01.11.2013

------


Re: Delete3DTextLabel - Patrick - 01.11.2013

You're probably using adutytext as a local variable, when it's meant to be global variable, Example code shown below

pawn Код:
new
    aduty = 0, Text3D:adutytext;

CMD:aduty(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        if (aduty == 0)
        {
                adutytext = Create3DTextLabel("(( ADMIN - NOT HERE IN CHARACTER ))",ORANGE, 30.0, 40.0, 50.0, 40.0, 0);
                Attach3DTextLabelToPlayer(adutytext, playerid, 0.0, 0.0, 0.7);
                SendClientMessage(playerid,WHITE,"You are now on duty.");
                aduty = 1;
        }
        else
        {
            SendClientMessage(playerid,WHITE,"You are now off duty");
            Delete3DTextLabel(adutytext);
            aduty = 0;
        }
    }
    return true;
}



Re: Delete3DTextLabel - Beckett - 01.11.2013

Works, thanks a lot man appreciated.