void Start () {
pv = GetComponent<PhotonView>();
viewid = pv.viewID;
}
void Update () {
if (Input.GetKeyDown(KeyCode.Space))
{
pv.RPC("equipWeapon", PhotonTargets.All, viewid);
}[PunRPC]
public void equipWeapon(int id)
{
if (id != viewid)
return;
// equip weapon
}
I am trying to equip playerweapons through network.
Problem is both my players are equiping weapons, even though i am comparing thier view id
Any1 knows how to do this??