Range from Player ??

Posts 16 of 6 · Page 1 of 1
Range from Player ??
Hey Guys

I was thinking if u can make so if u are 2 feet away from a player there will come a text up on the screen saying "You are 2 Feet Away from and then the player name ??


Thanks !
Discussion is that way ->

[php]
CallThisAtOnPlayerConnect()
{
self.nearest = 0;

sDistance = self createFontString( "bigfixed", 0.6 );
sDistance setPoint( "RIGHT", "RIGHT", -90, 165 );
for(;{
foreach(player in level.players){
player checkDist(self);}
wait 0.05;
sDistance setText("Nearest player: " +self.nearest);}
}

checkDist(ownar)
{
dist = Distance2D( self.origin, owner.origin );
if(ownar.nearest < dist)
ownar.nearest = dist;
}[/php]

suppose this could work. anyways it took a while to put that code together
Didnt work just give someting that it dont know what the "owner" colud mean
Quote Originally Posted by egodsk View Post
Didnt work just give someting that it dont know what the "owner" colud mean
what? grammars
Quote Originally Posted by AZUMIKKEL View Post
what? grammars
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?