01.07.2016, 13:41
I'm using this script
https://sampforum.blast.hk/showthread.php?tid=468638
I want this 3D nametag to be hidden when a player uses his mask, like replaced! Also the underbar removed "_" is that possible?
And my code is
I can't make it work well for some reason, always end up with an error. Thanks!
https://sampforum.blast.hk/showthread.php?tid=468638
I want this 3D nametag to be hidden when a player uses his mask, like replaced! Also the underbar removed "_" is that possible?
And my code is
Код:
new Text3D:MaskLabels[MAX_PLAYERS]; YCMD:mask(playerid, params[], help) { if(help) { SendClientMessage(playerid, X11_WHITE, "Toggle Mask On/Off"); return 1; } new userflags = GetPVarInt(playerid, "UserFlags"); if(~userflags & EUFHasMask) { if(~EAdminFlags:GetPVarInt(playerid, "AdminFlags") & EAdminFlags_CanHide) { SendClientMessage(playerid, X11_TOMATO_2, "You don't have a mask!"); return 1; } } if(GetPVarInt(playerid, "MaskOn") == 1) { SetPlayerMask(playerid, 0); } else { SetPlayerMask(playerid, 1); } return 1; } SetPlayerMask(playerid, status) { foreach(Player, i) { if(IsPlayerConnectEx(i) && i != playerid) { if(IsPlayerStreamedIn(playerid, i)) { ShowPlayerNameTagForPlayer(i, playerid, !status); } } } new msg[128]; if(status) { if(MaskLabels[playerid] != Text3D:0) { DestroyDynamic3DTextLabel(MaskLabels[playerid]); } format(msg, sizeof(msg), "* %s puts a mask on",GetPlayerNameEx(playerid, ENameType_RPName)); MaskLabels[playerid] = CreateDynamic3DTextLabel(getPlayer3dLabelText(playerid),X11_WHITE, 0.0, 0.0, 0.2, NAMETAG_DRAW_DISTANCE,playerid,.testlos=1); } else { format(msg, sizeof(msg), "* %s takes %s mask off",GetPlayerNameEx(playerid, ENameType_RPName),getPossiveAdjective(playerid)); if(MaskLabels[playerid] != Text3D:0) { DestroyDynamic3DTextLabel(MaskLabels[playerid]); MaskLabels[playerid] = Text3D:0; } } ProxMessage(20.0, playerid, msg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetPVarInt(playerid, "MaskOn", status); } ShowAllNameTagsForPlayer(playerid, show) { foreach(Player, i) { if(IsPlayerConnectEx(i) && i != playerid) { if(IsPlayerStreamedIn(playerid, i)) { if(GetPVarInt(i, "MaskOn")) { ShowPlayerNameTagForPlayer(playerid, i, show); } } } } }