Skip to content
Haru edited this page Oct 19, 2016 · 1 revision

Syntax

  • playerattached();

Description

Returns the RID of the player currently attached to the script. It will return 0 if none is attached, or if the attached player is no longer on the map server. It is wise to check for the attached player in script functions that deal with timers as there is no guarantee the player will still be logged on when the timer triggers.

Example

 [[if]](!playerattached())
 {
     [[announce]] "It appears, that the winner could not even wait 5 seconds for the prize..",bc_all;
     [[end]];
 }
 
 [[getitem]] 512,100;  // Apple
 mes "Here you go, enjoy your prize.";
 [[close]];

Category:Script_Command

Clone this wiki locally