Author Topic: PlayerToPoint  (Read 2581 times)

0 Members and 1 Guest are viewing this topic.

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
PlayerToPoint
« on: November 10, 2012, 10:07:24 am »
guyz, can anyone give me PlayerToPoint function? i mean right view (playerid, radius etc)


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline [Saint]

  • Made Man
  • ***
  • Posts: 126
  • Pawn scripting for SA:MP and VC:MP
    • View Profile
    • vk.com/vicecitymultiplayer
Re: PlayerToPoint
« Reply #1 on: November 10, 2012, 10:13:19 am »
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]


Russian Сommunity

Вступайте в группу: vk.com/vicecitymultiplayer

My profile on sa-mp.com

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: PlayerToPoint
« Reply #2 on: November 10, 2012, 10:16:25 am »
THANKS!  :D


-Funniest quotes-

Quote from: asad3man
i cant able to understand