mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-14 03:02:22 +01:00
fix winning 1.11, added cheat listplayers
This commit is contained in:
@@ -185,6 +185,27 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
||||
|
||||
SendMessageToConsole(PlayerController, L"Granted item!");
|
||||
}
|
||||
else if (Command == "listplayers")
|
||||
{
|
||||
std::string PlayerNames;
|
||||
|
||||
for (int i = 0; i < ClientConnections.Num(); i++)
|
||||
{
|
||||
auto CurrentPlayerController = Cast<AFortPlayerControllerAthena>(ClientConnections.at(i)->Get("PlayerController"));
|
||||
|
||||
if (!CurrentPlayerController)
|
||||
continue;
|
||||
|
||||
auto CurrentPlayerState = Cast<AFortPlayerStateAthena>(CurrentPlayerController->GetPlayerState());
|
||||
|
||||
if (!CurrentPlayerState)
|
||||
continue;
|
||||
|
||||
PlayerNames += "\"" + CurrentPlayerState->GetPlayerName().ToString() + "\" ";
|
||||
}
|
||||
|
||||
SendMessageToConsole(PlayerController, std::wstring(PlayerNames.begin(), PlayerNames.end()).c_str());
|
||||
}
|
||||
else if (Command == "launch")
|
||||
{
|
||||
if (Arguments.size() <= 3)
|
||||
|
||||
Reference in New Issue
Block a user