07.06.2014, 05:50
Hey there, created a admin tag system for my server, which can be toggled by a command by admins, but the problem is it hides the name tag only for those who also has admin tag toggled else it Shows both name tag and admin tag without hiding the health armor and name, and sometimes it even hide everything like in /mask command, its out of my capacity, Help me please, will provide rep as a thanks. Also there's my command that toggles admin tag.
pawn Код:
else if(!strcmp(params, "admtag", true))
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!AdminTag[playerid])
{
for(new i; i<MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, false);
}
AdminTag[playerid] = 1;
format(string, sizeof(string), "{FF6347}EG-RP Administrator\n{FFFFFF}%s\n{2641FE}%s", RPN(playerid), RPALN(playerid));
Attach3DTextLabelToPlayer(AdminText[playerid], playerid, 0, 0, 0.25);
if(IsValidDynamic3DTextLabel(AdminText[playerid])) DestroyDynamic3DTextLabel(AdminText[playerid]);
AdminText[playerid] = CreateDynamic3DTextLabel(string, COLOR_WHITE, 0, 0, -20, 25, playerid);
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, AdminText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
SendClientMessage(playerid, COLOR_GREEN, "You have toggled your Admin Head Tag on.");
}
else
{
for(new i; i<MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, true);
}
AdminTag[playerid] = 0;
if(IsValidDynamic3DTextLabel(AdminText[playerid])) DestroyDynamic3DTextLabel(AdminText[playerid]);
SendClientMessage(playerid, COLOR_DARKRED, "You have toggled your Admin Head Tag off.");
}
}