View Single Post
  #13  
Old 02-06-2010, 10:03 PM
Grey Grey is offline
Classic Developer
Grey's Avatar
Join Date: Mar 2007
Location: Wales, UK
Posts: 134
Grey will become famous soon enough
Send a message via AIM to Grey
Quote:
Originally Posted by Engine View Post
Alright, this might as well be renamed to my help thread
Can I do this clientside because it's not working for me clientside and I seem to remember reading that you can seartch through all the players x/y clientside?
PHP Code:
  for (plallplayers) {
    
pl.chat "test";
    if (
pl.x in HBx 1.5HBy 1.5 | && pl.y in HBx 1.5HBy 1.5 | ) {
      
pl.chat "hit.";
    }
  } 
I think your problem is that you're checking the player x and player y against both an x and y value.

PHP Code:
if (pl.x in HBx 1.5HBx 1.5 | && pl.y in HBy 1.5HBy 1.5 | ) { 
But also, if you need to player actions serverside you can use FindPlayer(), for example finding a player's x would be done via

PHP Code:
FindPlayer(pl).
And finally, allplayers I believe is all players on the server and players is all players in the current level (not sure what you're trying to do but players might be a better option)
Reply With Quote