Skip to content
This repository was archived by the owner on Jun 21, 2025. It is now read-only.

Add player scale - #216

Open
SrLicht wants to merge 3 commits into
northwood-studios:13.1from
SrLicht:add-player-scale
Open

Add player scale#216
SrLicht wants to merge 3 commits into
northwood-studios:13.1from
SrLicht:add-player-scale

Conversation

@SrLicht

@SrLicht SrLicht commented Jul 17, 2023

Copy link
Copy Markdown
Contributor
  • 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

* 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

SrLicht commented Jul 17, 2023

Copy link
Copy Markdown
Contributor Author

I think I should go to sleep:
imagen

@XLittleLeft

Copy link
Copy Markdown
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

SrLicht commented Jul 28, 2023

Copy link
Copy Markdown
Contributor Author
    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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants