#is there theoretically anything wrong with this code?

1 messages ยท Page 1 of 1 (latest)

serene kelp
#

Yeah

#

@sacred brook BetterMaskConfig doesn't implement the IRocketPluginConfiguration interface.

#

If you are using Visual Studio, you should've gotten an error about that already

unreal wasp
#

"theoretically" LMAOO

limber vault
#

do those events even exist?

U.Events.OnPlayerEquipItem
U.Events.OnPlayerUnequipItem
limber vault
#

And UnturnedPlayer has no field called Visible ๐Ÿ˜…
But the plugin structure it self is close ๐Ÿ˜…

#

i use harmony patches in my plugins, so not too sure
I would need to check that

And not sure if you can easily disable name tags, if at all

#

The event you are looking for is:

 PlayerClothing.OnMaskChanged_Global
limber vault
#

Well i guess you will need to check the unturned source for that then

limber vault
#

implementing the event or hiding the name?

#

You should be able to check the event requirements in Visual Studio
by ctrl + left clicking on the event
This will open the source file and highlight the event for you
As you can see the event uses Action of type PlayerClothing so the function will require a PlayerClothing parameter as shown below

PlayerClothing.OnMaskChanged_Global += OnMaskChanged;

private void OnMaskChanged(PlayerClothing playerClothing)
{
  // do stuff
}