Space Plunder
Loading...
Searching...
No Matches
GetCurrentPlayers.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4#pragma warning(disable:4996)
5#pragma warning(disable:4265)
6#pragma warning(disable:4701)
7
8#include "CoreMinimal.h"
9#include "SteamRequests.h"
10#include "Kismet/BlueprintAsyncActionBase.h"
11#include "SteamRequests.h"
12#pragma push_macro("ARRAY_COUNT")
13#undef ARRAY_COUNT
14
15#if USING_CODE_ANALYSIS
16MSVC_PRAGMA(warning(push))
17MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
18#endif
19
20#include "OnlineSubsystem.h"
21#include "OnlineSubsystemSteam.h"
22#include <steam/steam_api.h>
23
24#if USING_CODE_ANALYSIS
25MSVC_PRAGMA(warning(pop))
26#endif
27
28#pragma pop_macro("ARRAY_COUNT")
29
30#include "GetCurrentPlayers.generated.h"
31
33DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FResponseGetPlayersDelegate, const int32, NumOfPlayers, int32, SteamErrorOutput);
35UCLASS()
36class STATSINTEGRATION_API UGetCurrentPlayers : public UBlueprintAsyncActionBase
37{
38 GENERATED_BODY()
39
40public:
41 UPROPERTY(BlueprintAssignable)
42 FResponseGetPlayersDelegate OnSuccess;
43 UPROPERTY(BlueprintAssignable)
44 FResponseGetPlayersDelegate OnFailure;
45
46
47 // Retrieves the number of players currently playing your game (online + offline)
48 // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
49 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
50 static UGetCurrentPlayers* GetNumberOfCurrentPlayers();
51
52private:
53 FOnlineSubsystemSteam* SteamSubsystem;
54 virtual void Activate() override;
55
56 void GetTotalPlayers();
57
58 int32 TotalCurrentPlayers;
59
60 void OnGetTotalPlayers(NumberOfCurrentPlayers_t* pGetCurrentPlayersResult, bool bIOFailure);
61 CCallResult<UGetCurrentPlayers, NumberOfCurrentPlayers_t> m_callGetCurrentPlayersResult;
62
63};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FResponseGetPlayersDelegate, const int32, NumOfPlayers, int32, SteamErrorOutput)
Definition GetCurrentPlayers.h:37