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;
}
}
Not what he was asking for.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
player.freezeObject = spawn("script_origin", player.origin);
player playerLinkTo(player.freezeObject, undefined);