Completely stop the player from moving [SOLVED]

Post Reply
User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Completely stop the player from moving [SOLVED]

by runs » Post

What is the better approach? For a server.

I want to paralyze/release a player.
Last edited by runs on Fri Jul 30, 2021 16:07, edited 1 time in total.

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Completely stop the player from moving

by rubenwardy » Post

The best approach is to attach the player to an entity. This forces the player object into server side authority, rather than client side

https://gitlab.com/rubenwardy/classroom ... freeze.lua
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Completely stop the player from moving

by runs » Post

Ok, OK, thank you! I will literaly to copy it :-)

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Completely stop the player from moving [SOLVED]

by runs » Post

Anyway I would like a player_set_velocity(nil) function as suggested here:

viewtopic.php?t=21432

or player:freeze()
or let a player be a entity to be controlled.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests