Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OnPlayerUpdate
- if(PlayerToPoint(RAIO, playerid, Cordenada:X, Cordenada:Y, Cordenada:Z))
- {
- //Funções a fazer quando o jogador se encontra em cima da cordenada
- }
- //Fim do gm
- PlayerToPoint(Float:radi, playerid, 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 < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment