Some head tag help.
#1

Alright here i want to use ShowNameTagForPlayer to hide the players name hp and armour when the vip tag is activated i have the vip tag code something like this.
Код:
		        case 1: // VIP Tag (Silver+)
		        {
		            if(PlayerInfo[playerid][pVIP] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not Silver VIP.");
		            if(!VIPTag[playerid])
		            {

		                VIPTag[playerid] = 1;
		                format(string, sizeof(string), "Very Important Player\n%s VIP", RPVIPN(playerid));
		                /*Delete3DTextLabel(VIPText[playerid]);
		                VIPText[playerid] = Create3DTextLabel(string, COLOR_VIP, 0, 0, -20, 25, -1, 1);
		                Attach3DTextLabelToPlayer(VIPText[playerid], playerid, 0, 0, 0.25);*/
		                if(IsValidDynamic3DTextLabel(VIPText[playerid])) DestroyDynamic3DTextLabel(VIPText[playerid]);
		                VIPText[playerid] = CreateDynamic3DTextLabel(string, COLOR_VIP, 0, 0, -20, 25, playerid);
		                Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, VIPText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
		                SendClientMessage(playerid, COLOR_VIP, "You have toggled your VIP Head Tag on.");
		            }
		            else
		            {
		                VIPTag[playerid] = 0;
		            	//Delete3DTextLabel(VIPText[playerid]);
		            	if(IsValidDynamic3DTextLabel(VIPText[playerid])) DestroyDynamic3DTextLabel(VIPText[playerid]);
		                SendClientMessage(playerid, COLOR_VIP, "You have toggled your VIP Head Tag off.");
		            }
		        }
Help will be appreciated.
Reply
#2

Код:
/*Delete3DTextLabel(VIPText[playerid]);
		                VIPText[playerid] = Create3DTextLabel(string, COLOR_VIP, 0, 0, -20, 25, -1, 1);
		                Attach3DTextLabelToPlayer(VIPText[playerid], playerid, 0, 0, 0.25);*/
to
  Delete3DTextLabel(VIPText[playerid]);
		                VIPText[playerid] = Create3DTextLabel(string, COLOR_VIP, 0, 0, -20, 25, -1, 1);
		                Attach3DTextLabelToPlayer(VIPText[playerid], playerid, 0, 0, 0.25);
and
//Delete3DTextLabel(VIPText[playerid]);

to

Delete3DTextLabel(VIPText[playerid]);
u may want to add this ass well

https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)