Open SrLicht opened 1 year ago
I think I should go to sleep:
Add them
public static bool PlayerScaleIs(this Player target, Vector3 scale) => target.GameObject.transform.localScale == scale;
public static bool PlayerScaleIs(this Player target, float scale) => PlayerScaleIs(target, Vector3.one * scale);
Add them public static bool PlayerScaleIs(this Player target, Vector3 scale) => target.GameObject.transform.localScale == scale; public static bool PlayerScaleIs(this Player target, float scale) => PlayerScaleIs(target, Vector3.one * scale);
Unnecessary, you can already do it without an extension
if(ev.Player.Scale == new Vector3(1, 1, 1))
{
// your code here
}
Credits
This method was taken from https://github.com/Axwabo/AdminTools-NWAPI/blob/master/AdminTools/EventHandlers.cs#L154 which in is a fork of Exiled RemoteAdmin