Quote:
Originally Posted by Engine
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 (pl: allplayers) { pl.chat = "test"; if (pl.x in | HBx - 1.5, HBy - 1.5 | && pl.y in | HBx + 1.5, HBy + 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.5, HBx + 1.5 | && pl.y in | HBy - 1.5, HBy + 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).x
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)