Answered Freeze player with them being able to spin.

Rto

Known Member
Messages
9
Reaction score
1
Points
108
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.
 

Ganjanikos

Greek Force
Donator
Messages
292
Reaction score
155
Points
903
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
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,322
Reaction score
752
Points
973
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
Not what he was asking for.
Here you go.
Code:
player.freezeObject = spawn("script_origin", player.origin);
player playerLinkTo(player.freezeObject, undefined);
 

Rto

Known Member
Messages
9
Reaction score
1
Points
108
Not what he was asking for.
Here you go.
Code:
player.freezeObject = spawn("script_origin", player.origin);
player playerLinkTo(player.freezeObject, undefined);

Thanks dad
 
Top