Oblivion_UFF

asdasd

Feb 11th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. ProxDetector(Float: radius, playerid, string[], col1, col2, col3, col4, col5) {
  2. new
  3. Float: x,
  4. Float: y,
  5. Float: z
  6. ;
  7. if(GetPlayerPos(playerid, x, y, z))
  8. {
  9. new
  10. interior = GetPlayerInterior(playerid),
  11. virtualworld = GetPlayerVirtualWorld(playerid)
  12. ;
  13. foreach(Player, i)
  14. {
  15. if((InsideShamal[playerid] == GetPlayerVehicleID(i) && GetPlayerState(i) == 2) || (InsideShamal[i] == GetPlayerVehicleID(playerid) && GetPlayerState(playerid) == 2) || (InsideShamal[playerid] != INVALID_VEHICLE_ID && InsideShamal[playerid] == InsideShamal[i]))
  16. {
  17. SendClientMessageEx(i, col1, string);
  18. }
  19. else if((GetPlayerInterior(i) == interior) && (GetPlayerVirtualWorld(i) == virtualworld))
  20. {
  21. switch(floatround((radius / GetPlayerDistanceFromPoint(i, x, y, z)), floatround_floor))
  22. {
  23. case 0: {} // not in range
  24. case 1: SendClientMessageEx(i, col5, string);
  25. case 2, 3: SendClientMessageEx(i, col4, string);
  26. case 4..7: SendClientMessageEx(i, col3, string);
  27. case 8..15: SendClientMessageEx(i, col2, string);
  28. default: SendClientMessageEx(i, col1, string); // 16 or over
  29. }
  30. }
  31. }
  32. return true;
  33. }
  34. return false;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment