PDA

View Full Version : Delete3DTextLabel


Beckett
01/11/2013, 12:00 PM
------

Patrick
01/11/2013, 12:01 PM
You're probably using adutytext as a local variable, when it's meant to be global variable, Example code shown below


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;
}

Beckett
01/11/2013, 12:09 PM
Works, thanks a lot man appreciated.