09-12-2016, 03:50 AM
(09-12-2016, 03:40 AM)NiLSPACE Wrote: A simple
function OnPlayerMoving(Player) if (Player:GetPosY() < 0) then local World = Player:GetWorld() Player:TeleportToCoords(World:GetSpawnX(), World:GetSpawnY(), World:GetSpawnZ()) end endAlso, don't forget to add the hook on initialization of the plugin:
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving);
Thanks! I did have the hook in, just forgot to mention that. I tested your change and it does seem to teleport the player but it seems glitched on my client. I also tried in native MC 1.10.2 and still seeing the glitch. It looks almost like a video refresh issue. It flickers like crazy.