2018-06-28 18:34:52 +00:00
|
|
|
//Start and Reset Notify
|
2018-09-05 02:39:04 +00:00
|
|
|
//package NoRapeNotify {
|
2018-06-28 18:34:52 +00:00
|
|
|
|
|
|
|
|
//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 );
|
|
|
|
|
//}
|
|
|
|
|
//}
|
|
|
|
|
|
2018-09-05 02:39:04 +00:00
|
|
|
//Moved the DefaultGame::gameOver in evo defaultgame.ovl
|
|
|
|
|
|
2018-06-28 18:34:52 +00:00
|
|
|
//Reset Notify
|
2018-09-05 02:39:04 +00:00
|
|
|
//function DefaultGame::gameOver( %game ) {
|
2018-06-28 18:34:52 +00:00
|
|
|
//Call default function
|
2018-09-05 02:39:04 +00:00
|
|
|
//parent::gameOver( %game );
|
2018-06-28 18:34:52 +00:00
|
|
|
//Reset NoBaseRape Notify
|
2018-09-05 02:39:04 +00:00
|
|
|
//ResetNotify::MissionEnd( %game, %client );
|
|
|
|
|
//}
|
2018-06-28 18:34:52 +00:00
|
|
|
|
2018-09-05 02:39:04 +00:00
|
|
|
//};
|
2018-06-28 18:34:52 +00:00
|
|
|
|
|
|
|
|
// Prevent package from being activated if it is already
|
2018-09-05 02:39:04 +00:00
|
|
|
//if (!isActivePackage(NoRapeNotify))
|
|
|
|
|
//activatePackage(NoRapeNotify);
|
2018-06-28 18:34:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//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);
|
|
|
|
|
|
|
|
|
|
//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) {
|
2018-07-17 17:03:37 +00:00
|
|
|
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
|
2018-06-28 18:34:52 +00:00
|
|
|
$NoBaseRapeNotifyCount = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
//NoBaseRape is off
|
|
|
|
|
//Has the client gotten the notification already
|
|
|
|
|
if($NoBaseRapeNotifyCount !$= 1) {
|
2018-07-17 17:03:37 +00:00
|
|
|
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
|
2018-06-28 18:34:52 +00:00
|
|
|
$NoBaseRapeNotifyCount = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//This function is at StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
|
|
|
|
//In the evopackage.cs or evoClassic.vl2
|
|
|
|
|
//Plays a sound when a player hits a protected asset
|
|
|
|
|
function PlayerNotifyEnabled::OnDamage( %game, %sourceObject )
|
|
|
|
|
{
|
|
|
|
|
messageClient(%sourceObject.client, 'MsgNoBaseRapeNotify', '~wfx/misc/diagnostic_beep.wav');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//This function is at DefaultGame::gameOver(%game) CTFGame.cs
|
|
|
|
|
//Resets the client NotifyCount when the mission ends
|
|
|
|
|
function ResetNotify::MissionEnd( %game, %client )
|
|
|
|
|
{
|
|
|
|
|
$NoBaseRapeNotifyCount = -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|