I tried to changing if(id == PossCancha[1][0]) to if(id == PossCancha[2][0]) but didn't worked.
I think
PossCancha[1][0] is catching player and
PossCancha[2][0] is opposite team player because there are some codes:
PHP Code:
SentenceOffside(PossCancha[1][0], PossCancha[2][0], PossCancha[1][1], PossCancha[2][1])
PHP Code:
public SentenceOffside(idoff, idhabil, originoff, originhabil)
idoff = caught player idhabil = opposite team player