I'm trying with the next code in lua
The text is printing, but the player can stand up any time.Code:function PLUGIN:OnPlayerSleepEnded(player) print("TEST") return false end
Is possible hold sleeping a player?
Sorry for my english
Solved Cancel OnPlayerSleepEnded?
Discussion in 'Rust Development' started by Xephiro, May 4, 2015.
-
Wulf Community Admin
There is no return behavior, so no way to cancel it. All you could do is put them back to sleep.
-
Code:
function PLUGIN:OnPlayerSleepEnded(player) print("TEST") player:StartSleeping() end
-
Exist any other Function called after OnPlayerSleepEnded? -
probably needs to put a fimer then
timer.Once(0.1, function() player:StartSleeping() end, self.Plugin)
don't remember