Some head tag help. - 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: Some head tag help. (
/showthread.php?tid=391019)
Some head tag help. -
Laure - 09.11.2012
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.
Re: Some head tag help. -
Glad2BeHere - 09.11.2012
Код:
/*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