LCKB
visibility of pets in the city - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128)
+----- Thread: visibility of pets in the city (/showthread.php?tid=5014)

Pages: 1 2


- JLT - 01-31-2023


Hello everyone, who can tell me how to make pets not disappear in the city when I move





 




- nicolasg - 02-01-2023


In: Player.es

Inside of: Read_net_Pet Or/And Read_net_WildPet

Find: penEntity->SetFlagOn(ENF_HIDDEN); And pInfo->GetMyPetInfo()->pen_pEntity->SetFlagOn(ENF_HIDDEN);

 




- JLT - 02-02-2023


Yes, it worked, thanks!




- Matt Hias - 02-06-2023


Hello where exactly does this have to be inserted? underneath? Best regards




- Desarija - 02-06-2023


you don't add anything, you only comment out the lines where it sets the hidden flag on because that's how it hides them




- Matt Hias - 02-06-2023


Now I understand it ? didn't get along with the inside of ^^

Thanks very much




- Andrein95 - 04-30-2023


/index.php?/profile/14423-nicolasg/&do=hovercard" data-mentionid="14423" href="/index.php?/profile/14423-nicolasg/" rel="">@nicolasg Correct me If I'm wrong, at this point if someone want to show always P1 and P2 in city whould remove else clausole and set the flag to visible at the start of the function, do you confirm?

 

if (pPack->mapAttr & MATT_PEACE || pPack->mapAttr & MATT_WAR)
{
if (pInfo->GetTargetEntity(eTARGET) == penEntity)
{
pInfo->TargetClear(eTARGET);
}
if (pInfo->GetTargetEntity(eTARGET_REAL) == penEntity)
{
pInfo->TargetClear(eTARGET_REAL);
}
// *** to remove :penEntity->SetFlagOn(ENF_HIDDEN);

}
// this ?
else
{
penEntity->SetFlagOff(ENF_HIDDEN);
}

 




- nicolasg - 04-30-2023



10 hours ago, Andrein95 said:




/index.php?/profile/14423-nicolasg/&do=hovercard" data-mentionid="14423" href="/index.php?/profile/14423-nicolasg/" rel="">@nicolasg Correct me If I'm wrong, at this point if someone want to show always P1 and P2 in city whould remove else clausole and set the flag to visible at the start of the function, do you confirm?

 


if (pPack->mapAttr & MATT_PEACE || pPack->mapAttr & MATT_WAR)
{
if (pInfo->GetTargetEntity(eTARGET) == penEntity)
{
pInfo->TargetClear(eTARGET);
}
if (pInfo->GetTargetEntity(eTARGET_REAL) == penEntity)
{
pInfo->TargetClear(eTARGET_REAL);
}
// *** to remove :penEntity->SetFlagOn(ENF_HIDDEN);

}
// this ?
else
{
penEntity->SetFlagOff(ENF_HIDDEN);
}


 




Yes, it is best to comment from the else to the closing brace




- Hassan - 06-29-2023


anyway with p1? this only works with p2.




- Desarija - 06-29-2023



1 hour ago, Hassan said:




anyway with p1? this only works with p2.




Read_net_Pet for P1, Read_net_WildPet for P2