1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-19 16:47:14 +02:00

Implement a new event to receive notifications when a player immunity has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-17 16:07:31 +03:00
parent 8f78b0a852
commit c6c17e9396
6 changed files with 30 additions and 3 deletions

View File

@ -234,6 +234,7 @@ void Core::ResetFunc(PlayerInst & inst)
inst.mOnMoney.ReleaseGently();
inst.mOnScore.ReleaseGently();
inst.mOnWantedLevel.ReleaseGently();
inst.mOnImmunity.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -355,6 +356,7 @@ void Core::ResetFunc()
Core::Get().mOnPlayerMoney.ReleaseGently();
Core::Get().mOnPlayerScore.ReleaseGently();
Core::Get().mOnPlayerWantedLevel.ReleaseGently();
Core::Get().mOnPlayerImmunity.ReleaseGently();
Core::Get().mOnVehicleColour.ReleaseGently();
Core::Get().mOnVehicleHealth.ReleaseGently();
Core::Get().mOnVehiclePosition.ReleaseGently();
@ -468,6 +470,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_PLAYERMONEY: return mOnPlayerMoney;
case EVT_PLAYERSCORE: return mOnPlayerScore;
case EVT_PLAYERWANTEDLEVEL: return mOnPlayerWantedLevel;
case EVT_PLAYERIMMUNITY: return mOnPlayerImmunity;
case EVT_VEHICLECOLOUR: return mOnVehicleColour;
case EVT_VEHICLEHEALTH: return mOnVehicleHealth;
case EVT_VEHICLEPOSITION: return mOnVehiclePosition;
@ -631,6 +634,7 @@ Function & Core::GetPlayerEvent(Int32 id, Int32 evid)
case EVT_PLAYERMONEY: return inst.mOnMoney;
case EVT_PLAYERSCORE: return inst.mOnScore;
case EVT_PLAYERWANTEDLEVEL: return inst.mOnWantedLevel;
case EVT_PLAYERIMMUNITY: return inst.mOnImmunity;
default: return NullFunction();
}
}