# Multiplayer: How to check that the player is ready

**URL:** <https://forums.unrealengine.com/t/multiplayer-how-to-check-that-the-player-is-ready/293446>\
**Category:** Multiplayer & Networking\
**Tags:** check, unreal-engine, Multiplayer, question, CPP\
**Created:** [September 11, 2014, 4:40pm UTC](https://forums.unrealengine.com/t/multiplayer-how-to-check-that-the-player-is-ready/293446 "2014-09-11T16:40:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiniTurtle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiniTurtle](https://forums.unrealengine.com/u/MiniTurtle)\
**Post date:** [September 11, 2014, 4:40pm UTC](https://forums.unrealengine.com/t/multiplayer-how-to-check-that-the-player-is-ready/293446/1 "2014-09-11T16:40:52Z")

</div>

Hi,  
as the titles says. My client player start receiving message before it even has had the chance to create its AGameState.

I tried checking (below) before sending data to client

```
if (APawn->GetNetConnection()->State == EConnectionState::USOCK_Open)
{
    // Send data
}

```

This doesn’t work

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![MiniTurtle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiniTurtle](https://forums.unrealengine.com/u/MiniTurtle)\
**Post date:** [September 19, 2014, 12:12pm UTC](https://forums.unrealengine.com/t/multiplayer-how-to-check-that-the-player-is-ready/293446/2 "2014-09-19T12:12:29Z")

</div>

Anyone who wants to know how I did a workaround here it is:

File .h

```
 class AMyCharacter : public ACharacter
    {
    ...

    virtual void OnRep_Controller() override;

    private:
        /** Sends ready message from client to server */
    	UFUNCTION(Reliable, Server, WithValidation)
    	void SRecvReady();

        #ifdef WITH_SERVER_CODE
        /** Player status */
	bool bReady;
        #endif
    ...
    }

```

File .cpp

```
void AMyCharacter::OnRep_Controller()
{
	Super::OnRep_Controller();

	if (IsLocallyControlled())
	{
		SRecvReady();
	}
}

void AMyCharacter::SRecvReady_Implementation()
{
#ifdef WITH_SERVER_CODE
	bReady = true;
#endif
}

bool AMyCharacter::SRecvReady_Validate()
{
#ifdef WITH_SERVER_CODE
	// Check if player already sent ready message
	return (!bReady);
#endif
        return false;
}

```

Hope this helps someone 🙂
