![]() |
mouse -> ID
you pass a players ID into with(allplayers(i)) do you not?
how would i say, get this ID # from a player when i say, click on them... i don't think its testplayer, because that gets index... |
NPC Code: All players ID can't be found unless you check the logs (Alt+0) for when the player entered: Added player Termina_Owner (id: 2) Clear? |
Re: mouse -> ID
Quote:
Player IDs are not neccessarily sequential, because if a player with a lower ID logs off, the higher ones to not change their ID. Thus, you could not do for (i = 0; i < allplayerscount; i ++) ... If you want to find a certain player, you can use testplayer to get his index, then use that index with #a() to get his account name, and use with (getplayer()). |
Erm... Global Player ID is shown in two places: Log Frame, and RC.
But programming-speaking, the only way would be doing the for loop with allplayerscount, which would produce somewhat a lot of lag. |
Would be easier if we could use mousex/y serverside.
You could do NPC Code: if it was serverside. I suppose you could check for mousedown on the clientside, triggeraction the mouse coordinates, then do NPC Code: |
Erm.. Save work for serverside: Send the value of testplayer.
NPC Code: Though, that's ineffective: It'll send when the index is -1. |
So check that id != -1
|
Quote:
|
| All times are GMT +2. The time now is 01:19 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.