Jump to content

1 post in this topic

Recommended Posts

Posted

Hi guys, I need help on how to get player list on photon..

i tried this:
But it would alert 1 time when theres 10 people in the server, idk what im doing wrong?

#pragma once
#include "../../../menu/includes.h"
 
inline uintptr GetPlayers() {
  Il2CppClass *photonNet = UnityClass::Find("Photon.Pun", "PhotonNetwork");
  static auto getPlayerList = reinterpret_cast<uintptr(*)(void)>(
      UnityClass::Utils::GetMethodPointer("Photon.Pun.PhotonNetwork",
                                          "get_PlayerList", 0));
 
  uintptr PlayerArray = getPlayerList();
 
  if (!PlayerArray) {
    return 0;
  }
 
  int32 Count = *reinterpret_cast<int32*>(PlayerArray + 0x18);
 
  for (int32 i = 0; i < Count; i++)
  {
    show_alert("Mod", "Counting..");
  }
 
  return PlayerArray;
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines