Sign in to follow this  
JensDerZocker

player freeze

Recommended Posts

I try to freeze a player but it doesn't work

This function is not working on Client side please help me

mp.players.local.freezePosition(true);

Share this post


Link to post
Share on other sites

Did you add an event handler?

 

public class Main : Events.Script
{
        public Main()
        {
            Events.Add("FreezePlayerClient", FreezePlayer); // Call this event from server-side //
        }
        public void FreezePlayer(object [] args)
        {
            Player.LocalPlayer.FreezePosition((bool)args[0]);
        }
}

 

Edited by $kylar

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.