Alright, so this is how my loop is activated...
function serverCmdtogglegungame(%client)
{
if(!%client.isSuperAdmin)
{
messageClient(%client, '', "\c0You are not allowed to use this command.");
return;
}
if($GunGame::Status == 0)
{
activatePackage(GunGame);
chatMessageAll(%client, "\c6Gun Game Enabled!");
$GunGame::Status = 1;
$GunGame::DisplayScore = schedule(3000,0,displayscore);
$GunGame::GrenadeTickLoop = schedule(100,0,grenadetickloop);
return;
}
//The rest of the stuff...
and this is my loop.
function displayscore(%client,%mini) //Displaying the score to the clients.
{
cancel($GunGame::DisplayScore);
%leveldiff = %client.score - %mini.member0.score;
if(%leveldiff > 0)
commandToClient(%client, 'BottomPrint', "\c3You are at level \c6" @ %client.score @ "\c3. You are \c6" @ %leveldiff @ "\c3 levels behind the leader.", 3);
else
commandToClient(%client, 'BottomPrint', "\c3You are at level \c6" @ %client.score @ "\c3. You are the leader!", 3);
$GunGame::DisplayScore = schedule(3000,false,displayscore);
}
I tried triggering the loop with displayscore(); and it did not work. I tried switching out 0 for false (yes, I know they are the same thing. I just wanted to see if it would work) and that didn't work.
What am I doing wrong? :o