IsPlayerSleeping
Whether a player is lying in a bed.
From the moment they lie down to the moment they are up again, as their game last reported it (OnPlayerSleep).
Syntax
Section titled “Syntax”IsPlayerSleeping(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”boolean, or nil and "not connected"
Example
Section titled “Example”if IsPlayerSleeping(pid) then SendClientMessage(pid, COLOR_WHITE, "You toss and turn.") endSee also
Section titled “See also”OnPlayerSleep · EndPlayerSleep · the Beds and sleep group of the index
