Help! how can i use this?

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
public static void RPC(string methodName, PhotonTargets target) { }

Help me please
 

libModz

Awesome Active Platinian
Jun 2, 2022
167
29
28
UK
You need a monoString struct. Then you can hook it like this...

void *(*RPC)(monoString*, int);

Then use it like this...

RPC((CreateMonoString("TypeMethodNameHere"), 0);

0 = All Photon Targets (sends to everyone)
 

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
You need a monoString struct. Then you can hook it like this...

void *(*RPC)(monoString*, int);

Then use it like this...

RPC((CreateMonoString("TypeMethodNameHere"), 0);

0 = All Photon Targets (sends to everyone)
I still have doubts, "MethodName" Can it be anyone inside the dump or just a few specific ones?
 

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
In the dump the methods you can use have [PunRPC] above it
I have one last question?


public static void RPC(PhotonEventTag tag, PhotonPlayer player, object[] parameters) { }

What does the "object[]" list of objects refer to? I'm a beginner and I'm trying to understand better
 

·҉ dollaz·҉. .

Approved iModder
Approved iModder
Mar 26, 2021
159
1,819
193
Somewhere
I have one last question?


public static void RPC(PhotonEventTag tag, PhotonPlayer player, object[] parameters) { }

What does the "object[]" list of objects refer to? I'm a beginner and I'm trying to understand better
🤷🏽‍♂️ I’ve been trying to figure out the same thing
 

libModz

Awesome Active Platinian
Jun 2, 2022
167
29
28
UK
I have one last question?


public static void RPC(PhotonEventTag tag, PhotonPlayer player, object[] parameters) { }

What does the "object[]" list of objects refer to? I'm a beginner and I'm trying to understand better
All I know is that it's an object array. I can't figure out how to write that part in lgl C++

The params keyword is C# and lgl menu is C++ there is not a params keyword in C++ afaik. I have no idea how other modders have managed to do it. It's very complicated, and I'm still ne
🤷🏽‍♂️ I’ve been trying to figure out the same thing
Bomb Hacker knows how, and uses RPC with parameters in his menus but he won't share how, at least not with me, so 🤷
 

Raebydett

Awesome Active Platinian
Jan 20, 2020
171
60
28
G
Because we did this stuff years ago. For ex; odysee.com/@Rev:6/Trolling-Forward-Assault-Developers-By-Banning-Them-xBrea:4
No offense, im not saying its not doable just want to know how this guy know BombHacker using rpc without he share src/mention somewhere else
 

xRev

Rookie
May 29, 2022
2
1
3
North Pole
No offense, im not saying its not doable just want to know how this guy know BombHacker using rpc without he share src/mention somewhere else
Because it's not *very* public info. Very few people know how to go about doing it, which is why you won't see much of it being mentioned👍Those that do accomplish the task pretty much do it without any web assistance; Bomb was able to use RPC because as a team, we were collectively working on it in 2021. If I remember correctly, there are some resources that may be helpful to you on UC.
 
  • Like
Reactions: libModz

libModz

Awesome Active Platinian
Jun 2, 2022
167
29
28
UK
No offense, im not saying its not doable just want to know how this guy know BombHacker using rpc without he share src/mention somewhere else
Because I asked him and he told me. That is usually how one finds out information from another. 🤷
 

libModz

Awesome Active Platinian
Jun 2, 2022
167
29
28
UK
I have one last question?


public static void RPC(PhotonEventTag tag, PhotonPlayer player, object[] parameters) { }

What does the "object[]" list of objects refer to? I'm a beginner and I'm trying to understand better
Basically some PUN RPC methods have parameter types such as int, float, bool & void*, you have to box these values then they get placed into the object[] that Photon RPC uses. I've figured out how to do it thanks to help from another modder, send me a message if you need help with it.
 
  • Like
Reactions: RazerTexz

Trrex

Platinian
Sep 3, 2023
29
1
8
25
Basically some PUN RPC methods have parameter types such as int, float, bool & void*, you have to box these values then they get placed into the object[] that Photon RPC uses. I've figured out how to do it thanks to help from another modder, send me a message if you need help with it.
Can u give a example how to hook RPC bcz I been struggling how to use rpc for long time and found nothing
 
Feb 14, 2024
3
0
1
36
Para usar o RPC com parâmetros em seus menus, você precisa saber como conectar os métodos corretamente. Vou explicar detalhadamente:

1. **Definição do método RPC**: Primeiro, você precisa definir o método RPC em sua classe. Por exemplo:

```cpp
public static void RPC(tag PhotonEventTag, player PhotonPlayer, parâmetros object[]) { }
```

2. **Preparação das parâmetros**: As parâmetros do método RPC geralmente são enviadas como uma lista de objetos. Você precisa inserir os valores dos parâmetros desejados e colocá-los nessa lista. Por exemplo:

```cpp
objeto[] parâmetros = novo objeto[] { valor1, valor2, valor3 };
```

3. **Chamada do método RPC**: Agora, você pode chamar o método RPC com as configurações preparadas. Por exemplo:

```cpp
RPC("NomeMetodo", destino, parâmetros);
```

Lembre-se de substituir "MethodName" pelo nome do método que deseja chamar e definir corretamente as configurações na lista de objetos. Isso é crucial para que o RPC funcione corretamente.

Agora, você tem o conhecimento necessário para usar o RPC com parâmetros em seus menus. Use com sabedoria, pois o poder que você busca pode ter um preço terrível.
 
Feb 14, 2024
3
0
1
36
Você pode dar um exemplo de como conectar o RPC bcz. Estou lutando para usar o rpc há muito tempo e não encontrei nada
[/CITAR]
Claro, você vai dar um exemplo de como conectar o RPC com parâmetros em seu código. Aqui está um exemplo básico em C++:

Suponha que você tenha um método chamado `RPC` definido em uma classe chamada `MyClass`. Você deseja chamar esse método com duas parâmetros: um inteiro e uma string.

1. **Definição do método RPC na classe MyClass**:

```cpp
class MinhaClasse {
público:
static void RPC(int intValue, const std::string& stringValue) {
// Implementação do método RPC aqui
}
};
```

2. **Preparação das parâmetros antes de chamar o método RPC**:

```cpp
int intValor = 10;
std::string stringValue = "Exemplo de string";
```

3. **Chamada do método RPC com as parâmetros preparadas**:

```cpp
MinhaClasse::RPC(intValue, stringValue);
```

Para ajustar a implementação, certifique-se de que o método `RPC` de acordo com o que você precisa fazer dentro dele. Este exemplo simplesmente demonstra como chamar o método com os parâmetros desejados.

Lembre-se de adaptar este exemplo ao seu código específico e às suas necessidades. Se você tiver dúvidas adicionais ou precisar de mais ajuda, estou à disposição.