Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. function HumanDistance( player )
  2. {
  3.     for ( local i = 0; i <= GetMaxPlayers(); i++ )
  4.     {
  5.         local   human = FindPlayer( i ),
  6.                 a;
  7.  
  8.         if ( human && array_ou_conf_de_humans )
  9.         {
  10.             local dist = DistanceFromPoint( player.Pos.x, player.Pos.z, human.Pos.x, human.Pos.y );
  11.             if ( dist < 15 )
  12.             {
  13.                 if ( a ) a = a + ", " + human.Name;
  14.                 else a = human.Name + ".";
  15.             }
  16.             else a = null;
  17.         }
  18.         if ( a ) MessagePlayer( "Humanos próximos: " + b + "." );
  19.         else MessagePlayer( "Nenhum humano por perto." );
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement