ID:176322
 
I want to make a PK system and i have it all typed down but i need one more thing.

When you click on a player you get a window asking if you are sure. you press yes. Then the target sould get the same window but how can i make sure the window is shown to him and not to the usr?

The same problem is when the turns begin.
The attacker gets a window asking what to do (attack, defend) and after inflicting the damage to the target the target sould get a window asking what to do. This window is also appearing to the usr and should be shown to the other guy.

Can anyone help me with this?

Thanks in advance.

Greetz Fint
At the start of the input proc, BEFORE you put anything else, define what should get the window..IE: input(M,"Bleh?","Blah")in src.stuffstoblah
In response to Hanns
Can onone make this more clear cuz i don't get it really :P
In response to Fint
In an input(), you have:
input(This mob gets the message,"This is what it asks","And this is the title of the input window) as A type in wherever.
In response to Hazman
and how can i make a list in it so he can choose yes or no?

switch(input(target,"Wanna fight?","Duel")in list("Yes","No"))

? ? ? ?
In response to Fint
You may also want to take a quick look at the alert proc, it's a little easier as far as yes/no input dialogs...

http://www.byond.com/docs/ref/info.html#/proc/alert
In response to Fint
You got the switch bit right, just use an alert box instead:
switch(alert(target,"Do you want to duel?","Duelling","Yes","No"))
if("Yes")
//Do your duelling code here
else alert("[target] refuses to duel!","Duelling")
Simple as pie once you get used to it.