[Tutorial] Show Tag Name Press F7 "V3 SOURCES"
ignore the boxes that went bugged because some codes to be great more
so let's start
search for
HUD_TPSGame.cpp
Code:
if(ChatWindowSwitch && hudMain && !hudMain->isChatInputActive() && !hudMain->isPlayersListVisible() && r_render_in_game_HUD->GetBool())
{
hudMain->showChatInput("");
}
AddBellow
Code:
// TheHexa and DouglasPRO :: Logic for new friends button
if(hudMain)
{
if(InputMappingMngr->wasReleased(r3dInputMappingMngr::KS_SHOW_FRIENDS_NAME))
{
//TheHexa and DouglasPRO :: Don't ask me why i did like that, this shit won't work like ' pl->ShowFriendsTag = !pl->ShowFriendsTag '
CGL.localPlayer_->ShowFriendsTag = !CGL.localPlayer_->ShowFriendsTag;
}
}
search for
r3dlnput.h
AddBellow
Code:
KS_SHOW_FRIENDS_NAME, //TheHexa and DouglasPRO :: For new button logic
search for
r3dlnput.cpp
Code:
m_Mapping[KS_SHOW_CRAFT_MENU] = KeyboardMapping(INPUTMAP_KEYBOARD, kbsK, "$HUD_Cntrl_ShowCraftMenu", false);
AddBellow
r3dlnput.cpp
Code:
m_Mapping[KS_SHOW_FRIENDS_NAME] = KeyboardMapping(INPUTMAP_KEYBOARD, kbsF7, "$HUD_Cntrl_ShowFriendTag", false);//DouglasPRO:: Code :D
search for
addbellow
Code:
ShowFriendsTag = false;
Search
Add
Code:
Scaleform::GFx::Value m_CharIcon;
search for
Code:
char m_MinimapTagIconName[64]; // temp, to be optimized soon
addbellow
Code:
bool ShowFriendsTag; //DouglasPRO and TheHexa:: For new button logic
search for
Code:
// CLAN TAG
if(!NetworkLocal && hudMain)
{
if(m_CharIcon.IsUndefined() && CGL.localPlayer_ && (CGL.m_gameInfo.flags & GBGameInfo::SFLAGS_Nameplates))
{
char plrUserName[256];
GetUserNameAndClanTag(plrUserName);
// todo: need a better way to find player's reputation
int rep = 0;
{
char tmpUsername[64];
m_EncryptedUserName.get(tmpUsername);
for(int i=0; i<256; ++i)
{
if(strcmp(CGL.playerNames[i].Gamertag, tmpUsername)==0)
{
rep = CGL.playerNames[i].reputation;
break;
}
}
}
hudMain->addCharTag(plrUserName, ClanID == CGL.localPlayer_->ClanID && ClanID!=0, rep, m_CharIcon);
}
AddBellow
Code:
//DouglasPRO :: TAGS F7 KEY
if(!m_CharIcon.IsUndefined())
{
bool showTag = true;
bool showName = false;
bool showTagAlway = false;
if(this->GetSafeID() == m_LocalPlayer_CurrentAimAt)
{
float dist = (CGL.localPlayer_->GetPosition()-GetPosition()).Length();
float time = r3dGetTime() - m_LocalPlayer_CurrentAimAt_StartTime;
if(dist < 300.0f) // 50.0f
showName = true;
//else if(dist < 100.0f && time > 0.5f) // 100.0f
//showName = true;
else if(dist >= 300.0f && time > 1.0f) // 100.0f & 2.0f
showName = true;
}
bool alwaysShow = true;
if(bDead)
{
showTag = false;
}
//DouglasPRO:: Code :D
if (m_DevPlayerHide == true)
{
showName = false;
alwaysShow = false;
}
if(InputMappingMngr->isPressed(r3dInputMappingMngr::KS_SHOW_FRIENDS_NAME))
{
showTagAlway = true;
}
//DouglasPRO :: A way to show player names in same group/clan
bool sameClan = ClanID == CGL.localPlayer_->ClanID && ClanID != 0;
bool sameGroup = CGL.localPlayer_->GroupID == GroupID && GroupID != 0;
//TheHexa:: BUG FIX: Tag showing when player is dead! 'tag always show' - LOY Request
ClientGameLogic& CGL = gClientLogic();
for(int i=0; i < MAX_NUM_PLAYERS; ++i)
{
obj_Player* plr = CGL.GetPlayer(i);
if(plr)
{
if(plr->bDead)
{
continue;
}
if(showTag)
{
if(showTagAlway)
{
if(sameClan || sameGroup)
{
if(sameClan && !sameGroup)
{
r3dPoint3D offset(0, 0.3f, 0);
hudMain->setCharTagTextVisible(m_CharIcon, true, false, m_isVoiceActive && g_voip_showChatBubble->GetBool());
hudMain->moveUserIcon(m_CharIcon, GetHeadPosition() + offset, alwaysShow);
}
else
{
r3dPoint3D offset(0, 0.3f, 0);
hudMain->setCharTagTextVisible(m_CharIcon, true, true, m_isVoiceActive && g_voip_showChatBubble->GetBool());
hudMain->moveUserIcon(m_CharIcon, GetHeadPosition() + offset, alwaysShow);
}
}
}
else
{
r3dPoint3D offset(0, 0.3f, 0);
hudMain->setCharTshowagTextVisible(m_CharIcon, showName, sameGroup, m_isVoiceActive && g_voip_showChatBubble->GetBool());
hudMain->moveUserIcon(m_CharIcon, GetHeadPosition() + offset, alwaysShow);
}
}
}
}
}
}
OPTIONAL
CREDITS
@DouglasPro
TheHexa
Like And Reputation pls :ott::ott1::thumbup1:
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
try to review the tutoal, you have many things out of place, or just to me is strange.
Thanks
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Quote:
Originally Posted by
lukasccb
try to review the tutoal, you have many things out of place, or just to me is strange.
Thanks
I already tried to fix but the RZ seems to be bug here
- - - Updated - - -
Quote:
Originally Posted by
lukasccb
try to review the tutoal, you have many things out of place, or just to me is strange.
Thanks
fixed post like me bro :D
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Thank's for tut.
I think that will work better like:
Press F7 - allways show tag name
Press again F7 - hide tag name
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Quote:
Originally Posted by
AlexRedd
Thank's for tut.
I think that will work better like:
Press F7 - allways show tag name
Press again F7 - hide tag name
If you press the f7 and drop the name tag disappears !
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
I agree with what Alex said is better make a key toggle for show and hide the nametag I tried to do this a long time ago but unfortunately I did not succeed
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Quote:
Originally Posted by
Bombillo
I agree with what Alex said is better make a key toggle for show and hide the nametag I tried to do this a long time ago but unfortunately I did not succeed
we can use the flashlight code as a basis for doing
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
you forgot to put in your tutorial a variable
ShowFriendsTag
have this sytem on OverZ
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
search for
addbellow
Code:
ShowFriendsTag = false;
search for
addbellow
Code:
Scaleform::GFx::Value m_CharIcon;
bool ShowFriendsTag; //DouglasPRO and TheHexa:: For new button logic
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Hey, fix it!
remove this code in tutorial
Code:
bool ShowFriendsTag;
and put this
Search
Code:
char m_MinimapTagIconName[64]; // temp, to be optimized soon
Add:
Code:
bool ShowFriendsTag;
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Quote:
Originally Posted by
lukasccb
Hey, fix it!
remove this code in tutorial
Code:
char m_MinimapTagIconName[64]; // temp, to be optimized soon
this new code is to keep the nametag without key?
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Quote:
Originally Posted by
rapido15
this new code is to keep the nametag without key?
search
char m_MinimapTagIconName[64]; // temp, to be optimized soonchar m_MinimapTagIconName[64]; // temp, to be optimized soon
add bellow
bool ShowFriendsTag;
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
Re: [Tutorial] Show Tag Name Press F7 "V3 SOURCES"
No group and clan is press f7 active gamertag
how to fix?