mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-11 22:24:33 +00:00
Rewrote VoteMenu Func
Rewrote VoteMenu Func Added Restricted Voting Integrated SetNextMission Added Description Details Added ClearCenterPrint for FIRE when obs
This commit is contained in:
parent
51be28a6c5
commit
0e6e0bdfd8
5 changed files with 172 additions and 146 deletions
|
|
@ -7,25 +7,27 @@
|
|||
package ObserverTimeout
|
||||
{
|
||||
|
||||
function serverCmdClientMakeObserver( %client )
|
||||
function serverCmdClientMakeObserver(%client)
|
||||
{
|
||||
//10 second cooldown on becoming an observer
|
||||
//10 second cooldown on becoming an observer
|
||||
%timeDif = getSimTime() - %client.observerTimeout;
|
||||
%timeDif1 = getSimTime() - %client.observerMsg;
|
||||
if(%timeDif > 10000 || !%client.observerTimeout || %client.isAdmin)
|
||||
{
|
||||
if ( isObject( Game ) && Game.kickClient != %client )
|
||||
Game.forceObserver( %client, "playerChoose" );
|
||||
|
||||
%client.observerProtectStart = getSimTime();
|
||||
%client.observerTimeout = getSimTime();
|
||||
|
||||
if (isObject(Game) && Game.kickClient != %client)
|
||||
Game.forceObserver(%client, "playerChoose");
|
||||
if($Host::TournamentMode) //Added to clear FIRE centerPrint
|
||||
ClearCenterPrint(%client);
|
||||
}
|
||||
//1 second cooldown on message
|
||||
else if((%timeDif1 > 1000 || !%client.observerMsg))
|
||||
{
|
||||
%wait = mFloor((10000 - (getSimTime() - %client.observerProtectStart)) / 1000);
|
||||
messageClient(%client, 'MsgObserverCooldown', '\c3Observer Cooldown:\cr Please wait another %1 seconds.', %wait );
|
||||
|
||||
|
||||
%client.observerMsg = getSimTime();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue