2015-09-30 02:56:11 +02:00
|
|
|
#include "Entity.hpp"
|
|
|
|
#include "Register.hpp"
|
|
|
|
#include "Core.hpp"
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2015-10-31 20:28:23 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-09 04:54:03 +01:00
|
|
|
Ent< CPlayer >::MsgPrefix Ent< CPlayer >::Prefixes;
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
SQUint32 Ent< CPlayer >::MessageColor;
|
|
|
|
SQInt32 Ent< CPlayer >::AnnounceStyle;
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
EBlipCreated & GBlipCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->BlipCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ECheckpointCreated & GCheckpointCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->CheckpointCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EKeybindCreated & GKeybindCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->KeybindCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EObjectCreated & GObjectCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->ObjectCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EPickupCreated & GPickupCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->PickupCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EPlayerCreated & GPlayerCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->PlayerCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ESphereCreated & GSphereCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->SphereCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ESpriteCreated & GSpriteCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->SpriteCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ETextdrawCreated & GTextdrawCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->TextdrawCreated;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EVehicleCreated & GVehicleCreated()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->VehicleCreated;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
EBlipDestroyed & GBlipDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->BlipDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ECheckpointDestroyed & GCheckpointDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->CheckpointDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EKeybindDestroyed & GKeybindDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->KeybindDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EObjectDestroyed & GObjectDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->ObjectDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EPickupDestroyed & GPickupDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->PickupDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EPlayerDestroyed & GPlayerDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->PlayerDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ESphereDestroyed & GSphereDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->SphereDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ESpriteDestroyed & GSpriteDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->SpriteDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ETextdrawDestroyed & GTextdrawDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->TextdrawDestroyed;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EVehicleDestroyed & GVehicleDestroyed()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->VehicleDestroyed;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2015-11-01 04:48:01 +01:00
|
|
|
EBlipCustom & GBlipCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->BlipCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ECheckpointCustom & GCheckpointCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->CheckpointCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EKeybindCustom & GKeybindCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->KeybindCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EObjectCustom & GObjectCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->ObjectCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EPickupCustom & GPickupCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->PickupCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EPlayerCustom & GPlayerCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->PlayerCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ESphereCustom & GSphereCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->SphereCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ESpriteCustom & GSpriteCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->SpriteCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
ETextdrawCustom & GTextdrawCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->TextdrawCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-01 04:48:01 +01:00
|
|
|
EVehicleCustom & GVehicleCustom()
|
2015-10-31 20:28:23 +01:00
|
|
|
{
|
|
|
|
return _Core->VehicleCustom;
|
|
|
|
}
|
|
|
|
|
2015-11-08 20:12:05 +01:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
static SQInt32 GetPlayerLevel(SQInt32 id)
|
|
|
|
{
|
|
|
|
return Reference< CPlayer >::Get(id).Level;
|
|
|
|
}
|
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
bool Register_Entity(HSQUIRRELVM vm)
|
|
|
|
{
|
2015-11-08 20:12:05 +01:00
|
|
|
// Attempt to bind the namespace to the root table
|
|
|
|
Sqrat::RootTable(vm).Func(_SC("GetPlayerLevel"), GetPlayerLevel);
|
|
|
|
// Registration succeeded
|
2015-09-30 02:56:11 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|