Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add player scale #216

Open
wants to merge 3 commits into
base: 13.1
Choose a base branch
from
Open

Conversation

SrLicht
Copy link
Contributor

@SrLicht SrLicht commented Jul 17, 2023

  • Added NetworkIdentity in Player.cs
  • Added Scale in Player.cs
    • It is now possible to change the size of a player from NWAPI.
  • Added SpawnMessage method in Server.cs

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

SrLicht added 2 commits July 17, 2023 08:48
* Added NetworkIdentity in Player.cs
* Added Scale in Player.cs
   *It is now possible to change the size of a player from NWAPI.
* Added SpawnMessage method in Server.cs

# 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
@SrLicht
Copy link
Contributor Author

SrLicht commented Jul 17, 2023

I think I should go to sleep:
imagen

@XLittleLeft
Copy link
Contributor

    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);

@SrLicht
Copy link
Contributor Author

SrLicht commented Jul 28, 2023

    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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants