Ayuda IsPlayerInRangeOfPoint
#3

Yo uso una funciуn:

pawn Код:
CercaDe(playerid, Float:radio, Float:x, Float:y, Float:z)
{
  new Float:vposx, Float:vposy, Float:vposz, Float:posx, Float:posy, Float:posz; GetPlayerPos(playerid, vposx, vposy, vposz);
  posx = (vposx -x); posy = (vposy -y); posz = (vposz -z);
  if (((posx < radio) && (posx > -radio)) && ((posy < radio) && (posy > -radio)) && ((posz < radio) && (posz > -radio)))
  { return 1; }
  return 0;
}
Y se usarнa asн:

pawn Код:
// Arriba.
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(PRESSED(KEY_FIRE))
  {
    if(CercaDe(playerid, Radio, Coordenadas)
    {
      SendClientMessage(playerid, Azul, "* Has hecho clic con el ratуn en nuestra zona de prueba.");
    }
  }
  return 1;
}

Reply


Messages In This Thread
Ayuda IsPlayerInRangeOfPoint - by Master[Pro] - 08.06.2010, 04:25
Re: Ayuda IsPlayerInRangeOfPoint - by leaNN! - 08.06.2010, 16:30
Re: Ayuda IsPlayerInRangeOfPoint - by CristianTdj - 08.06.2010, 21:18
Re: Ayuda IsPlayerInRangeOfPoint - by MrDeath537 - 08.06.2010, 21:52
Re: Ayuda IsPlayerInRangeOfPoint - by TheChaoz - 08.06.2010, 22:00
Re: Ayuda IsPlayerInRangeOfPoint - by Master[Pro] - 09.06.2010, 01:02

Forum Jump:


Users browsing this thread: 4 Guest(s)