Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function HumanDistance( player )//By Lucas
  2. {
  3. for ( local i = 0; i <= GetMaxPlayers(); i++ )
  4. {
  5. local human = FindPlayer( i ),
  6. // dist = DistanceFromPoint( player.Pos.x, player.Pos.z, human.Pos.x, human.Pos.y ),
  7. dist = sqrt( ( ( human.Pos.x - player.Pos.x ) * ( human.Pos.x - player.Pos.x ) ) + ( ( human.Pos.y - player.Pos.y ) * ( human.Pos.y - player.Pos.y ) ) );
  8. a;
  9.  
  10. if ( human && status[ human.ID ].Profile < 3 )
  11. {
  12. if ( dist.tointeger() < 15 )
  13. {
  14. if ( a ) a = a + ", " + human.Name;
  15. else a = human.Name + ".";
  16. }
  17. }
  18. }
  19. if ( a ) P_MSG( "Humanos proximos: " + b + ".","Human nearby: " + b + ".", player, 3 );
  20. else P_MSG( "Nenhum humano por perto.","No human around.", player, 1 );
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement