Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 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.                 a;
  8.  
  9.         if ( human && status[ human.ID ].Profile < 3 )
  10.         {
  11.             if ( dist.tointeger() < 15 )
  12.             {
  13.                 if ( a ) a = a + ", " + human.Name;
  14.                 else a = human.Name + ".";
  15.             }
  16.         }
  17.     }
  18.     if ( a ) P_MSG( "Humanos proximos: " + b + ".","Human nearby: " + b + ".", player, 3 );
  19.     else P_MSG( "Nenhum humano por perto.","No human around.", player, 1 );
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement