2016-05-22 05:20:38 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
#include "Core.hpp"
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2016-07-16 18:39:51 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ClearContainer(EntityType type)
|
|
|
|
{
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case ENT_BLIP:
|
|
|
|
{
|
|
|
|
m_Blips.clear();
|
|
|
|
} break;
|
|
|
|
case ENT_CHECKPOINT:
|
|
|
|
{
|
|
|
|
m_Checkpoints.clear();
|
|
|
|
} break;
|
|
|
|
case ENT_KEYBIND:
|
|
|
|
{
|
|
|
|
m_Keybinds.clear();
|
|
|
|
} break;
|
|
|
|
case ENT_OBJECT:
|
|
|
|
{
|
|
|
|
m_Objects.clear();
|
|
|
|
} break;
|
|
|
|
case ENT_PICKUP:
|
|
|
|
{
|
|
|
|
m_Pickups.clear();
|
|
|
|
} break;
|
|
|
|
case ENT_PLAYER:
|
|
|
|
{
|
|
|
|
m_Players.clear();
|
|
|
|
} break;
|
|
|
|
case ENT_VEHICLE:
|
|
|
|
{
|
|
|
|
m_Vehicles.clear();
|
|
|
|
} break;
|
|
|
|
default: STHROWF("Cannot clear unknown entity type container");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(BlipInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
|
|
|
inst.mWorld = -1;
|
|
|
|
inst.mScale = -1;
|
|
|
|
inst.mSprID = -1;
|
|
|
|
inst.mPosition.Clear();
|
|
|
|
inst.mColor.Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(CheckpointInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(KeybindInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
|
|
|
inst.mFirst = -1;
|
|
|
|
inst.mSecond = -1;
|
|
|
|
inst.mThird = -1;
|
|
|
|
inst.mRelease = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(ObjectInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(PickupInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(PlayerInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
2016-06-08 15:53:16 +02:00
|
|
|
inst.mTrackPosition = 0;
|
2016-07-14 18:52:14 +02:00
|
|
|
inst.mTrackHeading = 0;
|
|
|
|
inst.mTrackPositionHeader = 0;
|
|
|
|
inst.mTrackPositionPayload.Release();
|
2016-08-17 12:48:29 +02:00
|
|
|
inst.mKickBanHeader = 0;
|
|
|
|
inst.mKickBanPayload.Release();
|
2016-05-22 05:20:38 +02:00
|
|
|
inst.mLastWeapon = -1;
|
|
|
|
inst.mLastHealth = 0.0;
|
|
|
|
inst.mLastArmour = 0.0;
|
|
|
|
inst.mLastHeading = 0.0;
|
|
|
|
inst.mLastPosition.Clear();
|
|
|
|
inst.mAuthority = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetInst(VehicleInst & inst)
|
|
|
|
{
|
|
|
|
inst.mID = -1;
|
|
|
|
inst.mFlags = ENF_DEFAULT;
|
2016-06-08 15:53:16 +02:00
|
|
|
inst.mTrackPosition = 0;
|
|
|
|
inst.mTrackRotation = 0;
|
2016-05-22 05:20:38 +02:00
|
|
|
inst.mLastPrimaryColour = -1;
|
|
|
|
inst.mLastSecondaryColour = -1;
|
|
|
|
inst.mLastHealth = 0.0;
|
|
|
|
inst.mLastPosition.Clear();
|
|
|
|
inst.mLastRotation.Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(BlipInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(CheckpointInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
inst.mOnEntered.ReleaseGently();
|
|
|
|
inst.mOnExited.ReleaseGently();
|
2016-08-18 14:54:26 +02:00
|
|
|
inst.mOnWorld.ReleaseGently();
|
2016-08-18 15:10:18 +02:00
|
|
|
inst.mOnRadius.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(KeybindInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
inst.mOnKeyPress.ReleaseGently();
|
|
|
|
inst.mOnKeyRelease.ReleaseGently();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(ObjectInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
inst.mOnShot.ReleaseGently();
|
|
|
|
inst.mOnTouched.ReleaseGently();
|
2016-08-18 15:37:55 +02:00
|
|
|
inst.mOnWorld.ReleaseGently();
|
2016-08-18 15:50:30 +02:00
|
|
|
inst.mOnAlpha.ReleaseGently();
|
2016-08-18 16:12:00 +02:00
|
|
|
inst.mOnReport.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(PickupInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
inst.mOnRespawn.ReleaseGently();
|
|
|
|
inst.mOnClaimed.ReleaseGently();
|
|
|
|
inst.mOnCollected.ReleaseGently();
|
2016-08-19 16:58:08 +02:00
|
|
|
inst.mOnWorld.ReleaseGently();
|
2016-08-19 17:05:29 +02:00
|
|
|
inst.mOnAlpha.ReleaseGently();
|
2016-08-19 17:21:41 +02:00
|
|
|
inst.mOnAutomatic.ReleaseGently();
|
2016-08-19 17:26:52 +02:00
|
|
|
inst.mOnAutoTimer.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(PlayerInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
inst.mOnRequestClass.ReleaseGently();
|
|
|
|
inst.mOnRequestSpawn.ReleaseGently();
|
|
|
|
inst.mOnSpawn.ReleaseGently();
|
|
|
|
inst.mOnWasted.ReleaseGently();
|
|
|
|
inst.mOnKilled.ReleaseGently();
|
|
|
|
inst.mOnEmbarking.ReleaseGently();
|
|
|
|
inst.mOnEmbarked.ReleaseGently();
|
|
|
|
inst.mOnDisembark.ReleaseGently();
|
|
|
|
inst.mOnRename.ReleaseGently();
|
|
|
|
inst.mOnState.ReleaseGently();
|
|
|
|
inst.mOnStateNone.ReleaseGently();
|
|
|
|
inst.mOnStateNormal.ReleaseGently();
|
|
|
|
inst.mOnStateAim.ReleaseGently();
|
|
|
|
inst.mOnStateDriver.ReleaseGently();
|
|
|
|
inst.mOnStatePassenger.ReleaseGently();
|
|
|
|
inst.mOnStateEnterDriver.ReleaseGently();
|
|
|
|
inst.mOnStateEnterPassenger.ReleaseGently();
|
|
|
|
inst.mOnStateExit.ReleaseGently();
|
|
|
|
inst.mOnStateUnspawned.ReleaseGently();
|
|
|
|
inst.mOnAction.ReleaseGently();
|
|
|
|
inst.mOnActionNone.ReleaseGently();
|
|
|
|
inst.mOnActionNormal.ReleaseGently();
|
|
|
|
inst.mOnActionAiming.ReleaseGently();
|
|
|
|
inst.mOnActionShooting.ReleaseGently();
|
|
|
|
inst.mOnActionJumping.ReleaseGently();
|
|
|
|
inst.mOnActionLieDown.ReleaseGently();
|
|
|
|
inst.mOnActionGettingUp.ReleaseGently();
|
|
|
|
inst.mOnActionJumpVehicle.ReleaseGently();
|
|
|
|
inst.mOnActionDriving.ReleaseGently();
|
|
|
|
inst.mOnActionDying.ReleaseGently();
|
|
|
|
inst.mOnActionWasted.ReleaseGently();
|
|
|
|
inst.mOnActionEmbarking.ReleaseGently();
|
|
|
|
inst.mOnActionDisembarking.ReleaseGently();
|
|
|
|
inst.mOnBurning.ReleaseGently();
|
|
|
|
inst.mOnCrouching.ReleaseGently();
|
|
|
|
inst.mOnGameKeys.ReleaseGently();
|
|
|
|
inst.mOnStartTyping.ReleaseGently();
|
|
|
|
inst.mOnStopTyping.ReleaseGently();
|
|
|
|
inst.mOnAway.ReleaseGently();
|
|
|
|
inst.mOnMessage.ReleaseGently();
|
|
|
|
inst.mOnCommand.ReleaseGently();
|
|
|
|
inst.mOnPrivateMessage.ReleaseGently();
|
|
|
|
inst.mOnKeyPress.ReleaseGently();
|
|
|
|
inst.mOnKeyRelease.ReleaseGently();
|
|
|
|
inst.mOnSpectate.ReleaseGently();
|
|
|
|
inst.mOnCrashreport.ReleaseGently();
|
|
|
|
inst.mOnObjectShot.ReleaseGently();
|
|
|
|
inst.mOnObjectTouched.ReleaseGently();
|
|
|
|
inst.mOnPickupClaimed.ReleaseGently();
|
|
|
|
inst.mOnPickupCollected.ReleaseGently();
|
|
|
|
inst.mOnCheckpointEntered.ReleaseGently();
|
|
|
|
inst.mOnCheckpointExited.ReleaseGently();
|
|
|
|
inst.mOnClientScriptData.ReleaseGently();
|
|
|
|
inst.mOnUpdate.ReleaseGently();
|
|
|
|
inst.mOnHealth.ReleaseGently();
|
|
|
|
inst.mOnArmour.ReleaseGently();
|
|
|
|
inst.mOnWeapon.ReleaseGently();
|
|
|
|
inst.mOnHeading.ReleaseGently();
|
|
|
|
inst.mOnPosition.ReleaseGently();
|
|
|
|
inst.mOnOption.ReleaseGently();
|
2016-08-17 14:40:48 +02:00
|
|
|
inst.mOnAdmin.ReleaseGently();
|
2016-08-17 14:45:44 +02:00
|
|
|
inst.mOnWorld.ReleaseGently();
|
2016-08-17 14:49:08 +02:00
|
|
|
inst.mOnTeam.ReleaseGently();
|
2016-08-17 14:52:22 +02:00
|
|
|
inst.mOnSkin.ReleaseGently();
|
2016-08-17 14:55:59 +02:00
|
|
|
inst.mOnMoney.ReleaseGently();
|
2016-08-17 15:00:28 +02:00
|
|
|
inst.mOnScore.ReleaseGently();
|
2016-08-17 15:04:14 +02:00
|
|
|
inst.mOnWantedLevel.ReleaseGently();
|
2016-08-17 15:07:31 +02:00
|
|
|
inst.mOnImmunity.ReleaseGently();
|
2016-08-17 15:10:43 +02:00
|
|
|
inst.mOnAlpha.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc(VehicleInst & inst)
|
|
|
|
{
|
|
|
|
inst.mOnDestroyed.ReleaseGently();
|
|
|
|
inst.mOnCustom.ReleaseGently();
|
|
|
|
inst.mOnEmbarking.ReleaseGently();
|
|
|
|
inst.mOnEmbarked.ReleaseGently();
|
|
|
|
inst.mOnDisembark.ReleaseGently();
|
|
|
|
inst.mOnExplode.ReleaseGently();
|
|
|
|
inst.mOnRespawn.ReleaseGently();
|
|
|
|
inst.mOnUpdate.ReleaseGently();
|
|
|
|
inst.mOnColour.ReleaseGently();
|
|
|
|
inst.mOnHealth.ReleaseGently();
|
|
|
|
inst.mOnPosition.ReleaseGently();
|
|
|
|
inst.mOnRotation.ReleaseGently();
|
|
|
|
inst.mOnOption.ReleaseGently();
|
2016-08-18 13:38:00 +02:00
|
|
|
inst.mOnWorld.ReleaseGently();
|
2016-08-18 13:45:12 +02:00
|
|
|
inst.mOnImmunity.ReleaseGently();
|
2016-08-18 13:51:55 +02:00
|
|
|
inst.mOnPartStatus.ReleaseGently();
|
2016-08-20 20:14:03 +02:00
|
|
|
inst.mOnTireStatus.ReleaseGently();
|
2016-08-18 14:06:03 +02:00
|
|
|
inst.mOnDamageData.ReleaseGently();
|
2016-08-18 14:13:33 +02:00
|
|
|
inst.mOnRadio.ReleaseGently();
|
2016-08-18 14:21:50 +02:00
|
|
|
inst.mOnHandlingRule.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void Core::ResetFunc()
|
|
|
|
{
|
|
|
|
Core::Get().mOnCustomEvent.ReleaseGently();
|
|
|
|
Core::Get().mOnBlipCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnCheckpointCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnKeybindCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnObjectCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnPickupCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleCreated.ReleaseGently();
|
|
|
|
Core::Get().mOnBlipDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnCheckpointDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnKeybindDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnObjectDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnPickupDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleDestroyed.ReleaseGently();
|
|
|
|
Core::Get().mOnBlipCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnCheckpointCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnKeybindCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnObjectCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnPickupCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleCustom.ReleaseGently();
|
|
|
|
Core::Get().mOnServerStartup.ReleaseGently();
|
|
|
|
Core::Get().mOnServerShutdown.ReleaseGently();
|
|
|
|
Core::Get().mOnServerFrame.ReleaseGently();
|
|
|
|
Core::Get().mOnIncomingConnection.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerRequestClass.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerRequestSpawn.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerSpawn.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerWasted.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerKilled.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerEmbarking.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerEmbarked.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerDisembark.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerRename.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerState.ReleaseGently();
|
|
|
|
Core::Get().mOnStateNone.ReleaseGently();
|
|
|
|
Core::Get().mOnStateNormal.ReleaseGently();
|
|
|
|
Core::Get().mOnStateAim.ReleaseGently();
|
|
|
|
Core::Get().mOnStateDriver.ReleaseGently();
|
|
|
|
Core::Get().mOnStatePassenger.ReleaseGently();
|
|
|
|
Core::Get().mOnStateEnterDriver.ReleaseGently();
|
|
|
|
Core::Get().mOnStateEnterPassenger.ReleaseGently();
|
|
|
|
Core::Get().mOnStateExit.ReleaseGently();
|
|
|
|
Core::Get().mOnStateUnspawned.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerAction.ReleaseGently();
|
|
|
|
Core::Get().mOnActionNone.ReleaseGently();
|
|
|
|
Core::Get().mOnActionNormal.ReleaseGently();
|
|
|
|
Core::Get().mOnActionAiming.ReleaseGently();
|
|
|
|
Core::Get().mOnActionShooting.ReleaseGently();
|
|
|
|
Core::Get().mOnActionJumping.ReleaseGently();
|
|
|
|
Core::Get().mOnActionLieDown.ReleaseGently();
|
|
|
|
Core::Get().mOnActionGettingUp.ReleaseGently();
|
|
|
|
Core::Get().mOnActionJumpVehicle.ReleaseGently();
|
|
|
|
Core::Get().mOnActionDriving.ReleaseGently();
|
|
|
|
Core::Get().mOnActionDying.ReleaseGently();
|
|
|
|
Core::Get().mOnActionWasted.ReleaseGently();
|
|
|
|
Core::Get().mOnActionEmbarking.ReleaseGently();
|
|
|
|
Core::Get().mOnActionDisembarking.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerBurning.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerCrouching.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerGameKeys.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerStartTyping.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerStopTyping.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerAway.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerMessage.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerCommand.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerPrivateMessage.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerKeyPress.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerKeyRelease.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerSpectate.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerCrashreport.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleExplode.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleRespawn.ReleaseGently();
|
|
|
|
Core::Get().mOnObjectShot.ReleaseGently();
|
|
|
|
Core::Get().mOnObjectTouched.ReleaseGently();
|
2016-08-18 15:37:55 +02:00
|
|
|
Core::Get().mOnObjectWorld.ReleaseGently();
|
2016-08-18 15:50:30 +02:00
|
|
|
Core::Get().mOnObjectAlpha.ReleaseGently();
|
2016-08-18 16:12:00 +02:00
|
|
|
Core::Get().mOnObjectReport.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Get().mOnPickupClaimed.ReleaseGently();
|
|
|
|
Core::Get().mOnPickupCollected.ReleaseGently();
|
2016-08-19 17:21:41 +02:00
|
|
|
Core::Get().mOnPickupRespawn.ReleaseGently();
|
2016-08-19 16:58:08 +02:00
|
|
|
Core::Get().mOnPickupWorld.ReleaseGently();
|
2016-08-19 17:05:29 +02:00
|
|
|
Core::Get().mOnPickupAlpha.ReleaseGently();
|
2016-08-19 17:21:41 +02:00
|
|
|
Core::Get().mOnPickupAutomatic.ReleaseGently();
|
2016-08-19 17:26:52 +02:00
|
|
|
Core::Get().mOnPickupAutoTimer.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Get().mOnCheckpointEntered.ReleaseGently();
|
|
|
|
Core::Get().mOnCheckpointExited.ReleaseGently();
|
2016-08-18 14:54:26 +02:00
|
|
|
Core::Get().mOnCheckpointWorld.ReleaseGently();
|
2016-08-18 15:10:18 +02:00
|
|
|
Core::Get().mOnCheckpointRadius.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Get().mOnEntityPool.ReleaseGently();
|
|
|
|
Core::Get().mOnClientScriptData.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerUpdate.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleUpdate.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerHealth.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerArmour.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerWeapon.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerHeading.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerPosition.ReleaseGently();
|
|
|
|
Core::Get().mOnPlayerOption.ReleaseGently();
|
2016-08-17 14:40:48 +02:00
|
|
|
Core::Get().mOnPlayerAdmin.ReleaseGently();
|
2016-08-17 14:45:44 +02:00
|
|
|
Core::Get().mOnPlayerWorld.ReleaseGently();
|
2016-08-17 14:49:08 +02:00
|
|
|
Core::Get().mOnPlayerTeam.ReleaseGently();
|
2016-08-17 14:52:22 +02:00
|
|
|
Core::Get().mOnPlayerSkin.ReleaseGently();
|
2016-08-17 14:55:59 +02:00
|
|
|
Core::Get().mOnPlayerMoney.ReleaseGently();
|
2016-08-17 15:00:28 +02:00
|
|
|
Core::Get().mOnPlayerScore.ReleaseGently();
|
2016-08-17 15:04:14 +02:00
|
|
|
Core::Get().mOnPlayerWantedLevel.ReleaseGently();
|
2016-08-17 15:07:31 +02:00
|
|
|
Core::Get().mOnPlayerImmunity.ReleaseGently();
|
2016-08-17 15:10:43 +02:00
|
|
|
Core::Get().mOnPlayerAlpha.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Get().mOnVehicleColour.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleHealth.ReleaseGently();
|
|
|
|
Core::Get().mOnVehiclePosition.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleRotation.ReleaseGently();
|
|
|
|
Core::Get().mOnVehicleOption.ReleaseGently();
|
2016-08-18 13:38:00 +02:00
|
|
|
Core::Get().mOnVehicleWorld.ReleaseGently();
|
2016-08-18 13:45:12 +02:00
|
|
|
Core::Get().mOnVehicleImmunity.ReleaseGently();
|
2016-08-18 13:51:55 +02:00
|
|
|
Core::Get().mOnVehiclePartStatus.ReleaseGently();
|
2016-08-20 20:14:03 +02:00
|
|
|
Core::Get().mOnVehicleTireStatus.ReleaseGently();
|
2016-08-18 14:06:03 +02:00
|
|
|
Core::Get().mOnVehicleDamageData.ReleaseGently();
|
2016-08-18 14:13:33 +02:00
|
|
|
Core::Get().mOnVehicleRadio.ReleaseGently();
|
2016-08-18 14:21:50 +02:00
|
|
|
Core::Get().mOnVehicleHandlingRule.ReleaseGently();
|
2016-05-22 05:20:38 +02:00
|
|
|
Core::Get().mOnServerOption.ReleaseGently();
|
|
|
|
Core::Get().mOnScriptReload.ReleaseGently();
|
|
|
|
Core::Get().mOnScriptLoaded.ReleaseGently();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetEvent(Int32 evid)
|
|
|
|
{
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_CUSTOMEVENT: return mOnCustomEvent;
|
|
|
|
case EVT_BLIPCREATED: return mOnBlipCreated;
|
|
|
|
case EVT_CHECKPOINTCREATED: return mOnCheckpointCreated;
|
|
|
|
case EVT_KEYBINDCREATED: return mOnKeybindCreated;
|
|
|
|
case EVT_OBJECTCREATED: return mOnObjectCreated;
|
|
|
|
case EVT_PICKUPCREATED: return mOnPickupCreated;
|
|
|
|
case EVT_PLAYERCREATED: return mOnPlayerCreated;
|
|
|
|
case EVT_VEHICLECREATED: return mOnVehicleCreated;
|
|
|
|
case EVT_BLIPDESTROYED: return mOnBlipDestroyed;
|
|
|
|
case EVT_CHECKPOINTDESTROYED: return mOnCheckpointDestroyed;
|
|
|
|
case EVT_KEYBINDDESTROYED: return mOnKeybindDestroyed;
|
|
|
|
case EVT_OBJECTDESTROYED: return mOnObjectDestroyed;
|
|
|
|
case EVT_PICKUPDESTROYED: return mOnPickupDestroyed;
|
|
|
|
case EVT_PLAYERDESTROYED: return mOnPlayerDestroyed;
|
|
|
|
case EVT_VEHICLEDESTROYED: return mOnVehicleDestroyed;
|
|
|
|
case EVT_BLIPCUSTOM: return mOnBlipCustom;
|
|
|
|
case EVT_CHECKPOINTCUSTOM: return mOnCheckpointCustom;
|
|
|
|
case EVT_KEYBINDCUSTOM: return mOnKeybindCustom;
|
|
|
|
case EVT_OBJECTCUSTOM: return mOnObjectCustom;
|
|
|
|
case EVT_PICKUPCUSTOM: return mOnPickupCustom;
|
|
|
|
case EVT_PLAYERCUSTOM: return mOnPlayerCustom;
|
|
|
|
case EVT_VEHICLECUSTOM: return mOnVehicleCustom;
|
|
|
|
case EVT_SERVERSTARTUP: return mOnServerStartup;
|
|
|
|
case EVT_SERVERSHUTDOWN: return mOnServerShutdown;
|
|
|
|
case EVT_SERVERFRAME: return mOnServerFrame;
|
|
|
|
case EVT_INCOMINGCONNECTION: return mOnIncomingConnection;
|
|
|
|
case EVT_PLAYERREQUESTCLASS: return mOnPlayerRequestClass;
|
|
|
|
case EVT_PLAYERREQUESTSPAWN: return mOnPlayerRequestSpawn;
|
|
|
|
case EVT_PLAYERSPAWN: return mOnPlayerSpawn;
|
|
|
|
case EVT_PLAYERWASTED: return mOnPlayerWasted;
|
|
|
|
case EVT_PLAYERKILLED: return mOnPlayerKilled;
|
|
|
|
case EVT_PLAYEREMBARKING: return mOnPlayerEmbarking;
|
|
|
|
case EVT_PLAYEREMBARKED: return mOnPlayerEmbarked;
|
|
|
|
case EVT_PLAYERDISEMBARK: return mOnPlayerDisembark;
|
|
|
|
case EVT_PLAYERRENAME: return mOnPlayerRename;
|
|
|
|
case EVT_PLAYERSTATE: return mOnPlayerState;
|
|
|
|
case EVT_STATENONE: return mOnStateNone;
|
|
|
|
case EVT_STATENORMAL: return mOnStateNormal;
|
|
|
|
case EVT_STATEAIM: return mOnStateAim;
|
|
|
|
case EVT_STATEDRIVER: return mOnStateDriver;
|
|
|
|
case EVT_STATEPASSENGER: return mOnStatePassenger;
|
|
|
|
case EVT_STATEENTERDRIVER: return mOnStateEnterDriver;
|
|
|
|
case EVT_STATEENTERPASSENGER: return mOnStateEnterPassenger;
|
|
|
|
case EVT_STATEEXIT: return mOnStateExit;
|
|
|
|
case EVT_STATEUNSPAWNED: return mOnStateUnspawned;
|
|
|
|
case EVT_PLAYERACTION: return mOnPlayerAction;
|
|
|
|
case EVT_ACTIONNONE: return mOnActionNone;
|
|
|
|
case EVT_ACTIONNORMAL: return mOnActionNormal;
|
|
|
|
case EVT_ACTIONAIMING: return mOnActionAiming;
|
|
|
|
case EVT_ACTIONSHOOTING: return mOnActionShooting;
|
|
|
|
case EVT_ACTIONJUMPING: return mOnActionJumping;
|
|
|
|
case EVT_ACTIONLIEDOWN: return mOnActionLieDown;
|
|
|
|
case EVT_ACTIONGETTINGUP: return mOnActionGettingUp;
|
|
|
|
case EVT_ACTIONJUMPVEHICLE: return mOnActionJumpVehicle;
|
|
|
|
case EVT_ACTIONDRIVING: return mOnActionDriving;
|
|
|
|
case EVT_ACTIONDYING: return mOnActionDying;
|
|
|
|
case EVT_ACTIONWASTED: return mOnActionWasted;
|
|
|
|
case EVT_ACTIONEMBARKING: return mOnActionEmbarking;
|
|
|
|
case EVT_ACTIONDISEMBARKING: return mOnActionDisembarking;
|
|
|
|
case EVT_PLAYERBURNING: return mOnPlayerBurning;
|
|
|
|
case EVT_PLAYERCROUCHING: return mOnPlayerCrouching;
|
|
|
|
case EVT_PLAYERGAMEKEYS: return mOnPlayerGameKeys;
|
|
|
|
case EVT_PLAYERSTARTTYPING: return mOnPlayerStartTyping;
|
|
|
|
case EVT_PLAYERSTOPTYPING: return mOnPlayerStopTyping;
|
|
|
|
case EVT_PLAYERAWAY: return mOnPlayerAway;
|
|
|
|
case EVT_PLAYERMESSAGE: return mOnPlayerMessage;
|
|
|
|
case EVT_PLAYERCOMMAND: return mOnPlayerCommand;
|
|
|
|
case EVT_PLAYERPRIVATEMESSAGE: return mOnPlayerPrivateMessage;
|
|
|
|
case EVT_PLAYERKEYPRESS: return mOnPlayerKeyPress;
|
|
|
|
case EVT_PLAYERKEYRELEASE: return mOnPlayerKeyRelease;
|
|
|
|
case EVT_PLAYERSPECTATE: return mOnPlayerSpectate;
|
|
|
|
case EVT_PLAYERCRASHREPORT: return mOnPlayerCrashreport;
|
|
|
|
case EVT_VEHICLEEXPLODE: return mOnVehicleExplode;
|
|
|
|
case EVT_VEHICLERESPAWN: return mOnVehicleRespawn;
|
|
|
|
case EVT_OBJECTSHOT: return mOnObjectShot;
|
|
|
|
case EVT_OBJECTTOUCHED: return mOnObjectTouched;
|
2016-08-18 15:37:55 +02:00
|
|
|
case EVT_OBJECTWORLD: return mOnObjectWorld;
|
2016-08-18 15:50:30 +02:00
|
|
|
case EVT_OBJECTALPHA: return mOnObjectAlpha;
|
2016-08-18 16:12:00 +02:00
|
|
|
case EVT_OBJECTREPORT: return mOnObjectReport;
|
2016-05-22 05:20:38 +02:00
|
|
|
case EVT_PICKUPCLAIMED: return mOnPickupClaimed;
|
|
|
|
case EVT_PICKUPCOLLECTED: return mOnPickupCollected;
|
2016-08-19 17:21:41 +02:00
|
|
|
case EVT_PICKUPRESPAWN: return mOnPickupRespawn;
|
2016-08-19 16:58:08 +02:00
|
|
|
case EVT_PICKUPWORLD: return mOnPickupWorld;
|
2016-08-19 17:05:29 +02:00
|
|
|
case EVT_PICKUPALPHA: return mOnPickupAlpha;
|
2016-08-19 17:21:41 +02:00
|
|
|
case EVT_PICKUPAUTOMATIC: return mOnPickupAutomatic;
|
2016-08-19 17:26:52 +02:00
|
|
|
case EVT_PICKUPAUTOTIMER: return mOnPickupAutoTimer;
|
2016-05-22 05:20:38 +02:00
|
|
|
case EVT_CHECKPOINTENTERED: return mOnCheckpointEntered;
|
|
|
|
case EVT_CHECKPOINTEXITED: return mOnCheckpointExited;
|
2016-08-18 14:54:26 +02:00
|
|
|
case EVT_CHECKPOINTWORLD: return mOnCheckpointWorld;
|
2016-08-18 15:10:18 +02:00
|
|
|
case EVT_CHECKPOINTRADIUS: return mOnCheckpointRadius;
|
2016-05-22 05:20:38 +02:00
|
|
|
case EVT_ENTITYPOOL: return mOnEntityPool;
|
|
|
|
case EVT_CLIENTSCRIPTDATA: return mOnClientScriptData;
|
|
|
|
case EVT_PLAYERUPDATE: return mOnPlayerUpdate;
|
|
|
|
case EVT_VEHICLEUPDATE: return mOnVehicleUpdate;
|
|
|
|
case EVT_PLAYERHEALTH: return mOnPlayerHealth;
|
|
|
|
case EVT_PLAYERARMOUR: return mOnPlayerArmour;
|
|
|
|
case EVT_PLAYERWEAPON: return mOnPlayerWeapon;
|
|
|
|
case EVT_PLAYERHEADING: return mOnPlayerHeading;
|
|
|
|
case EVT_PLAYERPOSITION: return mOnPlayerPosition;
|
|
|
|
case EVT_PLAYEROPTION: return mOnPlayerOption;
|
2016-08-17 14:40:48 +02:00
|
|
|
case EVT_PLAYERADMIN: return mOnPlayerAdmin;
|
2016-08-17 14:45:44 +02:00
|
|
|
case EVT_PLAYERWORLD: return mOnPlayerWorld;
|
2016-08-17 14:49:08 +02:00
|
|
|
case EVT_PLAYERTEAM: return mOnPlayerTeam;
|
2016-08-17 14:52:22 +02:00
|
|
|
case EVT_PLAYERSKIN: return mOnPlayerSkin;
|
2016-08-17 14:55:59 +02:00
|
|
|
case EVT_PLAYERMONEY: return mOnPlayerMoney;
|
2016-08-17 15:00:28 +02:00
|
|
|
case EVT_PLAYERSCORE: return mOnPlayerScore;
|
2016-08-17 15:04:14 +02:00
|
|
|
case EVT_PLAYERWANTEDLEVEL: return mOnPlayerWantedLevel;
|
2016-08-17 15:07:31 +02:00
|
|
|
case EVT_PLAYERIMMUNITY: return mOnPlayerImmunity;
|
2016-08-17 15:10:43 +02:00
|
|
|
case EVT_PLAYERALPHA: return mOnPlayerAlpha;
|
2016-05-22 05:20:38 +02:00
|
|
|
case EVT_VEHICLECOLOUR: return mOnVehicleColour;
|
|
|
|
case EVT_VEHICLEHEALTH: return mOnVehicleHealth;
|
|
|
|
case EVT_VEHICLEPOSITION: return mOnVehiclePosition;
|
|
|
|
case EVT_VEHICLEROTATION: return mOnVehicleRotation;
|
|
|
|
case EVT_VEHICLEOPTION: return mOnVehicleOption;
|
2016-08-18 13:38:00 +02:00
|
|
|
case EVT_VEHICLEWORLD: return mOnVehicleWorld;
|
2016-08-18 13:45:12 +02:00
|
|
|
case EVT_VEHICLEIMMUNITY: return mOnVehicleImmunity;
|
2016-08-18 13:51:55 +02:00
|
|
|
case EVT_VEHICLEPARTSTATUS: return mOnVehiclePartStatus;
|
2016-08-20 20:14:03 +02:00
|
|
|
case EVT_VEHICLETIRESTATUS: return mOnVehicleTireStatus;
|
2016-08-18 14:06:03 +02:00
|
|
|
case EVT_VEHICLEDAMAGEDATA: return mOnVehicleDamageData;
|
2016-08-18 14:13:33 +02:00
|
|
|
case EVT_VEHICLERADIO: return mOnVehicleRadio;
|
2016-08-18 14:21:50 +02:00
|
|
|
case EVT_VEHICLEHANDLINGRULE: return mOnVehicleHandlingRule;
|
2016-05-22 05:20:38 +02:00
|
|
|
case EVT_SERVEROPTION: return mOnServerOption;
|
|
|
|
case EVT_SCRIPTRELOAD: return mOnScriptReload;
|
|
|
|
case EVT_SCRIPTLOADED: return mOnScriptLoaded;
|
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetBlipEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
BlipInst & inst = m_Blips.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_BLIPDESTROYED: return inst.mOnDestroyed;
|
|
|
|
case EVT_BLIPCUSTOM: return inst.mOnCustom;
|
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetCheckpointEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
CheckpointInst & inst = m_Checkpoints.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_CHECKPOINTDESTROYED: return inst.mOnDestroyed;
|
|
|
|
case EVT_CHECKPOINTCUSTOM: return inst.mOnCustom;
|
|
|
|
case EVT_CHECKPOINTENTERED: return inst.mOnEntered;
|
|
|
|
case EVT_CHECKPOINTEXITED: return inst.mOnExited;
|
2016-08-18 14:54:26 +02:00
|
|
|
case EVT_CHECKPOINTWORLD: return inst.mOnWorld;
|
2016-08-18 15:10:18 +02:00
|
|
|
case EVT_CHECKPOINTRADIUS: return inst.mOnRadius;
|
2016-05-22 05:20:38 +02:00
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetKeybindEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
KeybindInst & inst = m_Keybinds.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_KEYBINDDESTROYED: return inst.mOnDestroyed;
|
|
|
|
case EVT_KEYBINDCUSTOM: return inst.mOnCustom;
|
|
|
|
case EVT_PLAYERKEYPRESS: return inst.mOnKeyPress;
|
|
|
|
case EVT_PLAYERKEYRELEASE: return inst.mOnKeyRelease;
|
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetObjectEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
ObjectInst & inst = m_Objects.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_OBJECTDESTROYED: return inst.mOnDestroyed;
|
|
|
|
case EVT_OBJECTCUSTOM: return inst.mOnCustom;
|
|
|
|
case EVT_OBJECTSHOT: return inst.mOnShot;
|
|
|
|
case EVT_OBJECTTOUCHED: return inst.mOnTouched;
|
2016-08-18 15:37:55 +02:00
|
|
|
case EVT_OBJECTWORLD: return inst.mOnWorld;
|
2016-08-18 15:50:30 +02:00
|
|
|
case EVT_OBJECTALPHA: return inst.mOnAlpha;
|
2016-08-18 16:12:00 +02:00
|
|
|
case EVT_OBJECTREPORT: return inst.mOnReport;
|
2016-05-22 05:20:38 +02:00
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetPickupEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
PickupInst & inst = m_Pickups.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_PICKUPDESTROYED: return inst.mOnDestroyed;
|
|
|
|
case EVT_PICKUPCUSTOM: return inst.mOnCustom;
|
|
|
|
case EVT_PICKUPRESPAWN: return inst.mOnRespawn;
|
|
|
|
case EVT_PICKUPCLAIMED: return inst.mOnClaimed;
|
|
|
|
case EVT_PICKUPCOLLECTED: return inst.mOnCollected;
|
2016-08-19 16:58:08 +02:00
|
|
|
case EVT_PICKUPWORLD: return inst.mOnWorld;
|
2016-08-19 17:16:21 +02:00
|
|
|
case EVT_PICKUPALPHA: return inst.mOnAlpha;
|
2016-08-19 17:21:41 +02:00
|
|
|
case EVT_PICKUPAUTOMATIC: return inst.mOnAutomatic;
|
2016-08-19 17:26:52 +02:00
|
|
|
case EVT_PICKUPAUTOTIMER: return inst.mOnAutoTimer;
|
2016-05-22 05:20:38 +02:00
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetPlayerEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
PlayerInst & inst = m_Players.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_PLAYERDESTROYED: return inst.mOnDestroyed;
|
|
|
|
case EVT_PLAYERCUSTOM: return inst.mOnCustom;
|
|
|
|
case EVT_PLAYERREQUESTCLASS: return inst.mOnRequestClass;
|
|
|
|
case EVT_PLAYERREQUESTSPAWN: return inst.mOnRequestSpawn;
|
|
|
|
case EVT_PLAYERSPAWN: return inst.mOnSpawn;
|
|
|
|
case EVT_PLAYERWASTED: return inst.mOnWasted;
|
|
|
|
case EVT_PLAYERKILLED: return inst.mOnKilled;
|
|
|
|
case EVT_PLAYEREMBARKING: return inst.mOnEmbarking;
|
|
|
|
case EVT_PLAYEREMBARKED: return inst.mOnEmbarked;
|
|
|
|
case EVT_PLAYERDISEMBARK: return inst.mOnDisembark;
|
|
|
|
case EVT_PLAYERRENAME: return inst.mOnRename;
|
|
|
|
case EVT_PLAYERSTATE: return inst.mOnState;
|
|
|
|
case EVT_STATENONE: return inst.mOnStateNone;
|
|
|
|
case EVT_STATENORMAL: return inst.mOnStateNormal;
|
|
|
|
case EVT_STATEAIM: return inst.mOnStateAim;
|
|
|
|
case EVT_STATEDRIVER: return inst.mOnStateDriver;
|
|
|
|
case EVT_STATEPASSENGER: return inst.mOnStatePassenger;
|
|
|
|
case EVT_STATEENTERDRIVER: return inst.mOnStateEnterDriver;
|
|
|
|
case EVT_STATEENTERPASSENGER: return inst.mOnStateEnterPassenger;
|
|
|
|
case EVT_STATEEXIT: return inst.mOnStateExit;
|
|
|
|
case EVT_STATEUNSPAWNED: return inst.mOnStateUnspawned;
|
|
|
|
case EVT_PLAYERACTION: return inst.mOnAction;
|
|
|
|
case EVT_ACTIONNONE: return inst.mOnActionNone;
|
|
|
|
case EVT_ACTIONNORMAL: return inst.mOnActionNormal;
|
|
|
|
case EVT_ACTIONAIMING: return inst.mOnActionAiming;
|
|
|
|
case EVT_ACTIONSHOOTING: return inst.mOnActionShooting;
|
|
|
|
case EVT_ACTIONJUMPING: return inst.mOnActionJumping;
|
|
|
|
case EVT_ACTIONLIEDOWN: return inst.mOnActionLieDown;
|
|
|
|
case EVT_ACTIONGETTINGUP: return inst.mOnActionGettingUp;
|
|
|
|
case EVT_ACTIONJUMPVEHICLE: return inst.mOnActionJumpVehicle;
|
|
|
|
case EVT_ACTIONDRIVING: return inst.mOnActionDriving;
|
|
|
|
case EVT_ACTIONDYING: return inst.mOnActionDying;
|
|
|
|
case EVT_ACTIONWASTED: return inst.mOnActionWasted;
|
|
|
|
case EVT_ACTIONEMBARKING: return inst.mOnActionEmbarking;
|
|
|
|
case EVT_ACTIONDISEMBARKING: return inst.mOnActionDisembarking;
|
|
|
|
case EVT_PLAYERBURNING: return inst.mOnBurning;
|
|
|
|
case EVT_PLAYERCROUCHING: return inst.mOnCrouching;
|
|
|
|
case EVT_PLAYERGAMEKEYS: return inst.mOnGameKeys;
|
|
|
|
case EVT_PLAYERSTARTTYPING: return inst.mOnStartTyping;
|
|
|
|
case EVT_PLAYERSTOPTYPING: return inst.mOnStopTyping;
|
|
|
|
case EVT_PLAYERAWAY: return inst.mOnAway;
|
|
|
|
case EVT_PLAYERMESSAGE: return inst.mOnMessage;
|
|
|
|
case EVT_PLAYERCOMMAND: return inst.mOnCommand;
|
|
|
|
case EVT_PLAYERPRIVATEMESSAGE: return inst.mOnPrivateMessage;
|
|
|
|
case EVT_PLAYERKEYPRESS: return inst.mOnKeyPress;
|
|
|
|
case EVT_PLAYERKEYRELEASE: return inst.mOnKeyRelease;
|
|
|
|
case EVT_PLAYERSPECTATE: return inst.mOnSpectate;
|
|
|
|
case EVT_PLAYERCRASHREPORT: return inst.mOnCrashreport;
|
|
|
|
case EVT_OBJECTSHOT: return inst.mOnObjectShot;
|
|
|
|
case EVT_OBJECTTOUCHED: return inst.mOnObjectTouched;
|
|
|
|
case EVT_PICKUPCLAIMED: return inst.mOnPickupClaimed;
|
|
|
|
case EVT_PICKUPCOLLECTED: return inst.mOnPickupCollected;
|
|
|
|
case EVT_CHECKPOINTENTERED: return inst.mOnCheckpointEntered;
|
|
|
|
case EVT_CHECKPOINTEXITED: return inst.mOnCheckpointExited;
|
|
|
|
case EVT_CLIENTSCRIPTDATA: return inst.mOnClientScriptData;
|
|
|
|
case EVT_PLAYERUPDATE: return inst.mOnUpdate;
|
|
|
|
case EVT_PLAYERHEALTH: return inst.mOnHealth;
|
|
|
|
case EVT_PLAYERARMOUR: return inst.mOnArmour;
|
|
|
|
case EVT_PLAYERWEAPON: return inst.mOnWeapon;
|
|
|
|
case EVT_PLAYERHEADING: return inst.mOnHeading;
|
|
|
|
case EVT_PLAYERPOSITION: return inst.mOnPosition;
|
|
|
|
case EVT_PLAYEROPTION: return inst.mOnOption;
|
2016-08-17 14:40:48 +02:00
|
|
|
case EVT_PLAYERADMIN: return inst.mOnAdmin;
|
2016-08-17 14:45:44 +02:00
|
|
|
case EVT_PLAYERWORLD: return inst.mOnWorld;
|
2016-08-17 14:49:08 +02:00
|
|
|
case EVT_PLAYERTEAM: return inst.mOnTeam;
|
2016-08-17 14:52:22 +02:00
|
|
|
case EVT_PLAYERSKIN: return inst.mOnSkin;
|
2016-08-17 14:55:59 +02:00
|
|
|
case EVT_PLAYERMONEY: return inst.mOnMoney;
|
2016-08-17 15:00:28 +02:00
|
|
|
case EVT_PLAYERSCORE: return inst.mOnScore;
|
2016-08-17 15:04:14 +02:00
|
|
|
case EVT_PLAYERWANTEDLEVEL: return inst.mOnWantedLevel;
|
2016-08-17 15:07:31 +02:00
|
|
|
case EVT_PLAYERIMMUNITY: return inst.mOnImmunity;
|
2016-08-17 15:10:43 +02:00
|
|
|
case EVT_PLAYERALPHA: return inst.mOnAlpha;
|
2016-05-22 05:20:38 +02:00
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
Function & Core::GetVehicleEvent(Int32 id, Int32 evid)
|
|
|
|
{
|
|
|
|
VehicleInst & inst = m_Vehicles.at(id);
|
|
|
|
|
|
|
|
switch (evid)
|
|
|
|
{
|
|
|
|
case EVT_PLAYEREMBARKING: return inst.mOnEmbarking;
|
|
|
|
case EVT_PLAYEREMBARKED: return inst.mOnEmbarked;
|
|
|
|
case EVT_PLAYERDISEMBARK: return inst.mOnDisembark;
|
|
|
|
case EVT_VEHICLEEXPLODE: return inst.mOnExplode;
|
|
|
|
case EVT_VEHICLERESPAWN: return inst.mOnRespawn;
|
|
|
|
case EVT_VEHICLEUPDATE: return inst.mOnUpdate;
|
|
|
|
case EVT_VEHICLECOLOUR: return inst.mOnColour;
|
|
|
|
case EVT_VEHICLEHEALTH: return inst.mOnHealth;
|
|
|
|
case EVT_VEHICLEPOSITION: return inst.mOnPosition;
|
|
|
|
case EVT_VEHICLEROTATION: return inst.mOnRotation;
|
|
|
|
case EVT_VEHICLEOPTION: return inst.mOnOption;
|
2016-08-18 13:38:00 +02:00
|
|
|
case EVT_VEHICLEWORLD: return inst.mOnWorld;
|
2016-08-18 13:45:12 +02:00
|
|
|
case EVT_VEHICLEIMMUNITY: return inst.mOnImmunity;
|
2016-08-18 13:51:55 +02:00
|
|
|
case EVT_VEHICLEPARTSTATUS: return inst.mOnPartStatus;
|
2016-08-20 20:14:03 +02:00
|
|
|
case EVT_VEHICLETIRESTATUS: return inst.mOnTireStatus;
|
2016-08-18 14:06:03 +02:00
|
|
|
case EVT_VEHICLEDAMAGEDATA: return inst.mOnDamageData;
|
2016-08-18 14:13:33 +02:00
|
|
|
case EVT_VEHICLERADIO: return inst.mOnRadio;
|
2016-08-18 14:21:50 +02:00
|
|
|
case EVT_VEHICLEHANDLINGRULE: return inst.mOnHandlingRule;
|
2016-05-22 05:20:38 +02:00
|
|
|
default: return NullFunction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|