# Send a message from client to server

**URL:** <https://forums.unrealengine.com/t/send-a-message-from-client-to-server/398858>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, Replication, tarray:-arrays-in-un, unreal-engine, Scripting, CPP, question\
**Created:** [June 16, 2017, 8:11pm UTC](https://forums.unrealengine.com/t/send-a-message-from-client-to-server/398858 "2017-06-16T20:11:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo94](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neo94](https://forums.unrealengine.com/u/Neo94)\
**Post date:** [June 16, 2017, 8:11pm UTC](https://forums.unrealengine.com/t/send-a-message-from-client-to-server/398858/1 "2017-06-16T20:11:54Z")

</div>

Hello Guys i try to send a message from client to server ,when i sent a message from a client i received that separated, each client have a array , but i don’t want this i want common array for clients .  
on the screenshot u see i have 2 separate client but my array show me online player : 1 but it should be 2 !  
i hope u understand me 🙂  
thank you for regarding.

.CPP  
TArray last\_Online\_players;  
TArray Client\_ID\_on\_status\_checking = { 1 };

```
    void UChecking_Offline::SetSomeBool(const TArray<int32>& awdd)
    {
    	
    
    }
    
     bool UChecking_Offline::ServerSetSomeBool_Validate(const TArray<int32>& awdd)
    {
    	
    	return true;
    }
    
    void UChecking_Offline::ServerSetSomeBool_Implementation(const TArray<int32>& awdd)
    {
    	
    	
    	
    	
    		if (last_Online_players.Find(Client_ID)) last_Online_players.Add(Client_ID);
    		
    	
    	SetSomeBool(last_Online_players);
    }
    
    
    
    
    
    
   
    
    void UChecking_Offline::Clinet_Joined()
    {
    	void ServerSetSomeBool_Implementation(const TArray<int32>& awdd);
    	{
    		
    	
    		
    		if (last_Online_players.Find(Client_ID)) last_Online_players.Add(Client_ID);
    
    		
    		FString NewString = FString::FromInt(last_Online_players.Num());
    		UE_LOG(LogTemp, Log, TEXT("online players: %s"), *NewString);
    		GEngine->AddOnScreenDebugMessage(-1, 0.5f, FColor::Yellow, "online players :"+ FString::FromInt(last_Online_players.Num()));
    	
    		
    	}**

```

HEADER

```
class ALPHA_BP_C_API UChecking_Offline : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
		
public:
		UFUNCTION(BluePrintCallable, Category = "Offline Checking")
	    static void Clinet_Joined();
		UFUNCTION(BluePrintCallable, Category = "Offline Checking")
			static void All_Online_Players();
		UFUNCTION(BluePrintCallable, Category = "Offline Checking")
			static void Status_checking();
	
		 bool awdd;

		void SetSomeBool(const TArray<int32>& awdd);

		UFUNCTION(reliable, server, WithValidation)
		 void ServerSetSomeBool(const TArray<int32>& awdd);
		
};

```

 ![Untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/b/5bef6e513f6de838962a4714f187dc8f75f3cf6d.jpeg)

 ![BP.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/b/5bfd421e8532a51a8c8f2df7c55439f7caa34f42.jpeg)
