
11-01-2005, 07:17 PM
|
|
Banned
|
 |
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
|
|
|
findplayer(account) is the GS2 version of getplayer(account).
It only works on the serverside, because it does all actions to the player you specify.
For example..
findplayer("Yen").hearts = 0;
This would set my hearts to 0.
If you want to find an NPC or player by coordinates, you can use testplayer(x,y) or testnpc(x,y). This returns the ID of the player/NPC on those coordinates. You can then access that player/NPC by npcs[#] or players[#].
For example, if testnpc(30,30) returned 3, you could do npcs[3].chat = "Hi.";
This would set the chat of the NPC at 30,30's chat to 'Hi.' |
|
|
|