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 score has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-17 16:00:28 +03:00
parent e9b6d9765b
commit 203dd9802e
6 changed files with 35 additions and 3 deletions

View File

@ -232,6 +232,7 @@ void Core::ResetFunc(PlayerInst & inst)
inst.mOnTeam.ReleaseGently();
inst.mOnSkin.ReleaseGently();
inst.mOnMoney.ReleaseGently();
inst.mOnScore.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -351,6 +352,7 @@ void Core::ResetFunc()
Core::Get().mOnPlayerTeam.ReleaseGently();
Core::Get().mOnPlayerSkin.ReleaseGently();
Core::Get().mOnPlayerMoney.ReleaseGently();
Core::Get().mOnPlayerScore.ReleaseGently();
Core::Get().mOnVehicleColour.ReleaseGently();
Core::Get().mOnVehicleHealth.ReleaseGently();
Core::Get().mOnVehiclePosition.ReleaseGently();
@ -462,6 +464,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_PLAYERTEAM: return mOnPlayerTeam;
case EVT_PLAYERSKIN: return mOnPlayerSkin;
case EVT_PLAYERMONEY: return mOnPlayerMoney;
case EVT_PLAYERSCORE: return mOnPlayerScore;
case EVT_VEHICLECOLOUR: return mOnVehicleColour;
case EVT_VEHICLEHEALTH: return mOnVehicleHealth;
case EVT_VEHICLEPOSITION: return mOnVehiclePosition;
@ -623,6 +626,7 @@ Function & Core::GetPlayerEvent(Int32 id, Int32 evid)
case EVT_PLAYERTEAM: return inst.mOnTeam;
case EVT_PLAYERSKIN: return inst.mOnSkin;
case EVT_PLAYERMONEY: return inst.mOnMoney;
case EVT_PLAYERSCORE: return inst.mOnScore;
default: return NullFunction();
}
}