Diogo_Bras

Untitled

Mar 28th, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.68 KB | None | 0 0
  1. //OnPlayerUpdate
  2. if(PlayerToPoint(RAIO, playerid, Cordenada:X, Cordenada:Y, Cordenada:Z))
  3. {
  4. //Funções a fazer quando o jogador se encontra em cima da cordenada
  5. }
  6.  
  7. //Fim do gm
  8. PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  9. {
  10.     new Float:oldposx, Float:oldposy, Float:oldposz;
  11.     new Float:tempposx, Float:tempposy, Float:tempposz;
  12.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  13.     tempposx = (oldposx -x);
  14.     tempposy = (oldposy -y);
  15.     tempposz = (oldposz -z);
  16.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  17.     {
  18.         return 1;
  19.     }
  20.     return 0;
  21. }
Add Comment
Please, Sign In to add comment