Blockland Forums > Modification Help

Need help with Serverconnection.chasecam(99999);

Pages: (1/4) > >>

David819:

ok so ingame if you are  in 3rd person and go n the console and type

"Serverconnection.chasecam(99999);

it does a chasecam type of setting.

"serverconnection.chasecam(0);"

but to deactivate and activate it how would it work with keybind?


--- Code: ---//Script_chasecam

   $remapDivision[$remapCount] = "Chasecam-Mod";
   $remapName[$remapCount] = "Activate-Chasecam";
   $remapCmd[$remapCount] = "Activate";
   $remapCount++;
   $remapName[$remapCount] = "De-activate-Chasecam";
   $remapCmd[$remapCount] = "Deactivate";
   $remapCount++;
}

function Activate-Chasecam(%Client)
{
$prev.chasecam(Acsess Granted);
   $(Client) = 1;
   $Serverconnection.chasecam(99999);
}

{
function De-activate-chasecam(%Client)

$prev.chasecam(Acsess Denied);
   $(client) = 0;
   $Serverconnection.chasecam(0);
}
};
--- End code ---


jes00:

Should work:

just push the same keybind to toggle it.

--- Code: ---//Script_chasecam

   $remapDivision[$remapCount] = "Chasecam-Mod";
   $remapName[$remapCount] = "Toggle Chasecam";
   $remapCmd[$remapCount] = "ToggleDeChasecam";
   $remapCount++;

function ToggleDeChasecam(%Client, %down)
{
if(!%down)
{
if($ChaseCam::isOn == 1)
{
$prev.chasecam(Acsess Granted);
$(Client) = 1;
$Serverconnection.chasecam(99999);
}

else if($ChaseCam::isOn == 0)
{
$prev.chasecam(Acsess Denied);
$(client) = 0;
$Serverconnection.chasecam(0);
}
}
}

--- End code ---


David819:

thanks.

jes00:

Oh and just so you know; what you put in $remapCmd[$remapCount] = ""; is the function called when you push the keybind.

ZSNO:

You spelled Access wrong

Pages: (1/4) > >>

Go to full version