1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 22:57:12 +02:00

Implemented a simple command system. Added a custom buffer class. Implemented reconnection for IRC sessions. Various other adjustments and additions.

This commit is contained in:
Sandu Liviu Catalin
2015-11-07 12:17:39 +02:00
parent 878a35eb2a
commit 3206d49404
16 changed files with 2792 additions and 305 deletions

View File

@ -25,6 +25,34 @@ CPlayer::CPlayer(const Reference< CPlayer > & o)
/* ... */
}
// ------------------------------------------------------------------------------------------------
SQInt32 CPlayer::GetLevel() const
{
if (VALID_ENTITY(m_ID))
{
return Get(m_ID).Level;
}
else
{
LogWrn(_SC("Attempting to <get player level> using an invalid reference: %d"), m_ID);
}
return SQMOD_UNKNOWN;
}
// ------------------------------------------------------------------------------------------------
void CPlayer::SetLevel(SQInt32 val) const
{
if (VALID_ENTITY(m_ID))
{
Get(m_ID).Level = val;
}
else
{
LogWrn(_SC("Attempting to <set player level> using an invalid reference: %d"), m_ID);
}
}
// ------------------------------------------------------------------------------------------------
bool CPlayer::IsStreamedFor(const Reference < CPlayer > & player) const
{

View File

@ -35,6 +35,16 @@ public:
*/
CPlayer(const Reference< CPlayer > & o);
/* --------------------------------------------------------------------------------------------
* See whether the referenced player instance has administrator privileges.
*/
SQInt32 GetLevel() const;
/* --------------------------------------------------------------------------------------------
* Set whether the referenced player instance has administrator privileges.
*/
void SetLevel(SQInt32 val) const;
/* --------------------------------------------------------------------------------------------
* See if the referenced player instance is streamed for the specified player.
*/