Advertisement
Guest User

Untitled

a guest
Aug 16th, 2023
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. function ProxDetector(Float:radi, playerid, string[],col1) {
  2. new Float:posx, Float:posy, Float:posz;
  3. new Float:oldposx, Float:oldposy, Float:oldposz;
  4. new Float:tempposx, Float:tempposy, Float:tempposz;
  5. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  6. foreach(new i : Player) {
  7. if(GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)) {
  8. if(!BigEar[i]) {
  9. GetPlayerPos(i, posx, posy, posz);
  10. tempposx = (oldposx -posx);
  11. tempposy = (oldposy -posy);
  12. tempposz = (oldposz -posz);
  13. if(((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) {
  14. SendClientMessage(i, col1, string); }
  15. else if(((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) {
  16. }
  17. else SendClientMessage(i, col1, string);
  18. }
  19. }
  20. return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement