Leader trouple?

Ok, I have two players on a level. Im using the following scrip:

if (created) {dontblock; timeout=0.05;}
if (timeout) {
 temp.a = testplayer(x,y);
    if (temp.a > -1){
toinventory flaggy;


The flag will apear only on the player who was on the level first, even if it is the other player touching the npc.
What am I missing?
Sorry for the likely stupid question.

EDIT: I can use timereverywhere so both will get the flag, but only the player touching the npc is supposed to get it.

I think you need timereveywhere so all players run the loop

Aye, I just edited my post. But only the guy touching npc area should get the flag.

Use serverstrings as flags

Use playertouchsme

I think you’re missing the point.

If you want the leader to be in control, there’s a flag for that person. Why not use it?

I want the npc to add the flag (or do other stuff) for the player who is in the are of affect. Regardless of who was on the level first.

Wtf is testplayer. Use in conditionals.

Umm, example?

I don’t know. Why don’t you use it?