2020-03-22 00:45:04 +01:00
|
|
|
#pragma once
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2021-01-30 07:51:39 +01:00
|
|
|
#include "Core/Common.hpp"
|
|
|
|
#include "Core/Buffer.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Circular locks employed by the player manager.
|
|
|
|
*/
|
|
|
|
enum PlayerCircularLocks
|
|
|
|
{
|
2020-03-22 09:00:31 +01:00
|
|
|
PLAYERCL_EMIT_PLAYER_OPTION = (1u << 0u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_ADMIN = (1u << 1u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_WORLD = (1u << 2u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_TEAM = (1u << 3u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_SKIN = (1u << 4u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_MONEY = (1u << 5u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_SCORE = (1u << 6u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_WANTED_LEVEL = (1u << 7u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_IMMUNITY = (1u << 8u),
|
|
|
|
PLAYERCL_EMIT_PLAYER_ALPHA = (1u << 9u)
|
2016-05-22 05:20:38 +02:00
|
|
|
};
|
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Manages a single player entity.
|
2015-09-30 02:56:11 +02:00
|
|
|
*/
|
2016-02-20 23:25:00 +01:00
|
|
|
class CPlayer
|
2015-09-30 02:56:11 +02:00
|
|
|
{
|
|
|
|
// --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
friend class Core;
|
2021-01-30 07:51:39 +01:00
|
|
|
friend class PlayerInst;
|
2015-10-29 21:11:30 +01:00
|
|
|
|
2016-02-20 23:25:00 +01:00
|
|
|
private:
|
2015-10-29 21:11:30 +01:00
|
|
|
|
2016-02-20 23:25:00 +01:00
|
|
|
// --------------------------------------------------------------------------------------------
|
|
|
|
static SQChar s_Buffer[SQMOD_PLAYER_TMP_BUFFER];
|
2015-10-29 21:11:30 +01:00
|
|
|
|
2015-11-01 00:32:41 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Identifier of the managed entity.
|
2015-11-07 11:17:39 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
int32_t m_ID;
|
2015-11-07 11:17:39 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* User tag associated with this instance.
|
2015-11-07 11:17:39 +01:00
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
String m_Tag;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* User data associated with this instance.
|
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
LightObj m_Data;
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Buffer used to generate client data.
|
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
Buffer m_Buffer;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Prevent events from triggering themselves.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t m_CircularLocks;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2015-11-09 04:54:03 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Base constructor.
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
explicit CPlayer(int32_t id);
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
public:
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
// --------------------------------------------------------------------------------------------
|
|
|
|
typedef String MsgPrefix[SQMOD_PLAYER_MSG_PREFIXES];
|
|
|
|
|
2015-11-09 04:54:03 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Maximum possible number that could represent an identifier for this entity type.
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
static const int32_t Max;
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* The initial size of the allocated memory buffer when starting a new stream.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t mBufferInitSize;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Default color to use in client messages.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
uint32_t mMessageColor;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Default style to use in client announcements.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
int32_t mAnnounceStyle;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Default ammo to give to the managed player when not specifying any.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
int32_t mDefaultAmmo;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set of strings to add before a client message automatically.
|
|
|
|
*/
|
|
|
|
String mMessagePrefix;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set of strings to add before a client message automatically.
|
|
|
|
*/
|
|
|
|
String mMessagePostfix;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set of strings to add before a client announcement automatically.
|
|
|
|
*/
|
|
|
|
String mAnnouncePrefix;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set of strings to add before a client announcement automatically.
|
|
|
|
*/
|
|
|
|
String mAnnouncePostfix;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set of strings to add before a client message automatically.
|
|
|
|
*/
|
|
|
|
MsgPrefix mMessagePrefixes;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Don't include the auto message prefix/postfix in already prefixed messages.
|
|
|
|
*/
|
|
|
|
bool mLimitPrefixPostfixMessage;
|
|
|
|
|
2015-11-09 04:54:03 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Copy constructor. (disabled)
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2016-03-10 04:57:13 +01:00
|
|
|
CPlayer(const CPlayer &) = delete;
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move constructor. (disabled)
|
|
|
|
*/
|
|
|
|
CPlayer(CPlayer &&) = delete;
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Copy assignment operator. (disabled)
|
|
|
|
*/
|
|
|
|
CPlayer & operator = (const CPlayer &) = delete;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Move assignment operator. (disabled)
|
|
|
|
*/
|
|
|
|
CPlayer & operator = (CPlayer &&) = delete;
|
|
|
|
|
2015-11-09 04:54:03 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* See whether this instance manages a valid entity.
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2016-03-10 04:57:13 +01:00
|
|
|
void Validate() const
|
2016-02-20 23:25:00 +01:00
|
|
|
{
|
2016-03-10 04:57:13 +01:00
|
|
|
if (INVALID_ENTITY(m_ID))
|
2016-03-12 21:51:44 +01:00
|
|
|
{
|
2016-03-21 21:37:58 +01:00
|
|
|
STHROWF("Invalid player reference [%s]", m_Tag.c_str());
|
2016-03-12 21:51:44 +01:00
|
|
|
}
|
2016-02-20 23:25:00 +01:00
|
|
|
}
|
2015-11-09 04:54:03 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Used by the script engine to convert an instance of this type to a string.
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const String & ToString() const;
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-08-07 00:54:33 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the associated null entity instance.
|
|
|
|
*/
|
|
|
|
static SQInteger SqGetNull(HSQUIRRELVM vm);
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the associated null entity instance.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD static LightObj & GetNull();
|
2016-08-07 00:54:33 +02:00
|
|
|
|
2015-11-09 04:54:03 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-03-10 04:57:13 +01:00
|
|
|
* Retrieve the identifier of the entity managed by this instance.
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetID() const
|
2016-03-10 04:57:13 +01:00
|
|
|
{
|
|
|
|
return m_ID;
|
|
|
|
}
|
2015-11-09 04:54:03 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Check whether this instance manages a valid entity.
|
2015-11-09 04:54:03 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsActive() const
|
2016-03-10 04:57:13 +01:00
|
|
|
{
|
|
|
|
return VALID_ENTITY(m_ID);
|
|
|
|
}
|
2015-11-07 11:17:39 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Retrieve the associated user tag.
|
2015-10-29 21:11:30 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const String & GetTag() const;
|
2015-10-29 21:11:30 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Modify the associated user tag.
|
2015-10-29 21:11:30 +01:00
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void SetTag(StackStrF & tag);
|
2016-11-16 13:49:04 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the associated user tag.
|
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
CPlayer & ApplyTag(StackStrF & tag);
|
2015-10-29 21:11:30 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Retrieve the associated user data.
|
2015-10-29 21:11:30 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & GetData();
|
2015-10-29 21:11:30 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
* Modify the associated user data.
|
2015-10-29 21:11:30 +01:00
|
|
|
*/
|
2017-02-21 20:24:59 +01:00
|
|
|
void SetData(LightObj & data);
|
2015-10-29 21:11:30 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2017-02-21 20:24:59 +01:00
|
|
|
* Retrieve the events table of this entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & GetEvents() const;
|
2015-10-29 21:11:30 +01:00
|
|
|
|
2016-07-26 23:13:50 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Emit a custom event for the managed entity
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void CustomEvent(int32_t header, LightObj & payload) const;
|
2016-07-26 23:13:50 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* See whether the managed player entity is connected.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsConnected() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* See if the managed player entity is streamed for the specified player.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-05-22 05:20:38 +02:00
|
|
|
bool IsStreamedFor(CPlayer & player) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity has administrator privileges.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetAdmin() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the managed player entity has administrator privileges.
|
|
|
|
*/
|
2016-08-17 14:40:48 +02:00
|
|
|
void SetAdmin(bool toggle);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the ip address of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const SQChar * GetIP() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the unique user identifier of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const SQChar * GetUID() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the unique user identifier version 2 of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const SQChar * GetUID2() const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#if SQMOD_SDK_LEAST(2, 1)
|
2019-06-01 23:39:06 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set player's health to 0 and reset the death reason.
|
|
|
|
*/
|
|
|
|
void Kill() const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#endif
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Kick the managed player entity from the server.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void Kick() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2016-08-17 12:48:29 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Kick the managed player entity from the server.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void KickBecause(int32_t header, LightObj & payload) const;
|
2016-08-17 12:48:29 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Ban the managed player entity from the server.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void Ban() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2016-08-17 12:48:29 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Ban the managed player entity from the server.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void BanBecause(int32_t header, LightObj & payload) const;
|
2016-08-17 12:48:29 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the key of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD uint32_t GetKey() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the nick name of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const SQChar * GetName() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the nick name of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void SetName(StackStrF & name) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the current state of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetState() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the current option value of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetOption(int32_t option_id) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the current option value of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetOption(int32_t option_id, bool toggle);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the current option value of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetOptionEx(int32_t option_id, bool toggle, int32_t header, LightObj & payload);
|
2020-03-20 19:37:17 +01:00
|
|
|
#if SQMOD_SDK_LEAST(2, 1)
|
2019-08-13 17:29:09 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve network statistics related to the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQFloat GetNetworkStatisticsF(int32_t option_id) const;
|
2019-08-13 17:34:09 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve network statistics related to the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQInteger GetNetworkStatisticsI(int32_t option_id) const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#endif
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the world in which the managed player entity exists.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWorld() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the world in which the managed player entity exists.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWorld(int32_t world);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the secondary world of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetSecondaryWorld() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the secondary world of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetSecondaryWorld(int32_t world);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the unique world of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetUniqueWorld() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity is compatible with the specified world.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsWorldCompatible(int32_t world) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the class of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetClass() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the team of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetTeam() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the team of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetTeam(int32_t team);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the skin identifier of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetSkin() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the skin identifier of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetSkin(int32_t skin);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Color3 GetColor() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the color of the managed player entity.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void SetColor(const Color3 & color) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetColorEx(uint8_t r, uint8_t g, uint8_t b) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity is spawned.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsSpawned() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Force the managed player entity to spawn in the game.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void ForceSpawn() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Force the managed player entity to select a class.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void ForceSelect() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity is typing.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsTyping() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the money amount of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetMoney() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the money amount of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetMoney(int32_t amount);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Give a certain amount of money to the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void GiveMoney(int32_t amount);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the score of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetScore() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the score of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetScore(int32_t score);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the wanted level of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWantedLevel() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the wanted level of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWantedLevel(int32_t level);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the connection latency of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetPing() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the frames per second of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQFloat GetFPS() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the current health of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetHealth() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the health of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetHealth(float amount) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the current health of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetArmor() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the health of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetArmor(float amount) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the immunity flags of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetImmunity() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the immunity flags of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetImmunity(int32_t flags);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Vector3 GetPosition() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position of the managed player entity.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void SetPosition(const Vector3 & pos) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionEx(float x, float y, float z) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the speed of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Vector3 GetSpeed() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the speed of the managed player entity.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void SetSpeed(const Vector3 & vel) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the speed of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetSpeedEx(float x, float y, float z) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the speed of the managed player entity.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void AddSpeed(const Vector3 & vel) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the speed of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void AddSpeedEx(float x, float y, float z) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the heading angle of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetHeading() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the heading angle of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetHeading(float angle) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the alpha of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetAlpha() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the alpha of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAlpha(int32_t alpha);
|
2016-06-20 07:08:33 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the alpha of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAlphaEx(int32_t alpha, int32_t fade);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the aim position of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Vector3 GetAimPosition() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the aim direction of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD Vector3 GetAimDirection() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* See whether the managed player entity is burning.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsBurning() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* See whether the managed player entity is crouched.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsCrouched() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the current action of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetAction() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the game keys of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetGameKeys() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Embark the managed player entity into the specified vehicle entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-05-22 05:20:38 +02:00
|
|
|
bool Embark(CVehicle & vehicle) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Embark the managed player entity into the specified vehicle entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
bool EmbarkEx(CVehicle & vehicle, int32_t slot, bool allocate, bool warp) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Disembark the managed player entity from the currently embarked vehicle entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-05-22 05:20:38 +02:00
|
|
|
void Disembark() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the vehicle status of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetVehicleStatus() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the occupied vehicle slot by the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetVehicleSlot() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the vehicle in which the managed player entity is embarked.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & GetVehicle() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the vehicle identifier in which the managed player entity is embarked.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetVehicleID() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the weapon identifier of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWeapon() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the weapon of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWeapon(int32_t wep) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the weapon of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWeaponEx(int32_t wep, int32_t ammo) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Give a weapon of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void GiveWeapon(int32_t wep, int32_t ammo) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the active weapon ammo of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetAmmo() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the weapon slot of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWeaponSlot() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the weapon slot of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWeaponSlot(int32_t slot) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the weapon identifier at the specified slot for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWeaponAtSlot(int32_t slot) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the ammo from the weapon at the specified slot for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetAmmoAtSlot(int32_t slot) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Remove a certain weapon from the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void RemoveWeapon(int32_t wep) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Strip the managed player entity of all weapons.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void StripWeapons() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the camera position of the managed player entity.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void SetCameraPosition(const Vector3 & pos, const Vector3 & aim) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the camera position of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetCameraPositionEx(float xp, float yp, float zp, float xa, float ya, float za) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Restore the camera position of the managed player entity.
|
|
|
|
*/
|
2015-11-01 04:48:01 +01:00
|
|
|
void RestoreCamera() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity has camera locked.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsCameraLocked() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the animation of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAnimation(int32_t anim) const;
|
2016-06-15 05:06:03 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the animation of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAnimationEx(int32_t anim, int32_t group) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the vehicle that the managed player entity is standing on.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & StandingOnVehicle() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the object that the managed player entity is standing on.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & StandingOnObject() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity is away.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsAway() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the player that the managed player entity is spectating.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD LightObj & GetSpectator() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set the managed player entity to spectate the specified player entity.
|
|
|
|
*/
|
2017-08-06 14:14:45 +02:00
|
|
|
void SetSpectator(CPlayer & target) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the identifier of the player that the managed player entity is spectating.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQInteger GetSpectatorID() const;
|
2017-08-06 14:14:45 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set the managed player entity to spectate the specified player entity.
|
|
|
|
*/
|
|
|
|
void SetSpectatorID(SQInteger id) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set the managed player entity to spectate no one.
|
|
|
|
*/
|
2017-08-06 17:24:42 +02:00
|
|
|
void Unspectate() const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#if SQMOD_SDK_LEAST(2, 1)
|
2019-06-01 23:39:06 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the target player will see an objective arrow over a player.
|
|
|
|
*/
|
|
|
|
void SetPlayer3DArrow(CPlayer & target, bool toggle) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the target player sees an objective arrow over a player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetPlayer3DArrow(CPlayer & target) const;
|
2019-06-01 23:39:06 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the target player will see an objective arrow over a player.
|
|
|
|
*/
|
|
|
|
void SetPlayer3DArrowID(SQInteger id, bool toggle) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the target player sees an objective arrow over a player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetPlayer3DArrowID(SQInteger id) const;
|
2019-06-01 23:39:06 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Smoothly pivots the camera angle.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool InterpolateCameraLookAt(const Vector3 & pos, uint32_t ms) const;
|
2019-06-01 23:39:06 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Smoothly pivots the camera angle.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool InterpolateCameraLookAtEx(float x, float y, float z, uint32_t ms) const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#endif
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Redirect the managed player entity to the specified server.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void Redirect(StackStrF & ip, uint32_t port, StackStrF & nick,
|
|
|
|
StackStrF & server_pass, StackStrF & user_pass) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2018-06-28 20:46:06 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Request a list of the modules loaded into the client session.
|
|
|
|
*/
|
|
|
|
void GetModuleList() const;
|
|
|
|
|
2016-06-20 07:27:39 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the authority level of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void PlaySound(int32_t sound_id) const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#if SQMOD_SDK_LEAST(2, 1)
|
2019-06-01 23:39:06 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set how delayed a player's turn handling is when in a vehicle.
|
|
|
|
*/
|
|
|
|
void SetDrunkHandling(SQInteger level) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve how delayed a player's turn handling is when in a vehicle.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQInteger GetDrunkHandling() const;
|
2019-06-01 23:39:06 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set how intense the drunk blur overlay is for a player.
|
|
|
|
*/
|
|
|
|
void SetDrunkVisuals(SQInteger level) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve how intense the drunk blur overlay is for a player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQInteger GetDrunkVisuals() const;
|
2020-03-20 19:37:17 +01:00
|
|
|
#endif
|
2016-06-24 22:37:58 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Create a checkpoint or sphere for this player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
LightObj & CreateCheckpointEx1a(int32_t world, bool sphere, float x, float y, float z, // NOLINT(modernize-use-nodiscard)
|
|
|
|
uint8_t r, uint8_t g, uint8_t b, uint8_t a, float radius) const;
|
2016-06-24 22:37:58 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Create a checkpoint or sphere for this player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
LightObj & CreateCheckpointEx1b(int32_t world, bool sphere, float x, float y, float z, // NOLINT(modernize-use-nodiscard)
|
|
|
|
uint8_t r, uint8_t g, uint8_t b, uint8_t a, float radius,
|
|
|
|
int32_t header, LightObj & payload) const;
|
2016-06-24 22:37:58 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Create a checkpoint or sphere for this player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
LightObj & CreateCheckpoint1a(int32_t world, bool sphere, const Vector3 & pos, // NOLINT(modernize-use-nodiscard)
|
|
|
|
const Color4 & color, float radius) const;
|
2016-06-24 22:37:58 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Create a checkpoint or sphere for this player.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
LightObj & CreateCheckpoint1b(int32_t world, bool sphere, const Vector3 & pos, const Color4 & color, // NOLINT(modernize-use-nodiscard)
|
|
|
|
float radius, int32_t header, LightObj & payload) const;
|
2016-06-24 22:37:58 +02:00
|
|
|
|
2017-06-19 03:09:35 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* See whether the managed player entity collides with user defined areas.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetCollideAreas() const;
|
2017-06-19 03:09:35 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the managed player entity can collide with user defined areas.
|
|
|
|
*/
|
|
|
|
void SetCollideAreas(bool toggle) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether the managed player entity can collide with user defined areas (with last test).
|
|
|
|
*/
|
|
|
|
void SetAreasCollide(bool toggle) const;
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the authority level of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetAuthority() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the authority level of the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetAuthority(int32_t level) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the message prefix at the specified index for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const String & GetMessagePrefix(uint32_t index) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Modify the message prefix at the specified index for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetMessagePrefix(uint32_t index, StackStrF & prefix);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2016-06-08 15:53:16 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the amount of tracked position changes for the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQInteger GetTrackPosition() const;
|
2016-06-08 15:53:16 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-07-14 18:52:14 +02:00
|
|
|
* Modify the amount of tracked position changes for the managed player entity.
|
2016-06-08 15:53:16 +02:00
|
|
|
*/
|
|
|
|
void SetTrackPosition(SQInteger num) const;
|
|
|
|
|
2016-07-14 18:52:14 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the amount of tracked position changes for the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetTrackPositionEx(SQInteger num, int32_t header, const LightObj & payload) const;
|
2016-07-14 18:52:14 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the amount of tracked heading changes for the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQInteger GetTrackHeading() const;
|
2016-07-14 18:52:14 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the amount of tracked heading changes for the managed player entity.
|
|
|
|
*/
|
|
|
|
void SetTrackHeading(SQInteger num) const;
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the last known weapon for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetLastWeapon() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the last known health for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetLastHealth() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the last known armour for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetLastArmour() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the last known heading for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetLastHeading() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the last known position for the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const Vector3 & GetLastPosition() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
2020-05-04 10:58:30 +02:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the distance traveled by the managed player entity while tracking was enabled.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD SQFloat GetDistance() const;
|
2020-05-04 10:58:30 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the distance traveled by the managed player entity.
|
|
|
|
*/
|
|
|
|
void SetDistance(SQFloat distance) const;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Check whether distance tracking is enabled for the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool GetTrackDistance() const;
|
2020-05-04 10:58:30 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Set whether distance tracking is enabled for the managed player entity.
|
|
|
|
*/
|
|
|
|
void SetTrackDistance(bool toggle) const;
|
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Start a new stream with the default size.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-05-22 05:20:38 +02:00
|
|
|
void StartStream();
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Start a new stream with a custom size.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void StartStreamEx(uint32_t size);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the current cursor position of the stream buffer.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetBufferCursor() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the current cursor position of the stream buffer.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetBufferCursor(int32_t pos);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Write a 8bit byte to the stream buffer.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-05-22 05:20:38 +02:00
|
|
|
void StreamByte(SQInteger val);
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Write a 16bit short to the stream buffer.
|
|
|
|
*/
|
|
|
|
void StreamShort(SQInteger val);
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Write a 32bit integer to the stream buffer.
|
|
|
|
*/
|
|
|
|
void StreamInt(SQInteger val);
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Write a 32bit float to the stream buffer.
|
|
|
|
*/
|
|
|
|
void StreamFloat(SQFloat val);
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Write a string to the stream buffer.
|
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void StreamString(StackStrF & val);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Write a raw string to the stream buffer.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void StreamRawString(StackStrF & val);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Send the data in the stream buffer to the client.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-05-22 05:20:38 +02:00
|
|
|
void FlushStream(bool reset);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Retrieve the total capacity of the buffer stream in bytes.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD uint32_t GetBufferCapacity() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
2016-05-22 05:20:38 +02:00
|
|
|
* Send the specified buffer contents to the managed player entity.
|
2016-03-10 04:57:13 +01:00
|
|
|
*/
|
2016-07-07 23:56:54 +02:00
|
|
|
void SendBuffer(const SqBuffer & buffer) const;
|
2015-10-29 21:11:30 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position on the x axis of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetPositionX() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position on the y axis of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetPositionY() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the position on the z axis of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD float GetPositionZ() const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the x axis of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionX(float x) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the y axis of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionY(float y) const;
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Modify the position on the z axis of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetPositionZ(float z) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the red color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetColorR() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the green color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetColorG() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the blue color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetColorB() const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the red color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetColorR(int32_t r) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the green color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetColorG(int32_t g) const;
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the blue color of the managed player entity.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetColorB(int32_t b) const;
|
2015-11-09 02:29:04 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Send a formatted colored message to the managed player entity.
|
|
|
|
*/
|
2015-11-09 02:29:04 +01:00
|
|
|
static SQInteger Msg(HSQUIRRELVM vm);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Send a formatted message with a prefix to the managed player entity.
|
|
|
|
*/
|
2015-11-09 03:32:32 +01:00
|
|
|
static SQInteger MsgP(HSQUIRRELVM vm);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Send a formatted colored message to the managed player entity.
|
|
|
|
*/
|
2015-11-09 02:29:04 +01:00
|
|
|
static SQInteger MsgEx(HSQUIRRELVM vm);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Send a formatted message to the managed player entity.
|
|
|
|
*/
|
2015-11-09 02:29:04 +01:00
|
|
|
static SQInteger Message(HSQUIRRELVM vm);
|
2016-03-10 04:57:13 +01:00
|
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Send a formatted announcement message to the managed player entity.
|
|
|
|
*/
|
2015-11-09 02:29:04 +01:00
|
|
|
static SQInteger Announce(HSQUIRRELVM vm);
|
2015-11-09 04:54:03 +01:00
|
|
|
|
2016-03-10 04:57:13 +01:00
|
|
|
/* --------------------------------------------------------------------------------------------
|
|
|
|
* Send a formatted announcement message to the managed player entity.
|
|
|
|
*/
|
|
|
|
static SQInteger AnnounceEx(HSQUIRRELVM vm);
|
2015-09-30 02:56:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // Namespace:: SqMod
|