# Proper use of Switch Has Authority

**URL:** <https://forums.unrealengine.com/t/proper-use-of-switch-has-authority/298229>\
**Category:** Platform & Builds\
**Tags:** Networking, custom-event, Switch, unreal-engine, UE4, Blueprint, question\
**Created:** [November 5, 2014, 4:54pm UTC](https://forums.unrealengine.com/t/proper-use-of-switch-has-authority/298229 "2014-11-05T16:54:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [April 15, 2024, 1:42am UTC](https://forums.unrealengine.com/t/proper-use-of-switch-has-authority/298229/3 "2024-04-15T01:42:12Z")

</div>

> [@eXi](#):
>
> if the player is the client or the server.

apparently it doesn’t exactly check for server/client but for owning/not-owning

> [@Am I Server or Client?](https://forums.unrealengine.com/t/am-i-server-or-client/461944/3):
>
> I have finally figured out What HasAuthority actually means after a couple of days of testing. I think this will be very helpful to many people. HasAuthority does not tell you if the instance of the game is the server or the client. It is telling you if the actor you are running the HasAuthority check on belongs to the server or the client. So you can have a game running on a client return true to HasAuthority even if that actor was not spawned by the Client. So as an example - If the server s…

> [@HasAuthority() returning true for Client](https://forums.unrealengine.com/t/hasauthority-returning-true-for-client/54394/9):
>
> If you play in Standalone then there is no networked game - it’s like being a Server without any networking layer. Obviously in Standalone, everything is running on your local machine so HasAuthority() would always be true.

> [@How to check if Client is Listen Server?](https://forums.unrealengine.com/t/how-to-check-if-client-is-listen-server/376681/8):
>
> Great answer. i could not find those nodes in cpp. and IsServer is deprecated but no notice of what to use instead. i’ve been using IsNetMode(NM\_Client) there’s also NM\_Standalone and NM\_Server

---

_[View the full topic](https://forums.unrealengine.com/t/proper-use-of-switch-has-authority/298229)._
