destroying an object with a specific viewid, photonnetwork.

i want to destroy an object with a specific view ID, i can get the view id from a collision, now i want to use it in order to destroy that specific gameobject. (the gameobject is a player). this is my attempt.

	[RPC] void OnCollisionEnter (Collision collision) {
		//Destroy (GameObject);
		if(collision.gameObject){
			//this is all failed attempts to try to do this..
			int denis = collision.contacts[0].otherCollider.GetComponent<PhotonView>().viewID;
			PhotonNetwork.Destroy (photonView.viewID (denis));
			
			
			
			Debug.Log ("view id of hit:" + denis);

thanks in advance!

Use a function that get called for everybody like my

Calling it like
mainPhotonView.RPC(“Destroy”, photontarget.all, 1001); // exampl

[PunRPC]
Void Destroy(int viewID)
{
Destroy(PhotonView.Find(viewID).gameObject);
}

It requires the use of RPC calls, I wrote this question in 2013, that project will not get revived…ever again.