Added some changeable variables

Cleaned up some stuff
Added some host changeable variables
This commit is contained in:
ChocoTaco 2018-11-04 16:59:10 -05:00
parent faa2c99ebc
commit 63984711b6
8 changed files with 273 additions and 81 deletions

View file

@ -1,56 +1,30 @@
//Start and Reset Notify
//package NoRapeNotify {
//Start Notify
//function DefaultGame::spawnPlayer( %game, %client, %respawn ) {
//Call default function
//parent::spawnPlayer( %game, %client, %respawn );
//Start
//Make sure it's CTF Mode
//if( $CurrentMissionType $= "CTF" ) {
//PlayerNotify::AtSpawn( %game, %client, %respawn );
//}
//}
//Moved the DefaultGame::gameOver in evo defaultgame.ovl
//Reset Notify
//function DefaultGame::gameOver( %game ) {
//Call default function
//parent::gameOver( %game );
//Reset NoBaseRape Notify
//ResetNotify::MissionEnd( %game, %client );
//}
//};
// Prevent package from being activated if it is already
//if (!isActivePackage(NoRapeNotify))
//activatePackage(NoRapeNotify);
//Enable or Disable
//$Host::EnableNoBaseRapeNotify = 1;
//
//This function is at DefaultGame::spawnPlayer( %game, %client, %respawn ) defaultGame.cs
//Notifys the user if NoBase rape is on or off. Has a Counter so it is only run once and doesnt spam the client. It is triggered at spawn.
function PlayerNotify::AtSpawn( %game, %client, %respawn )
{
//echo ("%client " @ %client);
//echo ("$TeamBalanceClient " @ $TeamBalanceClient);
if( $CurrentMissionType $= "CTF" && $Host::EnableNoBaseRapeNotify )
{
//echo ("%client " @ %client);
//echo ("$TeamBalanceClient " @ $TeamBalanceClient);
//Is NoBaseRape On or off
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount ) {
//If on, has the client gotten the notification already
if($NoBaseRapeNotifyCount !$= 0) {
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
$NoBaseRapeNotifyCount = 0;
//Is NoBaseRape On or off
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount ) {
//If on, has the client gotten the notification already
if($NoBaseRapeNotifyCount !$= 0) {
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
$NoBaseRapeNotifyCount = 0;
}
}
}
else
//NoBaseRape is off
//Has the client gotten the notification already
if($NoBaseRapeNotifyCount !$= 1) {
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
$NoBaseRapeNotifyCount = 1;
else
//NoBaseRape is off
//Has the client gotten the notification already
if($NoBaseRapeNotifyCount !$= 1) {
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
$NoBaseRapeNotifyCount = 1;
}
}
}