Vice City Multiplayer
		VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: NeskWriter on November 10, 2012, 10:07:24 am
		
			
			- 
				guyz, can anyone give me PlayerToPoint function? i mean right view (playerid, radius etc)
			
 
			
			- 
				take
[pawn]forward PlayerToPoint(playerid, Float: radius, Float: x, Float: y, Float: z);
public PlayerToPoint(playerid, Float: radius, Float: x, Float: y, Float: z)
{//-----------------------------------------------------------------------------
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   tempposx = (oldposx -x);
   tempposy = (oldposy -y);
   tempposz = (oldposz -z);
   if (((tempposx < radius) && (tempposx > -radius)) && ((tempposy < radius) && (tempposy > -radius)) && ((tempposz < radius) && (tempposz > -radius)))
   {//-------------------------------------------------------------------------
      return 1;
   }//-------------------------------------------------------------------------
   
   return 0;
}//-----------------------------------------------------------------------------[/pawn]
			 
			
			- 
				THANKS!  :D