Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   getting players at xy without testplayer (https://forums.graalonline.com/forums/showthread.php?t=64344)

Warcaptain 02-25-2006 06:17 AM

getting players at xy without testplayer
 
so.. apparently testplayer(x,y) only works on players who arent paused

so.. how do i do this without that??

Warcaptain 02-25-2006 06:47 AM

ps: paused is disabled in the game.. it doesnt even detect them if they are paused because they went to a different window :-\

ApothiX 02-27-2006 03:27 PM

PHP Code:

function GetPlayerIndex(tXtY) {
  for(
temp.i=0;temp.i<players.size();temp.i++) {
    if(
tX in |players[i].x,players[i].x+3| && tY in |players[i].y,players[i].y+3|) {
      return 
temp.i;
    }
  }

  return -
1;



xXziroXx 03-25-2006 02:57 AM

How do I check WHAT is returned? Just like:

this.var = params[0];

or? Ive never done it before D:

Tolnaftate2004 03-25-2006 03:15 AM

Quote:

Originally Posted by xXziroXx
How do I check WHAT is returned? Just like:

this.var = params[0];

or? Ive never done it before D:

this.var = foobar();

ApothiX 03-25-2006 06:42 PM

Quote:

Originally Posted by Tolnaftate2004
this.var = foobar();

or in this case:
PHP Code:

temp.plcheck GetPlayerIndex(6996); 



All times are GMT +2. The time now is 12:38 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.