Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualNorman Barrows

Posted 27 April 2013 - 08:16 AM

int isin(float x,float z,float x1,float z1,float x2,float z2)

{

if (x<x1) return(0);

if (x>x2) return(0);

if (z<z1) return(0);

if (z>z2) return(0);

return(1);

}
 
 
if ( isin(player.x,player.z,0.0f,0.0f,80.0f,80.0f))
       {
       //    player is in region 0,0 through 80,80
       }
else
       {
       // player is not in region 0,0 through 80,80
       }
 
 
 
 
 
 

#1Norman Barrows

Posted 27 April 2013 - 08:16 AM

int isin(float x,float z,float x1,float z1,float x2,float z2)

{

if (x<x1) return(0);

 

if (x>x2) return(0);

if (z<z1) return(0);

if (z>z2) return(0);

return(1);

}
 
 
if ( isin(player.x,player.z,0.0f,0.0f,80.0f,80.0f))
       {
       //    player is in region 0,0 through 80,80
       }
else
       {
       // player is not in region 0,0 through 80,80
       }
 
 
 
 
 
 

PARTNERS