Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Published MySQL Module
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyldar committed Nov 11, 2016
0 parents commit 776087f
Show file tree
Hide file tree
Showing 64 changed files with 10,290 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Global.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

// Required by module
#include "SDK.h"
#include "ScriptFunctions.h"
#include "MySQL\handler.h"
#include "MySQL\result.h"
#include <string>
#include <stdlib.h>
#include <list>
17 changes: 17 additions & 0 deletions Interfaces/CBanManagerInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CBanManagerInterface.h
*
***************************************************************/

#pragma once

class CBanManagerInterface
{
public:
virtual bool Add( const char * szSerial, const char * szBanner, unsigned long ulBanTime, unsigned long ulUnbanTime, const char * szReason, bool bNewNode ) = 0;
virtual void Remove( const char * szSerial ) = 0;
virtual bool IsSerialBanned( const char * szSerial ) = 0;
};
18 changes: 18 additions & 0 deletions Interfaces/CBlipInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CBlipInterface.h
*
***************************************************************/

#pragma once

class CBlipInterface
{
public:
virtual float GetX( void ) = 0;
virtual float GetY( void ) = 0;
virtual int GetLibrary( void ) = 0;
virtual int GetIcon( void ) = 0;
};
20 changes: 20 additions & 0 deletions Interfaces/CBlipManagerInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CBlipManagerInterface.h
*
***************************************************************/

#pragma once

#include "CBlipInterface.h"

class CBlipManagerInterface
{
public:
virtual EntityId Add( float fX, float fY, int iLibrary, int iIcon ) = 0;
virtual bool Remove( EntityId blipId ) = 0;
virtual bool IsActive( EntityId blipId ) = 0;
virtual CBlipInterface * Get( EntityId blipId ) = 0;
};
22 changes: 22 additions & 0 deletions Interfaces/CCoreInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CCoreInterface.h
*
***************************************************************/

#pragma once

#include "InterfaceCommon.h"

class CCoreInterface
{
public:
virtual CPlayerManagerInterface * GetPlayerManager( void ) = 0;
virtual CBlipManagerInterface * GetBlipManager( void ) = 0;
virtual CVehicleManagerInterface * GetVehicleManager( void ) = 0;
virtual CEventsInterface * GetEventManager( void ) = 0;
virtual CBanManagerInterface * GetBanManager( void ) = 0;
virtual CResourceManagerInterface * GetResourceManager( void ) = 0;
};
45 changes: 45 additions & 0 deletions Interfaces/CEventsInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CEventsInterface.h
*
***************************************************************/

#pragma once

class SquirrelArgumentInterface
{
public:
virtual SQObjectType GetType( void ) const = 0;
bool IsNull( void ) const { return GetType() == OT_NULL; };
virtual int GetInteger( void ) const = 0;
virtual bool GetBool( void ) const = 0;
virtual float GetFloat( void ) const = 0;
virtual const char * GetString( void ) const = 0;

virtual void SetNull( void ) = 0;
virtual void SetInteger( int i ) = 0;
virtual void SetBool( bool b ) = 0;
virtual void SetFloat( float f ) = 0;
virtual void SetString( const char * s ) = 0;
};

class SquirrelArgumentsInterface
{
public:
virtual SquirrelArgumentInterface * Get( unsigned int i ) const = 0;
virtual unsigned int GetSize( void ) const = 0;
virtual SquirrelArgumentInterface * Add( void ) = 0;
virtual void Remove( void ) = 0;
};

typedef void (* EventHandler_t)( SquirrelArgumentsInterface * pArguments, SquirrelArgumentInterface * pReturn );

class CEventsInterface
{
public:
virtual bool AddModuleEvent( const char * szName, EventHandler_t pfnHandler ) = 0;
virtual bool RemoveModuleEvent( const char * szName, EventHandler_t pfnHandler ) = 0;
virtual void CallModuleEvent( const char * szName, SquirrelArgumentsInterface * pArguments, SquirrelArgumentInterface * pReturn ) = 0;
};
25 changes: 25 additions & 0 deletions Interfaces/CNetworkPlayerInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CNetworkPlayerInterface.h
*
***************************************************************/

