1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00
SqMod/source/Core.hpp

1530 lines
71 KiB
C++
Raw Normal View History

2015-09-30 02:56:11 +02:00
#ifndef _CORE_HPP_
#define _CORE_HPP_
// ------------------------------------------------------------------------------------------------
#include "Common.hpp"
#include "Signal.hpp"
// ------------------------------------------------------------------------------------------------
#include "Base/Buffer.hpp"
#include "Base/Vector3.hpp"
2015-09-30 02:56:11 +02:00
// ------------------------------------------------------------------------------------------------
#include <list>
2015-09-30 02:56:11 +02:00
#include <vector>
#include <utility>
#include <unordered_map>
// ------------------------------------------------------------------------------------------------
namespace SqMod {
2015-11-08 06:20:31 +01:00
/* ------------------------------------------------------------------------------------------------
* The central core class is supposed to manage the life time of the plug-in and it's resources.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
class Core
{
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Allow only the smart pointer to delete this class instance as soon as it's not needed.
*/
friend class std::unique_ptr< Core, void(*)(Core *) >;
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
protected:
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Helper structure meant to track changes in player instances.
*/
2015-09-30 02:56:11 +02:00
struct TPlayer
{
2015-11-08 06:20:31 +01:00
/* Last used player weapon. */
2015-09-30 02:56:11 +02:00
SQInt32 Weapon;
2015-11-08 06:20:31 +01:00
/* Last known player health. */
2015-09-30 02:56:11 +02:00
SQFloat Health;
2015-11-08 06:20:31 +01:00
/* Last known player armour */
2015-09-30 02:56:11 +02:00
SQFloat Armour;
2015-11-08 06:20:31 +01:00
/* Last known player position. */
Vector3 Position;
2015-11-08 06:20:31 +01:00
/* Whether this entity is new and must not be check on first update. */
2015-09-30 02:56:11 +02:00
bool Fresh;
};
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Helper structure meant to track changes in vehicle instances.
*/
2015-09-30 02:56:11 +02:00
struct TVehicle
{
2015-11-08 06:20:31 +01:00
/* Last known vehicle health. */
2015-09-30 02:56:11 +02:00
SQFloat Health;
2015-11-08 06:20:31 +01:00
/* Last known vehicle position. */
Vector3 Position;
2015-11-08 06:20:31 +01:00
/* Whether this entity is new and must not be check on first update. */
2015-09-30 02:56:11 +02:00
bool Fresh;
};
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* An array of player tracking structures for each player instance.
*/
2015-11-08 06:20:31 +01:00
typedef std::array< TPlayer, SQMOD_PLAYER_POOL > TPlayerInstPool;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* An array of vehicle tracking structures for each vehicle instance.
*/
2015-11-08 06:20:31 +01:00
typedef std::array< TVehicle, SQMOD_VEHICLE_POOL > TVehicleInstPool;
/* --------------------------------------------------------------------------------------------
* Reference to all compiled scripts specified in the configuration file.
*/
2015-11-08 06:20:31 +01:00
typedef std::unordered_map< String, Script > SqScriptPool;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* A key->value pair container with arbitrary configuration values.
*/
2015-11-08 06:20:31 +01:00
typedef std::unordered_map< String, String > OptionPool;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* A list of available buffers that are shared across the script to avoid frequent allocations.
*/
typedef std::list< Buffer > BufferPool;
2015-09-30 02:56:11 +02:00
private:
/* --------------------------------------------------------------------------------------------
* Last known state of the plug-in that is to be returned by the event callbacks.
*/
2015-09-30 02:56:11 +02:00
SQInteger m_State;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* All the user defined options in the general section of the configuration file.
*/
2015-09-30 02:56:11 +02:00
OptionPool m_Options;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* The main Squirrel virtual machine instance associated with this class instance.
*/
2015-09-30 02:56:11 +02:00
HSQUIRRELVM m_VM;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* All the scripts specified in the configuration file in their compiled form.
*/
2015-09-30 02:56:11 +02:00
SqScriptPool m_Scripts;
/* --------------------------------------------------------------------------------------------
* Last known error message in the plug-in throwing an error at certain stages is not an option.
*/
2015-09-30 02:56:11 +02:00
String m_ErrorMsg;
/* --------------------------------------------------------------------------------------------
* An array of instances of the tracking structure for each possible player on the server.
*/
2015-09-30 02:56:11 +02:00
TPlayerInstPool m_PlayerTrack;
/* --------------------------------------------------------------------------------------------
* An array of instances of the tracking structure for each possible vehicle on the server.
*/
2015-09-30 02:56:11 +02:00
TVehicleInstPool m_VehicleTrack;
/* --------------------------------------------------------------------------------------------
* A pool of shared buffers shared throughout the plug-in through move semantics.
*/
2015-09-30 02:56:11 +02:00
BufferPool m_BufferPool;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Server uptime calculated as the sum of delta time between server frames.
*/
Float32 m_Uptime;
2015-09-30 02:56:11 +02:00
protected:
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Default constructor.
*/
Core();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Copy constructor (disabled).
*/
Core(Core const &) = delete;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Move constructor (disabled).
*/
Core(Core &&) = delete;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Destructor.
*/
~Core();
/* --------------------------------------------------------------------------------------------
* Copy assignment operator (disabled).
*/
Core & operator=(Core const &) = delete;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Move assignment operator (disabled).
*/
Core & operator=(Core &&) = delete;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Called by the smart pointer to delete the instance of this class.
*/
static void _Finalizer(Core * ptr);
2015-09-30 02:56:11 +02:00
public:
// --------------------------------------------------------------------------------------------
typedef std::unique_ptr< Core, void(*)(Core *) > Pointer;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Creates an instance of this type if one doesn't already exist and returns it.
*/
static Pointer Inst();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Attempt to initialize the plug-in subsystems and prepare it for the loading stage.
*/
bool Init();
/* --------------------------------------------------------------------------------------------
* Attempt load the plug-in resources and finally startup the plug-in.
*/
bool Load();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Attempt to de-initialize the plug-in subsystems and prepare the plug-in for proper shutdown.
*/
void Deinit();
/* --------------------------------------------------------------------------------------------
* Attempt to unload the plug-in resources and release everything from the load stage.
*/
void Unload();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Attempt to completely terminate the plug-in instance with no intention of starting up again.
*/
void Terminate();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Set the current plug-in state to the specified value.
*/
void SetState(SQInteger val);
/* --------------------------------------------------------------------------------------------
* Retrieve the current plug-in state.
*/
SQInteger GetState() const;
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Retrieve the value associated with the specified option name.
*/
String GetOption(const String & name) const;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Change the value associated with the specified name.
*/
void SetOption(const String & name, const String & value);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Retrieve the plug-in/server cumulated uptime.
*/
SQFloat GetUptime() const;
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Retrieve a buffer of at least the specified size.
*/
Buffer PullBuffer(unsigned sz = 4096);
/* --------------------------------------------------------------------------------------------
* Return a previously borrowed buffer back to the pool of buffers.
*/
void PushBuffer(Buffer && buf);
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Create a collection of buffer with the specified size and add them to the pool.
*/
void MakeBuffer(unsigned num, unsigned sz = 4096);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Attempt to activate a specific player within the plug-in.
*/
void ConnectPlayer(SQInt32 id, SQInt32 header, SqObj & payload);
/* --------------------------------------------------------------------------------------------
* Attempt to deactivate a specific player withing the plug-in.
*/
void DisconnectPlayer(SQInt32 id, SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
protected:
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Attempt to retrieve the values from the configuration file.
*/
bool Configure();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Attempt to create a Squirrel Virtual Machine.
*/
bool CreateVM();
/* --------------------------------------------------------------------------------------------
* Attempt to close a Squirrel Virtual Machine and destroy it's resources along with it.
*/
void DestroyVM();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Attempt to load the scripts specified in the configuration file.
*/
bool LoadScripts();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Attempt to compile the loaded scripts and store the resulted object.
*/
bool Compile(const String & name);
/* --------------------------------------------------------------------------------------------
2015-11-08 06:20:31 +01:00
* Attempt to execute the previously compiled scripts.
*/
bool Execute();
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Print debugging information about the current call-stack.
*/
void PrintCallstack();
2015-09-30 02:56:11 +02:00
public:
/* --------------------------------------------------------------------------------------------
* Used by the Squirrel VM to output text messages to a stream defined by the plug-in.
*/
static void PrintFunc(HSQUIRRELVM vm, const SQChar * str, ...);
/* --------------------------------------------------------------------------------------------
* Used by the Squirrel VM to output error messages to a stream defined by the plug-in.
*/
static void ErrorFunc(HSQUIRRELVM vm, const SQChar * str, ...);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* A custom error handler defined by the plug-in to be invoked when runtime errors occur.
*/
static SQInteger RuntimeErrorHandler(HSQUIRRELVM vm);
/* --------------------------------------------------------------------------------------------
* A custom error handler defined by the plug-in to be invoked when compile time errors occur.
2015-09-30 02:56:11 +02:00
*/
2015-11-08 06:20:31 +01:00
static void CompilerErrorHandler(HSQUIRRELVM vm, const SQChar * desc, const SQChar * src,
SQInteger line, SQInteger column);
2015-09-30 02:56:11 +02:00
public:
/* --------------------------------------------------------------------------------------------
* Creates a new Blip on the server
*/
Reference< CBlip > NewBlip(SQInt32 index, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
SQInt32 scale, SQUint32 color, SQInt32 sprid,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Checkpoint on the server
*/
Reference< CCheckpoint > NewCheckpoint(SQInt32 player, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, Uint8 a, SQFloat radius,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Keybind on the server
*/
Reference< CKeybind > NewKeybind(SQInt32 slot, bool release,
SQInt32 primary, SQInt32 secondary, SQInt32 alternative,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Object on the server
*/
Reference< CObject > NewObject(SQInt32 model, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
SQInt32 alpha,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Pickup on the server
*/
Reference< CPickup > NewPickup(SQInt32 model, SQInt32 world, SQInt32 quantity,
SQFloat x, SQFloat y, SQFloat z, SQInt32 alpha, bool automatic,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Sphere on the server
*/
Reference< CSphere > NewSphere(SQInt32 player, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
Uint8 r, Uint8 g, Uint8 b, SQFloat radius,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Sprite on the server
*/
Reference< CSprite > NewSprite(SQInt32 index, const SQChar * file, SQInt32 xp, SQInt32 yp,
SQInt32 xr, SQInt32 yr, SQFloat angle, SQInt32 alpha, bool rel,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Textdraw on the server
*/
Reference< CTextdraw > NewTextdraw(SQInt32 index, const SQChar * text, SQInt32 xp, SQInt32 yp,
SQUint32 color, bool rel,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
/* --------------------------------------------------------------------------------------------
* Creates a new Vehicle on the server
*/
Reference< CVehicle > NewVehicle(SQInt32 model, SQInt32 world, SQFloat x, SQFloat y, SQFloat z,
SQFloat angle, SQInt32 primary, SQInt32 secondary,
SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
public:
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the Squirrel Virtual machine is about to be closed.
*/
void OnVMClose();
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a blip entity instance was created.
*/
void OnBlipCreated(SQInt32 blip, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a checkpoint entity instance was created.
*/
void OnCheckpointCreated(SQInt32 checkpoint, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a keybind entity instance was created.
*/
void OnKeybindCreated(SQInt32 keybind, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a object entity instance was created.
*/
void OnObjectCreated(SQInt32 object, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a pickup entity instance was created.
*/
void OnPickupCreated(SQInt32 pickup, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player entity instance was created.
*/
void OnPlayerCreated(SQInt32 player, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a sphere entity instance was created.
*/
void OnSphereCreated(SQInt32 sphere, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a sprite entity instance was created.
*/
void OnSpriteCreated(SQInt32 sprite, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a textdraw entity instance was created.
*/
void OnTextdrawCreated(SQInt32 textdraw, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a vehicle entity instance was created.
*/
void OnVehicleCreated(SQInt32 vehicle, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a blip entity instance was destroyed.
*/
void OnBlipDestroyed(SQInt32 blip, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a checkpoint entity instance was destroyed.
*/
void OnCheckpointDestroyed(SQInt32 checkpoint, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a keybind entity instance was destroyed.
*/
void OnKeybindDestroyed(SQInt32 keybind, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a object entity instance was destroyed.
*/
void OnObjectDestroyed(SQInt32 object, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a pickup entity instance was destroyed.
*/
void OnPickupDestroyed(SQInt32 pickup, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player entity instance was destroyed.
*/
void OnPlayerDestroyed(SQInt32 player, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a sphere entity instance was destroyed.
*/
void OnSphereDestroyed(SQInt32 sphere, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a sprite entity instance was destroyed.
*/
void OnSpriteDestroyed(SQInt32 sprite, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a textdraw entity instance was destroyed.
*/
void OnTextdrawDestroyed(SQInt32 textdraw, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a vehicle entity instance was destroyed.
*/
void OnVehicleDestroyed(SQInt32 vehicle, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a blip entity instance triggered a custom event.
*/
void OnBlipCustom(SQInt32 blip, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a checkpoint entity instance triggered a custom event.
*/
void OnCheckpointCustom(SQInt32 checkpoint, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a keybind entity instance triggered a custom event.
*/
void OnKeybindCustom(SQInt32 keybind, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a object entity instance triggered a custom event.
*/
void OnObjectCustom(SQInt32 object, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a pickup entity instance triggered a custom event.
*/
void OnPickupCustom(SQInt32 pickup, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player entity instance triggered a custom event.
*/
void OnPlayerCustom(SQInt32 player, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a sphere entity instance triggered a custom event.
*/
void OnSphereCustom(SQInt32 sphere, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a sprite entity instance triggered a custom event.
*/
void OnSpriteCustom(SQInt32 sprite, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a textdraw entity instance triggered a custom event.
*/
void OnTextdrawCustom(SQInt32 textdraw, SQInt32 header, SqObj & payload);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a vehicle entity instance triggered a custom event.
*/
void OnVehicleCustom(SQInt32 vehicle, SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player changed his away status.
*/
void OnPlayerAway(SQInt32 player, bool status);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player pressed some game keys.
*/
void OnPlayerGameKeys(SQInt32 player, SQInt32 previous, SQInt32 current);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player changed his nick name.
*/
void OnPlayerName(SQInt32 player, const SQChar * previous, const SQChar * current);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player is requesting a specific class to be assigned to.
2015-11-08 06:20:31 +01:00
*/
void OnPlayerRequestClass(SQInt32 player, SQInt32 offset);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player requests to spawn in the game.
*/
void OnPlayerRequestSpawn(SQInt32 player);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player has spawned in the game.
*/
void OnPlayerSpawn(SQInt32 player);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player began typing in the chat/console.
*/
void OnPlayerStartTyping(SQInt32 player);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player stopped typing in the chat/console.
*/
void OnPlayerStopTyping(SQInt32 player);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player sent a public chat message.
*/
void OnPlayerChat(SQInt32 player, const SQChar * message);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player sent a server command.
*/
void OnPlayerCommand(SQInt32 player, const SQChar * command);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player sent a private chat message.
2015-11-08 06:20:31 +01:00
*/
void OnPlayerMessage(SQInt32 player, SQInt32 receiver, const SQChar * message);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the health changed for a specific player.
2015-11-08 06:20:31 +01:00
*/
void OnPlayerHealth(SQInt32 player, SQFloat previous, SQFloat current);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the armour changed for a specific player.
2015-11-08 06:20:31 +01:00
*/
void OnPlayerArmour(SQInt32 player, SQFloat previous, SQFloat current);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player changed his current weapon.
*/
void OnPlayerWeapon(SQInt32 player, SQInt32 previous, SQInt32 current);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player changed his current location/position.
*/
void OnPlayerMove(SQInt32 player, const Vector3 & previous, const Vector3 & current);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player died from a natural cause or self inflicted injury.
*/
void OnPlayerWasted(SQInt32 player, SQInt32 reason);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player was killed by another player.
*/
void OnPlayerKilled(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player began to spectator another player.
2015-11-08 06:20:31 +01:00
*/
void OnPlayerSpectate(SQInt32 player, SQInt32 target);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player sent a crash report to the server.
*/
void OnPlayerCrashreport(SQInt32 player, const SQChar * report);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player is on fire or stopped being on fire.
*/
void OnPlayerBurning(SQInt32 player, bool state);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player is crouching or stopped crouching.
*/
void OnPlayerCrouching(SQInt32 player, bool state);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed.
*/
void OnPlayerState(SQInt32 player, SQInt32 previous, SQInt32 current);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed.
*/
void OnPlayerAction(SQInt32 player, SQInt32 previous, SQInt32 current);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to nothing.
*/
void OnStateNone(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to normal.
*/
void OnStateNormal(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to shooting.
*/
void OnStateShooting(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to entered a vehicle
* as the driver.
*/
void OnStateDriver(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to entered a vehicle
* as the passenger.
*/
void OnStatePassenger(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to preparing to
* enter a vehicle as the driver.
*/
void OnStateEnterDriver(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to preparing to
* enter a vehicle as a passenger.
*/
void OnStateEnterPassenger(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to exiting a vehicle.
*/
void OnStateExitVehicle(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current state of a player has changed to being unspanned.
2015-11-08 06:20:31 +01:00
*/
void OnStateUnspawned(SQInt32 player, SQInt32 previous);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to nothing.
*/
void OnActionNone(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to normal.
*/
void OnActionNormal(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to aiming at
* something.
*/
void OnActionAiming(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to shooting.
*/
void OnActionShooting(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to jumping.
*/
void OnActionJumping(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to lying down.
*/
void OnActionLieDown(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to getting up.
*/
void OnActionGettingUp(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to jumping out
* of a vehicle.
*/
void OnActionJumpVehicle(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to driving a vehicle.
*/
void OnActionDriving(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to dying after
* being killed by someone else.
*/
void OnActionDying(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to dying by
* natural causes or self inflicted injuries.
*/
void OnActionWasted(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to embarking
* a vehicle.
*/
void OnActionEmbarking(SQInt32 player, SQInt32 previous);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the current action of a player has changed to disembarking
2015-11-08 06:20:31 +01:00
* a vehicle.
*/
void OnActionDisembarking(SQInt32 player, SQInt32 previous);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the a vehicle instance has re-spawned.
2015-11-08 06:20:31 +01:00
*/
void OnVehicleRespawn(SQInt32 vehicle);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the a vehicle has exploded.
*/
void OnVehicleExplode(SQInt32 vehicle);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the health changed for a specific vehicle.
2015-11-08 06:20:31 +01:00
*/
void OnVehicleHealth(SQInt32 vehicle, SQFloat previous, SQFloat current);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a vehicle changed its current location/position.
*/
void OnVehicleMove(SQInt32 vehicle, const Vector3 & previous, const Vector3 & current);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the a pickup instance has re-spawned.
2015-11-08 06:20:31 +01:00
*/
void OnPickupRespawn(SQInt32 pickup);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player pressed a listened key combination.
*/
void OnPlayerKeyPress(SQInt32 player, SQInt32 keybind);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player released a listened key combination.
*/
void OnPlayerKeyRelease(SQInt32 player, SQInt32 keybind);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player is about to embark in a vehicle.
*/
void OnPlayerEmbarking(SQInt32 player, SQInt32 vehicle, SQInt32 slot);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just embarked in a vehicle.
*/
void OnPlayerEmbarked(SQInt32 player, SQInt32 vehicle, SQInt32 slot);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just disembarked from a vehicle.
2015-11-08 06:20:31 +01:00
*/
void OnPlayerDisembark(SQInt32 player, SQInt32 vehicle);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player claimed ownership over a pickup.
2015-11-08 06:20:31 +01:00
*/
void OnPickupClaimed(SQInt32 player, SQInt32 pickup);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player collected a pickup.
2015-11-08 06:20:31 +01:00
*/
void OnPickupCollected(SQInt32 player, SQInt32 pickup);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just shot a object.
*/
void OnObjectShot(SQInt32 player, SQInt32 object, SQInt32 weapon);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just bumped in a object.
*/
void OnObjectBump(SQInt32 player, SQInt32 object);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just entered a checkpoint.
*/
void OnCheckpointEntered(SQInt32 player, SQInt32 checkpoint);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just exited a checkpoint.
*/
void OnCheckpointExited(SQInt32 player, SQInt32 checkpoint);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just entered a sphere.
*/
void OnSphereEntered(SQInt32 player, SQInt32 sphere);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a player just exited a sphere.
*/
void OnSphereExited(SQInt32 player, SQInt32 sphere);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the server just finished one cycle of it's main loop.
*/
void OnServerFrame(SQFloat delta);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the server just started up.
*/
void OnServerStartup();
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the server is about to shut down.
*/
void OnServerShutdown();
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the server received an internal command.
*/
void OnInternalCommand(SQInt32 type, const SQChar * text);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that someone is trying to log into the server.
2015-11-08 06:20:31 +01:00
*/
void OnLoginAttempt(const SQChar * name, const SQChar * passwd, const SQChar * ip);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that a custom event was just triggered.
*/
void OnCustomEvent(SQInt32 group, SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that an option just changed in the game world.
*/
void OnWorldOption(SQInt32 option, SqObj & value);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that something was just toggled in the game world.
2015-11-08 06:20:31 +01:00
*/
void OnWorldToggle(SQInt32 option, bool value);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Notify event listeners that the plug-in is about to reload it's resources.
2015-11-08 06:20:31 +01:00
*/
void OnScriptReload(SQInt32 header, SqObj & payload);
2015-09-30 02:56:11 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Process updates for a player instance.
*/
void OnPlayerUpdate(SQInt32 player, SQInt32 type);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Process updates for a vehicle instance.
*/
void OnVehicleUpdate(SQInt32 vehicle, SQInt32 type);
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* Process external creation and destruction of entity instances.
*/
void OnEntityPool(SQInt32 type, SQInt32 id, bool deleted);
2015-09-30 02:56:11 +02:00
public:
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the Squirrel VM is closed.
*/
EVMClose VMClose;
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a blip entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EBlipCreated BlipCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a checkpoint entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ECheckpointCreated CheckpointCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a keybind entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EKeybindCreated KeybindCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a object entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EObjectCreated ObjectCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a pickup entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPickupCreated PickupCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a Player entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPlayerCreated PlayerCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a sphere entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ESphereCreated SphereCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a sprite entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ESpriteCreated SpriteCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a textdraw entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ETextdrawCreated TextdrawCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a vehicle entity instance was
* created on the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EVehicleCreated VehicleCreated;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a blip entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EBlipDestroyed BlipDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a checkpoint entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ECheckpointDestroyed CheckpointDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a keybind entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EKeybindDestroyed KeybindDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a object entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EObjectDestroyed ObjectDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a pickup entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPickupDestroyed PickupDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPlayerDestroyed PlayerDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a sphere entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ESphereDestroyed SphereDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a sprite entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ESpriteDestroyed SpriteDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a textdraw entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
ETextdrawDestroyed TextdrawDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a vehicle entity instance was
* destroyed from the server. Either by this plug-in or external ones.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EVehicleDestroyed VehicleDestroyed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a blip entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
EBlipCustom BlipCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a checkpoint entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
ECheckpointCustom CheckpointCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a keybind entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
EKeybindCustom KeybindCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a object entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
EObjectCustom ObjectCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a pickup entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
EPickupCustom PickupCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
EPlayerCustom PlayerCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a sphere entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
ESphereCustom SphereCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a sprite entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
ESpriteCustom SpriteCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a textdraw entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
ETextdrawCustom TextdrawCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a vehicle entity instance emitted
* a custom event type.
*/
2015-09-30 02:56:11 +02:00
EVehicleCustom VehicleCustom;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player changed his away status.
*/
2015-09-30 02:56:11 +02:00
EPlayerAway PlayerAway;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player pressed any of the game keys.
*/
2015-09-30 02:56:11 +02:00
EPlayerGameKeys PlayerGameKeys;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player changed his name.
*/
2015-09-30 02:56:11 +02:00
EPlayerRename PlayerRename;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when requested to be assigned a class.
*/
2015-09-30 02:56:11 +02:00
EPlayerRequestClass PlayerRequestClass;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player requested to spawn.
*/
2015-09-30 02:56:11 +02:00
EPlayerRequestSpawn PlayerRequestSpawn;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just spawned in the game.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPlayerSpawn PlayerSpawn;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player began typing in the
* chat/console.
*/
2015-09-30 02:56:11 +02:00
EPlayerStartTyping PlayerStartTyping;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player stopped typing in the
* chat/console.
*/
2015-09-30 02:56:11 +02:00
EPlayerStopTyping PlayerStopTyping;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player sent a public chat message.
*/
2015-09-30 02:56:11 +02:00
EPlayerChat PlayerChat;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player sent a server command.
*/
2015-09-30 02:56:11 +02:00
EPlayerCommand PlayerCommand;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player sent a private chat message.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPlayerMessage PlayerMessage;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when health changed for a specific player.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPlayerHealth PlayerHealth;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the armour changed for a specific
2015-11-08 06:20:31 +01:00
* player.
*/
2015-09-30 02:56:11 +02:00
EPlayerArmour PlayerArmour;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player changed his current weapon.
*/
2015-09-30 02:56:11 +02:00
EPlayerWeapon PlayerWeapon;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player changed his current
* location/position.
*/
2015-09-30 02:56:11 +02:00
EPlayerMove PlayerMove;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player died from a natural cause
* or self inflicted injury.
*/
2015-09-30 02:56:11 +02:00
EPlayerWasted PlayerWasted;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player was killed by another player.
*/
2015-09-30 02:56:11 +02:00
EPlayerKilled PlayerKilled;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player is killed by one of his
* teammates.
*/
2015-09-30 02:56:11 +02:00
EPlayerTeamKill PlayerTeamKill;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player began to spectate another
* player.
*/
2015-09-30 02:56:11 +02:00
EPlayerSpectate PlayerSpectate;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player sent a crash report to
* the server.
*/
2015-09-30 02:56:11 +02:00
EPlayerCrashreport PlayerCrashreport;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player is on fire or stopped
* being on fire.
*/
2015-09-30 02:56:11 +02:00
EPlayerBurning PlayerBurning;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player is crouching or stopped
* crouching.
*/
2015-09-30 02:56:11 +02:00
EPlayerCrouching PlayerCrouching;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the current state of a player has
* changed.
*/
2015-09-30 02:56:11 +02:00
EPlayerState PlayerState;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current action of a player has
* changed.
*/
2015-09-30 02:56:11 +02:00
EPlayerAction PlayerAction;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to nothing.
*/
2015-09-30 02:56:11 +02:00
EStateNone StateNone;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to normal.
*/
2015-09-30 02:56:11 +02:00
EStateNormal StateNormal;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to shooting.
*/
2015-09-30 02:56:11 +02:00
EStateShooting StateShooting;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to entered a vehicle as the driver.
*/
2015-09-30 02:56:11 +02:00
EStateDriver StateDriver;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to entered a vehicle as the passenger.
*/
2015-09-30 02:56:11 +02:00
EStatePassenger StatePassenger;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to preparing to enter a vehicle as the driver.
*/
2015-09-30 02:56:11 +02:00
EStateEnterDriver StateEnterDriver;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to preparing to enter a vehicle as a passenger.
*/
2015-09-30 02:56:11 +02:00
EStateEnterPassenger StateEnterPassenger;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to exiting a vehicle.
*/
2015-09-30 02:56:11 +02:00
EStateExitVehicle StateExitVehicle;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to being un-spawned.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EStateUnspawned StateUnspawned;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has action
* to nothing.
*/
2015-09-30 02:56:11 +02:00
EActionNone ActionNone;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to normal.
*/
2015-09-30 02:56:11 +02:00
EActionNormal ActionNormal;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to aiming at something.
*/
2015-09-30 02:56:11 +02:00
EActionAiming ActionAiming;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to shooting.
*/
2015-09-30 02:56:11 +02:00
EActionShooting ActionShooting;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to jumping.
*/
2015-09-30 02:56:11 +02:00
EActionJumping ActionJumping;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to lying down.
*/
2015-09-30 02:56:11 +02:00
EActionLieDown ActionLieDown;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to getting up.
*/
2015-09-30 02:56:11 +02:00
EActionGettingUp ActionGettingUp;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to jumping out of a vehicle.
*/
2015-09-30 02:56:11 +02:00
EActionJumpVehicle ActionJumpVehicle;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to driving a vehicle.
*/
2015-09-30 02:56:11 +02:00
EActionDriving ActionDriving;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to dying after being killed by someone else.
*/
2015-09-30 02:56:11 +02:00
EActionDying ActionDying;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to dying by natural causes or self inflicted injuries.
*/
2015-09-30 02:56:11 +02:00
EActionWasted ActionWasted;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to embarking a vehicle.
*/
2015-09-30 02:56:11 +02:00
EActionEmbarking ActionEmbarking;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when current state of a player has changed
* to disembarking a vehicle.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EActionDisembarking ActionDisembarking;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a vehicle instance has re-spawned.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EVehicleRespawn VehicleRespawn;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a vehicle has exploded.
*/
2015-09-30 02:56:11 +02:00
EVehicleExplode VehicleExplode;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the health changed for a specific
2015-11-08 06:20:31 +01:00
* vehicle.
*/
2015-09-30 02:56:11 +02:00
EVehicleHealth VehicleHealth;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a vehicle changed its current
* location/position.
*/
2015-09-30 02:56:11 +02:00
EVehicleMove VehicleMove;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a pickup instance has re-spawned.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPickupRespawn PickupRespawn;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player pressed a listened
* key combination.
*/
2015-09-30 02:56:11 +02:00
EKeybindKeyPress KeybindKeyPress;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player released a listened
* key combination.
*/
2015-09-30 02:56:11 +02:00
EKeybindKeyRelease KeybindKeyRelease;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player is about to embark in a
* vehicle.
*/
2015-09-30 02:56:11 +02:00
EVehicleEmbarking VehicleEmbarking;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just embarked in a vehicle.
*/
2015-09-30 02:56:11 +02:00
EVehicleEmbarked VehicleEmbarked;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just disembarked from a
2015-11-08 06:20:31 +01:00
* vehicle.
*/
2015-09-30 02:56:11 +02:00
EVehicleDisembark VehicleDisembark;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player claimed ownership over a
2015-11-08 06:20:31 +01:00
* pickup.
*/
2015-09-30 02:56:11 +02:00
EPickupClaimed PickupClaimed;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player collected a pickup.
2015-11-08 06:20:31 +01:00
*/
2015-09-30 02:56:11 +02:00
EPickupCollected PickupCollected;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just shot a object.
*/
2015-09-30 02:56:11 +02:00
EObjectShot ObjectShot;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just bumped in a object.
*/
2015-09-30 02:56:11 +02:00
EObjectBump ObjectBump;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just entered a checkpoint.
*/
2015-09-30 02:56:11 +02:00
ECheckpointEntered CheckpointEntered;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just exited a checkpoint.
*/
2015-09-30 02:56:11 +02:00
ECheckpointExited CheckpointExited;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just entered a sphere.
*/
2015-09-30 02:56:11 +02:00
ESphereEntered SphereEntered;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a player just exited a sphere.
*/
2015-09-30 02:56:11 +02:00
ESphereExited SphereExited;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the server just finished one cycle
* of it's main loop.
*/
2015-09-30 02:56:11 +02:00
EServerFrame ServerFrame;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the server just started up.
*/
2015-09-30 02:56:11 +02:00
EServerStartup ServerStartup;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the server is about to shut down.
*/
2015-09-30 02:56:11 +02:00
EServerShutdown ServerShutdown;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the server received an internal
* command.
*/
2015-09-30 02:56:11 +02:00
EInternalCommand InternalCommand;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when someone is trying to log into the
2015-11-08 06:20:31 +01:00
* server.
*/
2015-09-30 02:56:11 +02:00
ELoginAttempt LoginAttempt;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when a custom event was just triggered.
*/
2015-09-30 02:56:11 +02:00
ECustomEvent CustomEvent;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when an option just changed in the
* game world.
*/
2015-09-30 02:56:11 +02:00
EWorldOption WorldOption;
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when something was just toggled in the
2015-11-08 06:20:31 +01:00
* game world.
*/
2015-09-30 02:56:11 +02:00
EWorldToggle WorldToggle;
2015-10-02 00:34:28 +02:00
2015-11-08 06:20:31 +01:00
/* --------------------------------------------------------------------------------------------
* A collection of listeners waiting to be notified when the plug-in is about to reload it's
2015-11-08 06:20:31 +01:00
* resources.
*/
2015-10-02 00:34:28 +02:00
EScriptReload ScriptReload;
2015-09-30 02:56:11 +02:00
};
// ------------------------------------------------------------------------------------------------
extern const Core::Pointer _Core;
} // Namespace:: SqMod
#endif // _CORE_HPP_