Answered Freeze player with them being able to spin.

Discussion in 'Call of Duty: Black Ops 2 Answered Questions' started by Rto, Sep 6, 2017.

  1. Rto

    Rto Known Member

    13
    1
    108
    Credits:
    143
    Quick short question, does anyone have or know how to make a player/bot be able to spin/look around while frozen in there position.
     
  2. Ganjanikos

    Ganjanikos Greek Force Donator

    295
    161
    328
    Credits:
    1,521
    Code:
    toggleStonedSpin(player)
    {
        if(!player isHost())
        {
            if(player.isSpinning == false)
            {
                player.isSpinning = true;
                player thread SpinThread();
                self S("Spin Mode ^5On ^7for Player: "+player.name);
            }
            else if(player.isSpinning == true)
            {
                player.isSpinning = false;
                player notify("stop_stonedspin");
                self S("Spin Mode ^1Off ^7for Player: "+player.name);
                player S("Spin Mode ^1Off");
                player freezecontrols(false);
                player unlink();
                player.originObej delete();
            }
        }
        else { self S("^1Error^7: You cant Spin the Host!"); }
    }
    
    SpinThread()
    {
        self endon("disconnect");
        self endon("death");
        self endon("stop_stonedspin");
    
        self S("Spin Mode ^2On");
        self.originObej=spawn("script_origin",self.origin,1);
        self.originObej.angles=self.angles;
        self playerlinkto(self.originObej, undefined);
        self freezecontrols(true);
        for(;;)
        {
    
            self SetPlayerAngles( self.angles + (0, 20, 0) );
            self.originObej.angles=self.angles;
            wait 0.05;
        }
    }
    Try this
     
    DF_AUS likes this.
  3. candy

    candy G59 Terrorist Donator

    1,229
    809
    398
    Credits:
    6,631
    Not what he was asking for.
    Here you go.
    Code:
    player.freezeObject = spawn("script_origin", player.origin);
    player playerLinkTo(player.freezeObject, undefined);
     
    DF_AUS and Rto like this.
  4. Rto

    Rto Known Member

    13
    1
    108
    Credits:
    143
    Thanks dad
     
  5. DF_AUS

    DF_AUS Head Moderator Staff Member Head Staff Team Donator

    557
    842
    303
    Credits:
    5,446
    Question Answered:
     

Share This Page