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:
@ -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
|
||||
{
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user