mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-04-29 15:35:24 +00:00
More Time
More time for ServerJoin ObserverKick Observer only for missionLoadDone check
This commit is contained in:
parent
90949fb401
commit
7490f4bc30
1 changed files with 15 additions and 11 deletions
|
|
@ -1824,18 +1824,22 @@ function DefaultGame::clientMissionDropReady(%game, %client)
|
||||||
for(%i = 1; %i <= 13; %i++)
|
for(%i = 1; %i <= 13; %i++)
|
||||||
$stats::weapon_damage[%client, %i] = "";
|
$stats::weapon_damage[%client, %i] = "";
|
||||||
|
|
||||||
if(!%client.isAdmin && !$Host::TournamentMode && $Host::KickObserverTimeout)
|
if(%client.team $=0) //Observer only
|
||||||
{
|
{
|
||||||
if(isEventPending(%client.okschedule))
|
if(!%client.isAdmin && !$Host::TournamentMode && $Host::KickObserverTimeout)
|
||||||
cancel(%client.okschedule);
|
{
|
||||||
|
if(isEventPending(%client.okschedule))
|
||||||
%minutes = $Host::KickObserverTimeout / 60;
|
cancel(%client.okschedule);
|
||||||
//messageClient(%client, 'MsgNoObservers', '\c2You have %1 minutes to join the game or you will be kicked.', %minutes);
|
|
||||||
|
%time = ($Host::KickObserverTimeout) + ($Host::KickObserverTimeout/2);
|
||||||
%key = mFloor(getRandom() * 1000);
|
//%minutes = %time / 60;
|
||||||
%client.okkey = %key;
|
//messageClient(%client, 'MsgNoObservers', '\c2You have %1 minutes to join the game or you will be kicked.', %minutes);
|
||||||
|
|
||||||
%client.okschedule = schedule(($Host::KickObserverTimeout * 1000), 0, "cmdAutoKickObserver", %client, %key);
|
%key = mFloor(getRandom() * 1000);
|
||||||
|
%client.okkey = %key;
|
||||||
|
|
||||||
|
%client.okschedule = schedule((%time * 1000), 0, "cmdAutoKickObserver", %client, %key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue