mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 16:14:35 +00:00
Asset Notify with cooldown
This commit is contained in:
parent
9d32e7e480
commit
d3edc0541d
1 changed files with 18 additions and 1 deletions
|
|
@ -41,7 +41,24 @@ function ResetNBRNotify()
|
||||||
//Plays a sound when a player hits a protected asset
|
//Plays a sound when a player hits a protected asset
|
||||||
function NBRAssetSound( %game, %sourceObject )
|
function NBRAssetSound( %game, %sourceObject )
|
||||||
{
|
{
|
||||||
messageClient(%sourceObject.client, 'MsgNoBaseRapeNotify', '~wfx/misc/diagnostic_beep.wav');
|
%client = %sourceObject;
|
||||||
|
|
||||||
|
//messageClient(%sourceObject.client, 'MsgNoBaseRapeNotify', '~wfx/misc/diagnostic_beep.wav');
|
||||||
|
if( !%client.NBRAssetSoundMsgPlayed )
|
||||||
|
{
|
||||||
|
messageClient(%sourceObject.client, 'MsgNoBaseRapeNotify', '\c2No Base Rape is enabled until %1 players.', $Host::EvoNoBaseRapeClassicPlayerCount );
|
||||||
|
|
||||||
|
%client.NBRAssetSoundMsgPlayed = true;
|
||||||
|
//$NBRAssetSoundMsgPlayed = %sourceObject.client.NBRAssetSoundMsgPlayed;
|
||||||
|
schedule(5000, 0, "ResetNBRAssetSound", %client );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Cool down between messeges
|
||||||
|
function ResetNBRAssetSound( %client )
|
||||||
|
{
|
||||||
|
//%sourceObject.client.NBRAssetSoundMsgPlayed = $NBRAssetSoundMsgPlayed;
|
||||||
|
%client.NBRAssetSoundMsgPlayed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue