I thought I had keybinds down, but apparently not.
Can someone help me make it so that it stops showing the ping after the button is hit the second time?
if(!$PingLoopBind)
{
$remapDivision[$remapCount] = "Ping";
$remapName[$remapCount] = "Toggle";
$remapCmd[$remapCount] = "TogglePingLoop";
$remapCount++;
$PingLoopBind = true;
}
function togglePingLoop(%val)
{
if(!%val) return;
$pingLoop = !$pingLoop;
if(!$pingLoop)
{
//nothing!
}
else
{
pingLoop();
}
}
function pingLoop()
{
%ping = serverConnection.getPing();
if($pingLoop = true)
{
clientCMDbottomPrint("\c6Ping: "@%ping,1,1);
schedule(50,0,pingLoop);
}
}
I KNOW THERE IS ALREADY CTRL N FOR THIS. I'm just trying to do an experiment for learning purposes