Closed D1GQ closed 3 months ago
It’s gonna sound crazy but SendNewPlayerValuesClientRpc
cannot be called from the client. It can only be called when the host calls your client RPC.
Why???
So I was surprised too but if you read SendNewPlayerValuesClientRpc
, there's a line here.
if (__rpc_exec_stage != __RpcExecStage.Client || (!networkManager.IsClient && !networkManager.IsHost))
{
return;
}
Basically, this checks if the method is called from the client or the host. In this case, if it is called from the client, it returns.
If we really wanted to we could patch that out but it's really not necessary.
Yeap, which is why rather than patching it out, I just brought over what was necessary.
Helper.GameNetworkManager?.currentLobby?.Members.ForEach((i, member) => {
if (Helper.LocalPlayer?.playerSteamId == member.Id.Value) return;
PlayerControllerB player = __instance.playersManager.allPlayerScripts[i];
player.playerSteamId = member.Id.Value;
player.playerUsername = member.Name;
player.usernameBillboardText.text = member.Name;
__instance.playersManager.mapScreen.radarTargets[i].name = player.playerUsername;
__instance.quickMenuManager.AddUserToPlayerList(player.playerSteamId, player.playerUsername, i);
});
return false;
So is this still an issue? Can we close this?
Yeah we can
Problem
Hey I've been trying to find a way to spoof players names and steam IDs, slowly bringing my head against the wall, and I noticed an issue in the AntiKick, because you're returning SendNewPlayerValuesServerRpc as false, you are preventing the RPC to start SendNewPlayerValuesClientRpc, don't know if that's intentional or not, here is a fix
Fix
AntiKickPatch.cs