Jump to content

Lock players position.


lordkabab

Recommended Posts

How can I do this?

I've seen it on an amunation script where the player enters a marker and then gets locked into it (so they can't move) untill thy finish buying weapons, how can I make it so that it un locks them when they type a command (it's for a toll booth so the command will be a payment one)?

Link to comment

Hy Kabab Its philly.. anyway from what I understand You would like to lock the player in the marker until a certain command is entered. 1 Way to do this would be to disable the players controls like

toggleAllControls ( thePlayer, false ) 

<< That would completly freeze him or their is like

toggleControl ( thePlayer, "forwards", false ) 
toggleControl ( thePlayer, "backwards", false ) 
toggleControl ( thePlayer, "left", false ) 
toggleControl ( thePlayer, "right", false ) 

^^^disable the specific movement controls

Link to comment

Create a small object inside the marker on ground level and attach/detach the player on top of that object. This is probably the best way of doing it. Because like you said if someone is running, disabling controls does not instantly make the player stop moving. As a result the player may freeze outside the marker.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...