#pragma once

class CNetworkPlayerInterface
{
public:
virtual void SetNick( const char * szNick ) = 0;
virtual const char * GetNick( void ) = 0;
virtual void SetColour( unsigned int uiColour ) = 0;
virtual unsigned int GetColour( void ) = 0;
virtual const char * GetSerial( void ) = 0;
virtual unsigned short GetPing( void ) = 0;
virtual bool IsDead( void ) = 0;
virtual int GetScore( void ) = 0;
virtual void Kick( void ) = 0;
virtual bool IsInVehicle( void ) = 0;
virtual EntityId GetSeat( void ) = 0;
};
26 changes: 26 additions & 0 deletions Interfaces/CNetworkVehicleInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CNetworkVehicleInterface.h
*
***************************************************************/

#pragma once

class CNetworkVehicleInterface
{
public:
virtual void SetModel( int iModel ) = 0;
virtual int GetModel( void ) = 0;
virtual void SetSpawnPosition( CVector3 vecPosition ) = 0;
virtual void GetSpawnPosition( CVector3 * vecPosition ) = 0;
virtual void SetSpawnDirection( CVector3 vecDirection ) = 0;
virtual void GetSpawnDirection( CVector3 * vecDirection ) = 0;
virtual void SetPosition( CVector3 vecPosition, bool bBroadcast ) = 0;
virtual void GetPosition( CVector3 * vecPosition ) = 0;
virtual void SetDirection( CVector3 vecDirection, bool bBroadcast ) = 0;
virtual void GetDirection( CVector3 * vecDirection ) = 0;
virtual void SetColour( unsigned char ucColour1, unsigned char ucColour2, bool bBroadcast ) = 0;
virtual void GetColour( unsigned char * ucColour1, unsigned char * ucColour2 ) = 0;
};
21 changes: 21 additions & 0 deletions Interfaces/CPlayerManagerInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CPlayerManagerInterface.h
*
***************************************************************/

#pragma once

#include "CNetworkPlayerInterface.h"

class CPlayerManagerInterface
{
public:
virtual bool IsActive( EntityId playerId ) = 0;
virtual CNetworkPlayerInterface * Get( EntityId playerId ) = 0;
virtual EntityId GetCount( void ) = 0;
virtual bool IsNickInUse( const char * szNick ) = 0;
virtual CNetworkPlayerInterface * GetPlayerFromSerial( const char * szSerial ) = 0;
};
17 changes: 17 additions & 0 deletions Interfaces/CResourceManagerInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CResourceManagerInterface.h
*
***************************************************************/

#pragma once

class CResourceManagerInterface
{
public:
virtual bool StartResource( const char * szResource ) = 0;
virtual bool StopResource( const char * szResource ) = 0;
virtual bool IsResourceRunning( const char * szResource ) = 0;
};
17 changes: 17 additions & 0 deletions Interfaces/CSquirrelInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CSquirrelInterface.h
*
***************************************************************/

#pragma once

#include "InterfaceCommon.h"

class CSquirrelInterface
{
public:
virtual SQVM * GetVM( void ) = 0;
};
21 changes: 21 additions & 0 deletions Interfaces/CVehicleManagerInterface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*************************************************************
*
* Solution : Mafia 2 Multiplayer
* Project : Software Development Kit
* File : CVehicleManagerInterface.h
*
***************************************************************/

#pragma once

#include "CNetworkVehicleInterface.h"

class CVehicleManagerInterface
{
public:
virtual EntityId Add( int iModel, CVector3 vecPosition, CVector3 vecDirection ) = 0;
virtual bool Remove( EntityId vehicleId ) = 0;
virtual bool IsActive( EntityId vehicleId ) = 0;
virtual CNetworkVehicleInterface * Get( EntityId vehicleId ) = 0;
virtual EntityId GetCount( void ) = 0;
};
Loading

0 comments on commit 776087f

Please sign in to comment.