PDA

View Full Version : getting players at xy without testplayer


Warcaptain
02-25-2006, 06:17 AM
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
function GetPlayerIndex(tX, tY) {
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
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
this.var = foobar();
or in this case:
temp.plcheck = GetPlayerIndex(69, 96);