diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d336be3..b4236a93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(sampapi VERSION 1.1.0 LANGUAGES CXX) +project(sampapi VERSION 1.2.0 LANGUAGES CXX) add_library(sampapi) add_library(BlastHack::sampapi ALIAS sampapi) @@ -17,4 +17,3 @@ target_include_directories(sampapi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ) -set_property(TARGET sampapi PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") diff --git a/include/sampapi/0.3.7-R1/CCamera.h b/include/sampapi/0.3.7-R1/CCamera.h index a0e4446a..eee4c381 100644 --- a/include/sampapi/0.3.7-R1/CCamera.h +++ b/include/sampapi/0.3.7-R1/CCamera.h @@ -24,9 +24,7 @@ class SAMPAPI_EXPORT CCamera { CMatrix* m_pMatrix; CCamera(); - ~CCamera() { - Detach(); - } + ~CCamera(); void Fade(BOOL bin); void GetMatrix(CMatrix* pMatrix); diff --git a/include/sampapi/0.3.7-R1/CChat.h b/include/sampapi/0.3.7-R1/CChat.h index 2fdd3760..ec246ec7 100644 --- a/include/sampapi/0.3.7-R1/CChat.h +++ b/include/sampapi/0.3.7-R1/CChat.h @@ -1,9 +1,9 @@ /* This is a SAMP (0.3.7-R1) API project file. Developer: LUCHARE - + See more here https://github.com/LUCHARE/SAMP-API - + Copyright (c) 2018 BlastHack Team . All rights reserved. */ @@ -43,7 +43,7 @@ class SAMPAPI_EXPORT CChat { D3DCOLOR m_debugColor; // 0xFFA9C4E4 long m_nWindowBottom; struct SAMPAPI_EXPORT ChatEntry { - __int32 m_timestamp; + int m_timestamp; char m_szPrefix[28]; char m_szText[144]; char unused[64]; @@ -74,9 +74,7 @@ class SAMPAPI_EXPORT CChat { CChat(IDirect3DDevice9* pDevice, CFonts* pFontRenderer, const char* pChatLogPath); ~CChat(); - int GetMode() { - return m_nMode; - } + int GetMode(); void SwitchMode(); void RecalcFontSize(); void OnLostDevice(); diff --git a/include/sampapi/0.3.7-R1/CChatBubble.h b/include/sampapi/0.3.7-R1/CChatBubble.h new file mode 100644 index 00000000..3ee98b54 --- /dev/null +++ b/include/sampapi/0.3.7-R1/CChatBubble.h @@ -0,0 +1,36 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R1 + +class SAMPAPI_EXPORT CChatBubble { +public: + struct SAMPAPI_EXPORT Player { + BOOL m_bExists; + char m_szText[256]; + int m_creationTick; + int m_lifeSpan; + D3DCOLOR m_color; + float m_fDrawDistance; + int m_nMaxLineLength; + } m_player[1004]; + + CChatBubble(); + + void Add(ID nPlayer, const char* szText, D3DCOLOR color, float fDrawDistance, int lifeSpan); + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CChatBubble*& RefChatBubble(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CGame.h b/include/sampapi/0.3.7-R1/CGame.h index 5041282f..6aac7093 100644 --- a/include/sampapi/0.3.7-R1/CGame.h +++ b/include/sampapi/0.3.7-R1/CGame.h @@ -60,7 +60,7 @@ class SAMPAPI_EXPORT CGame { bool m_aKeepLoadedVehicleModels[212]; static SAMPAPI_EXPORT SAMPAPI_VAR char*& RefGameTextMessage(); // [256], temp buffer - static SAMPAPI_EXPORT SAMPAPI_VAR bool* ArrayUsedPlayerSlots(); // [SAMP_MAX_PLAYER_PED_SLOTS] + static SAMPAPI_EXPORT SAMPAPI_VAR BOOL* ArrayUsedPlayerSlots(); // [SAMP_MAX_PLAYER_PED_SLOTS] CGame(); diff --git a/include/sampapi/0.3.7-R1/CHelpDialog.h b/include/sampapi/0.3.7-R1/CHelpDialog.h new file mode 100644 index 00000000..dae5506a --- /dev/null +++ b/include/sampapi/0.3.7-R1/CHelpDialog.h @@ -0,0 +1,27 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R1 + +class SAMPAPI_EXPORT CHelpDialog { +public: + IDirect3DDevice9* m_pDevice; + + CHelpDialog(IDirect3DDevice9* pDevice = SAMPAPI_UNUSED); + + void Show(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CHelpDialog*& RefHelpDialog(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CLocalPlayer.h b/include/sampapi/0.3.7-R1/CLocalPlayer.h index 485c7b6d..fb510f21 100644 --- a/include/sampapi/0.3.7-R1/CLocalPlayer.h +++ b/include/sampapi/0.3.7-R1/CLocalPlayer.h @@ -18,10 +18,10 @@ SAMPAPI_BEGIN_PACKED_V037R1 enum SpectatingMode : unsigned char { - SPEC_MODE_VEHICLE = 3, - SPEC_MODE_PLAYER = 4, - SPEC_MODE_FIXED = 15, - SPEC_MODE_SIDE = 14 + SPECTATING_MODE_VEHICLE = 3, + SPECTATING_MODE_PLAYER = 4, + SPECTATING_MODE_FIXED = 15, + SPECTATING_MODE_SIDE = 14 }; enum SpectatingType : unsigned char { diff --git a/include/sampapi/0.3.7-R1/CMakeLists.txt b/include/sampapi/0.3.7-R1/CMakeLists.txt index 42114717..8a384b67 100644 --- a/include/sampapi/0.3.7-R1/CMakeLists.txt +++ b/include/sampapi/0.3.7-R1/CMakeLists.txt @@ -55,4 +55,9 @@ target_sources(sampapi SpecialAction.h Synchronization.h VehicleSelection.h + CChatBubble.h + CHelpDialog.h + CObjectMaterialText.h + CSrvNetStats.h + CObjectEdit.h ) diff --git a/include/sampapi/0.3.7-R1/CNetGame.h b/include/sampapi/0.3.7-R1/CNetGame.h index 14bbb1d0..55df5c98 100644 --- a/include/sampapi/0.3.7-R1/CNetGame.h +++ b/include/sampapi/0.3.7-R1/CNetGame.h @@ -58,9 +58,9 @@ class SAMPAPI_EXPORT CNetGame { struct SAMPAPI_EXPORT Pools { CActorPool* m_pActor; CObjectPool* m_pObject; - CGangZonePool* m_pGangzone; + CGangZonePool* m_pGangZone; CLabelPool* m_pLabel; - CTextDrawPool* m_pTextdraw; + CTextDrawPool* m_pTextDraw; CMenuPool* m_pMenu; CPlayerPool* m_pPlayer; CVehiclePool* m_pVehicle; @@ -158,23 +158,13 @@ class SAMPAPI_EXPORT CNetGame { void Process(); void ProcessGameStuff(); CPlayerPool* GetPlayerPool(); - CObjectPool* GetObjectPool() { - return m_pPools->m_pObject; - } - CActorPool* GetActorPool() { - return m_pPools->m_pActor; - } - int GetState() { - return m_nGameState; - } - BOOL LanMode() { - return m_bLanMode; - } + CObjectPool* GetObjectPool(); + CActorPool* GetActorPool(); + int GetState(); + BOOL LanMode(); CVehiclePool* GetVehiclePool(); - RakClientInterface* GetRakClient() { - return m_pRakClient; - } - __int64 GetCounter(); + RakClientInterface* GetRakClient(); + __int64 GetCounter(); }; SAMPAPI_EXPORT SAMPAPI_VAR CNetGame*& RefNetGame(); diff --git a/include/sampapi/0.3.7-R1/CObject.h b/include/sampapi/0.3.7-R1/CObject.h index e30091a6..38e8c435 100644 --- a/include/sampapi/0.3.7-R1/CObject.h +++ b/include/sampapi/0.3.7-R1/CObject.h @@ -38,7 +38,7 @@ class SAMPAPI_EXPORT CObject : public CEntity { ID m_nAttachedToObject; CVector m_attachOffset; CVector m_attachRotation; - char field_1; + bool m_bSyncRotation; CMatrix m_targetMatrix; char pad_4[148]; char m_bMoving; diff --git a/include/sampapi/0.3.7-R1/CObjectEdit.h b/include/sampapi/0.3.7-R1/CObjectEdit.h new file mode 100644 index 00000000..f09bcf88 --- /dev/null +++ b/include/sampapi/0.3.7-R1/CObjectEdit.h @@ -0,0 +1,101 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developers: LUCHARE , kin4stat + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/CRect.h" +#include "sampapi/CPoint.h" + +SAMPAPI_BEGIN_PACKED_V037R1 + +enum ObjectEditType { + OBJECT_EDIT_TYPE_NONE = 0x0, + OBJECT_EDIT_TYPE_ATTACHEDOBJECT = 0x2, + OBJECT_EDIT_TYPE_OBJECT = 0x1, +}; + +enum ObjectEditMode { + OBJECT_EDIT_MODE_POSITION = 0x0, + OBJECT_EDIT_MODE_ROTATION = 0x1, + OBJECT_EDIT_MODE_SCALE = 0x2, +}; + +enum ObjectEditProcessType { + OBJECT_EDIT_PROCESS_TYPE_XAXIS = 0x0, + OBJECT_EDIT_PROCESS_TYPE_YAXIS = 0x1, + OBJECT_EDIT_PROCESS_TYPE_ZAXIS = 0x2, + OBJECT_EDIT_PROCESS_TYPE_SETPOSITION = 0x3, + OBJECT_EDIT_PROCESS_TYPE_SETROTATION = 0x4, + OBJECT_EDIT_PROCESS_TYPE_SETSCALE = 0x5, + OBJECT_EDIT_PROCESS_TYPE_SAVE = 0xA, +}; + +class CObjectEdit { +public: + CPoint m_CharMaxSize; + CRect m_xAxisButtonRect; + CRect m_yAxisButtonRect; + CRect m_zAxisButtonRect; + CRect m_PositionButtonRect; + CRect m_RotationButtonRect; + CRect m_ScaleButtonRect; + CRect m_SaveButtonRect; + int m_nEditType; + int m_nEditMode; + BOOL m_bEnabled; + BOOL m_bRenderedThisFrame; + ID m_nEditObjectId; + unsigned int m_nAttachedObjectIndex; + BOOL m_bIsPlayerObject; + CVector m_vRotation; + unsigned int m_nLastSentNotificationTick; + bool m_bRenderScaleButton; + bool m_bEditingRightNow; + bool m_bTopXOfObjectIsOnLeftOfScreen; + bool m_bTopYOfObjectIsOnLeftOfScreen; + bool m_bTopZOfObjectIsOnLeftOfScreen; + CPoint m_EditStartPos; + CPoint m_CursorPosInGame; + BOOL m_bObjectXSizeYCoordDiffMoreThanX; + BOOL m_bObjectYSizeYCoordDiffMoreThanX; + BOOL m_bObjectZSizeYCoordDiffMoreThanX; + CMatrix m_entityMatrix; + IDirect3DDevice9* m_pDevice; + ID3DXLine* m_pLine; + ID3DXFont* m_pIconFontSmall; + ID3DXFont* m_pIconFontBig; + int m_nProcessType; + + CObjectEdit(IDirect3DDevice9* RefDevice); + float WorldToScreen(CVector* in, float (&out)[2]); + float WorldToScreen(CVector* in, float*); + int RenderAxes(CMatrix* a2, float linesize); + const char* GetRenderChar(BOOL for_big_font); + void TryChangeProcessType(); + void SetEditMode(ObjectEditMode mode); + void ResetMousePos(); + void EnterEditObject(ID object_id, BOOL player_object); + void SendEditEndNotification(int response); + void SendAttachedEditEndNotification(int response); + void Disable(BOOL result); + BOOL RenderControlsForObject(CMatrix* object_matrix, float linesize); + void ApplyChanges(ObjectEditProcessType type, float diff); + void ProcessMouseMove(); + BOOL MsgProc(int uMsg, int wParam, int lParam); + void Render(); + + static const char* GetMaxSizeChar(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectEdit*& RefObjectEdit(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CObjectMaterialText.h b/include/sampapi/0.3.7-R1/CObjectMaterialText.h new file mode 100644 index 00000000..a60a2506 --- /dev/null +++ b/include/sampapi/0.3.7-R1/CObjectMaterialText.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R1 + +class SAMPAPI_EXPORT CObjectMaterialText { +public: + IDirect3DDevice9* m_pDevice; + ID3DXSprite* m_pSprite; + ID3DXSprite* m_pSprite_0; // maybe unused + + CObjectMaterialText(IDirect3DDevice9* pDevice); + ~CObjectMaterialText(); + + void OnResetDevice(); + void OnLostDevice(); + IDirect3DTexture9* Create(const char* szText, const char* szFont, char nFontSize, int nBgSizeX, int nBgSizeY, D3DCOLOR fontColor, D3DCOLOR bgColor, bool bBold, char align); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectMaterialText*& RefObjectMaterialTextManager(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CObjectPool.h b/include/sampapi/0.3.7-R1/CObjectPool.h index c433d40e..885a7ad3 100644 --- a/include/sampapi/0.3.7-R1/CObjectPool.h +++ b/include/sampapi/0.3.7-R1/CObjectPool.h @@ -40,11 +40,7 @@ class SAMPAPI_EXPORT CObjectPool { void ShutdownMaterials(); void Draw(); void DrawLast(); - CObject* Get(ID nId) { - if (m_bNotEmpty[nId]) - return m_pObject[nId]; - return nullptr; - } + CObject* Get(ID nId); }; SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CPickupPool.h b/include/sampapi/0.3.7-R1/CPickupPool.h index 0097786e..e14be71c 100644 --- a/include/sampapi/0.3.7-R1/CPickupPool.h +++ b/include/sampapi/0.3.7-R1/CPickupPool.h @@ -39,7 +39,7 @@ class SAMPAPI_EXPORT CPickupPool { CPickupPool(); ~CPickupPool(); - void Create(Pickup* pData, ID nId); + void Create(Pickup* pData, int nId); void CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner); void Delete(int nId); void DeleteWeapon(ID nExOwner); diff --git a/include/sampapi/0.3.7-R1/CPlayerPool.h b/include/sampapi/0.3.7-R1/CPlayerPool.h index 73060d78..43ad0abf 100644 --- a/include/sampapi/0.3.7-R1/CPlayerPool.h +++ b/include/sampapi/0.3.7-R1/CPlayerPool.h @@ -60,19 +60,15 @@ class SAMPAPI_EXPORT CPlayerPool { int GetScore(ID nId); int GetPing(ID nId); const char* GetName(ID nId); - int GetLocalPlayerPing() { - return m_localInfo.m_nPing; - } - int GetLocalPlayerScore() { - return m_localInfo.m_nScore; - } - int GetCount(BOOL bIncludeNPC = 0); - CLocalPlayer* GetLocalPlayer(); - CObject* FindAccessory(::CObject* pGameObject); - CPlayerInfo* GetAt(ID nId); - BOOL IsNPC(ID nId); - void SetPing(ID nId, int nValue); - void SetScore(ID nId, int nValue); + int GetLocalPlayerPing(); + int GetLocalPlayerScore(); + int GetCount(BOOL bIncludeNPC = 0); + CLocalPlayer* GetLocalPlayer(); + CObject* FindAccessory(::CObject* pGameObject); + CPlayerInfo* GetAt(ID nId); + BOOL IsNPC(ID nId); + void SetPing(ID nId, int nValue); + void SetScore(ID nId, int nValue); }; SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CSrvNetStats.h b/include/sampapi/0.3.7-R1/CSrvNetStats.h new file mode 100644 index 00000000..53450e71 --- /dev/null +++ b/include/sampapi/0.3.7-R1/CSrvNetStats.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R1 + +class SAMPAPI_EXPORT CSrvNetStats { +public: + unsigned long m_dwLastTotalBytesSent; + unsigned long m_dwLastTotalBytesRecv; + unsigned long m_dwLastUpdateTick; + unsigned long m_dwBPSUpload; + unsigned long m_dwBPSDownload; + IDirect3DDevice9* m_pDevice; + + CSrvNetStats(IDirect3DDevice9* pDevice); + + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CSrvNetStats*& RefServerNetStatistics(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CTextDrawSelection.h b/include/sampapi/0.3.7-R1/CTextDrawSelection.h index f23f6ff5..689175d8 100644 --- a/include/sampapi/0.3.7-R1/CTextDrawSelection.h +++ b/include/sampapi/0.3.7-R1/CTextDrawSelection.h @@ -39,6 +39,6 @@ class SAMPAPI_EXPORT CTextDrawSelection { BOOL MsgProc(int uMsg, int wParam, int lParam); }; -SAMPAPI_EXPORT SAMPAPI_VAR CTextDrawSelection*& RefTextdrawSelection(); +SAMPAPI_EXPORT SAMPAPI_VAR CTextDrawSelection*& RefTextDrawSelection(); SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R1/CVehicle.h b/include/sampapi/0.3.7-R1/CVehicle.h index 6bc8475f..4c802b8a 100644 --- a/include/sampapi/0.3.7-R1/CVehicle.h +++ b/include/sampapi/0.3.7-R1/CVehicle.h @@ -19,30 +19,31 @@ SAMPAPI_BEGIN_PACKED_V037R1 class SAMPAPI_EXPORT CVehicle : public CEntity { public: - enum { LICENSE_PLATE_TEXT_LEN = 32 }; + enum { MAX_LICENSE_PLATE_TEXT = 32 }; // void **m_lpVtbl = 0xDB1AC; CVehicle* m_pTrailer; ::CVehicle* m_pGameVehicle; - char pad_50[8]; - BOOL m_bIsInvulnerable; + BOOL m_bEngineOn; BOOL m_bIsLightsOn; + BOOL m_bIsInvulnerable; + int pad_5c; BOOL m_bIsLocked; bool m_bIsObjective; BOOL m_bObjectiveBlipCreated; TICK m_timeSinceLastDriven; BOOL m_bHasBeenDriven; - char pad_71[4]; + int pad_71; BOOL m_bEngineState; - NUMBER m_nPrimaryColor; - NUMBER m_nSecondaryColor; + unsigned char m_nPrimaryColor; + unsigned char m_nSecondaryColor; BOOL m_bNeedsToUpdateColor; BOOL m_bUnoccupiedSync; BOOL m_bRemoteUnocSync; BOOL m_bKeepModelLoaded; - int m_bHasSiren; + BOOL m_bHasSiren; IDirect3DTexture9* m_pLicensePlate; - char m_szLicensePlateText[LICENSE_PLATE_TEXT_LEN + 1]; + char m_szLicensePlateText[MAX_LICENSE_PLATE_TEXT + 1]; GTAREF m_marker; CVehicle(int nModel, CVector position, float fRotation, BOOL bKeepModelLoaded, BOOL bHasSiren); diff --git a/include/sampapi/0.3.7-R1/InputHandler.h b/include/sampapi/0.3.7-R1/InputHandler.h index b51cfe54..6ba735d9 100644 --- a/include/sampapi/0.3.7-R1/InputHandler.h +++ b/include/sampapi/0.3.7-R1/InputHandler.h @@ -16,7 +16,10 @@ SAMPAPI_BEGIN_V037R1 void SwitchWindowedMode(); namespace InputHandler { + enum { MAX_ANTICHEAT_DETECT_COUNT = 0xA }; + SAMPAPI_EXPORT SAMPAPI_VAR void*& RefPrevWindowProc(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned int& RefAntiCheatDetectCount(); SAMPAPI_EXPORT int WindowProc(unsigned int uMsg, unsigned int wParam, long lParam); SAMPAPI_EXPORT BOOL KeyPressHandler(unsigned int nKey); diff --git a/include/sampapi/0.3.7-R1/Scripting.h b/include/sampapi/0.3.7-R1/Scripting.h index 38bb22db..afeabcbe 100644 --- a/include/sampapi/0.3.7-R1/Scripting.h +++ b/include/sampapi/0.3.7-R1/Scripting.h @@ -27,7 +27,7 @@ namespace Scripting { SAMPAPI_EXPORT SAMPAPI_VAR unsigned char* ArrayBuffer(); // [256] SAMPAPI_EXPORT SAMPAPI_VAR unsigned long& RefLastUsedOpcode(); SAMPAPI_EXPORT SAMPAPI_VAR unsigned long** ArrayThreadLocals(); // [18] - SAMPAPI_EXPORT SAMPAPI_VAR unsigned int& RefLocalDebug(); + SAMPAPI_EXPORT SAMPAPI_VAR BOOL& RefLocalDebug(); SAMPAPI_EXPORT SAMPAPI_VAR ProcessOneCommandFn& RefProcessOneCommand(); SAMPAPI_EXPORT void Initialize(); diff --git a/include/sampapi/0.3.7-R3-1/CCamera.h b/include/sampapi/0.3.7-R3-1/CCamera.h index 2b862138..e70f60b2 100644 --- a/include/sampapi/0.3.7-R3-1/CCamera.h +++ b/include/sampapi/0.3.7-R3-1/CCamera.h @@ -20,7 +20,7 @@ SAMPAPI_BEGIN_PACKED_V037R3_1 class SAMPAPI_EXPORT CCamera { public: - CEntity* m_pOwner; + CEntity* m_pAttachedTo; CMatrix* m_pMatrix; CCamera(); diff --git a/include/sampapi/0.3.7-R3-1/CChat.h b/include/sampapi/0.3.7-R3-1/CChat.h index 0cc1d980..7c573cb1 100644 --- a/include/sampapi/0.3.7-R3-1/CChat.h +++ b/include/sampapi/0.3.7-R3-1/CChat.h @@ -1,9 +1,9 @@ /* This is a SAMP (0.3.7-R3) API project file. Developer: LUCHARE - + See more here https://github.com/LUCHARE/SAMP-API - + Copyright (c) 2018 BlastHack Team . All rights reserved. */ @@ -45,7 +45,7 @@ class SAMPAPI_EXPORT CChat { long m_nWindowBottom; struct SAMPAPI_EXPORT ChatEntry { - __int32 m_timestamp; + int m_timestamp; char m_szPrefix[28]; char m_szText[144]; char unused[64]; diff --git a/include/sampapi/0.3.7-R3-1/CGame.h b/include/sampapi/0.3.7-R3-1/CGame.h index 8573f4dc..0a81cecd 100644 --- a/include/sampapi/0.3.7-R3-1/CGame.h +++ b/include/sampapi/0.3.7-R3-1/CGame.h @@ -62,7 +62,7 @@ class SAMPAPI_EXPORT CGame { bool m_aKeepLoadedVehicleModels[212]; static SAMPAPI_EXPORT SAMPAPI_VAR char*& RefGameTextMessage(); // [256], temp buffer - static SAMPAPI_EXPORT SAMPAPI_VAR bool* ArrayUsedPlayerSlots(); // [SAMP_MAX_PLAYER_PED_SLOTS] + static SAMPAPI_EXPORT SAMPAPI_VAR BOOL* ArrayUsedPlayerSlots(); // [SAMP_MAX_PLAYER_PED_SLOTS] CGame(); diff --git a/include/sampapi/0.3.7-R3-1/CInput.h b/include/sampapi/0.3.7-R3-1/CInput.h index 05d5bd24..9a402f43 100644 --- a/include/sampapi/0.3.7-R3-1/CInput.h +++ b/include/sampapi/0.3.7-R3-1/CInput.h @@ -34,7 +34,7 @@ class SAMPAPI_EXPORT CInput { char m_szCurrentBuffer[129]; int m_nCurrentRecall; int m_nTotalRecall; - CMDPROC m_defaultCommand; + CMDPROC m_pDefaultCommand; CInput(IDirect3DDevice9* pDevice); diff --git a/include/sampapi/0.3.7-R3-1/CLocalPlayer.h b/include/sampapi/0.3.7-R3-1/CLocalPlayer.h index 5d675d92..45a4d52a 100644 --- a/include/sampapi/0.3.7-R3-1/CLocalPlayer.h +++ b/include/sampapi/0.3.7-R3-1/CLocalPlayer.h @@ -25,9 +25,9 @@ enum SpectatingMode { }; enum SpectatingType { - SPECTATING_TYPE_NONE, - SPECTATING_TYPE_PLAYER, - SPECTATING_TYPE_Vehicle + SPEC_TYPE_NONE, + SPEC_TYPE_PLAYER, + SPEC_TYPE_VEHICLE }; enum SurfingMode { @@ -146,6 +146,11 @@ class SAMPAPI_EXPORT CLocalPlayer { bool m_bWheel; } m_damage; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefIncarSendrate(); // = NETMODE_INCAR_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefOnfootSendrate(); // = NETMODE_ONFOOT_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefFiringSendrate(); // = NETMODE_FIRING_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefSendMultiplier(); // = NETMODE_SEND_MULTIPLIER; + CLocalPlayer(); CPed* GetPed(); diff --git a/include/sampapi/0.3.7-R3-1/CMakeLists.txt b/include/sampapi/0.3.7-R3-1/CMakeLists.txt index aa52c6d9..a620acb4 100644 --- a/include/sampapi/0.3.7-R3-1/CMakeLists.txt +++ b/include/sampapi/0.3.7-R3-1/CMakeLists.txt @@ -56,4 +56,7 @@ target_sources(sampapi Settings.h SpecialAction.h Synchronization.h + InputHandler.h + CObjectEdit.h + RPCHandlers.h ) diff --git a/include/sampapi/0.3.7-R3-1/CObject.h b/include/sampapi/0.3.7-R3-1/CObject.h index 51f318a9..a1eac50b 100644 --- a/include/sampapi/0.3.7-R3-1/CObject.h +++ b/include/sampapi/0.3.7-R3-1/CObject.h @@ -40,7 +40,7 @@ class SAMPAPI_EXPORT CObject : public CEntity { ID m_nAttachedToObject; CVector m_attachOffset; CVector m_attachRotation; - char field_1; + bool m_bSyncRotation; CMatrix m_targetMatrix; char pad_4[148]; char m_bMoving; diff --git a/include/sampapi/0.3.7-R3-1/CObjectEdit.h b/include/sampapi/0.3.7-R3-1/CObjectEdit.h new file mode 100644 index 00000000..03188b2e --- /dev/null +++ b/include/sampapi/0.3.7-R3-1/CObjectEdit.h @@ -0,0 +1,100 @@ +/* + This is a SAMP (0.3.7-R3) API project file. + Developers: LUCHARE , kin4stat + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/CRect.h" +#include "sampapi/CPoint.h" + +SAMPAPI_BEGIN_PACKED_V037R3_1 + +enum ObjectEditType { + OBJECT_EDIT_TYPE_NONE = 0x0, + OBJECT_EDIT_TYPE_ATTACHEDOBJECT = 0x2, + OBJECT_EDIT_TYPE_OBJECT = 0x1, +}; + +enum ObjectEditMode { + OBJECT_EDIT_MODE_POSITION = 0x0, + OBJECT_EDIT_MODE_ROTATION = 0x1, + OBJECT_EDIT_MODE_SCALE = 0x2, +}; + +enum ObjectEditProcessType { + OBJECT_EDIT_PROCESS_TYPE_XAXIS = 0x0, + OBJECT_EDIT_PROCESS_TYPE_YAXIS = 0x1, + OBJECT_EDIT_PROCESS_TYPE_ZAXIS = 0x2, + OBJECT_EDIT_PROCESS_TYPE_SETPOSITION = 0x3, + OBJECT_EDIT_PROCESS_TYPE_SETROTATION = 0x4, + OBJECT_EDIT_PROCESS_TYPE_SETSCALE = 0x5, + OBJECT_EDIT_PROCESS_TYPE_SAVE = 0xA, +}; + +class CObjectEdit { +public: + CPoint m_CharMaxSize; + CRect m_xAxisButtonRect; + CRect m_yAxisButtonRect; + CRect m_zAxisButtonRect; + CRect m_PositionButtonRect; + CRect m_RotationButtonRect; + CRect m_ScaleButtonRect; + CRect m_SaveButtonRect; + int m_nEditType; + int m_nEditMode; + BOOL m_bEnabled; + BOOL m_bRenderedThisFrame; + ID m_nEditObjectId; + unsigned int m_nAttachedObjectIndex; + BOOL m_bIsPlayerObject; + CVector m_vRotation; + unsigned int m_nLastSentNotificationTick; + bool m_bRenderScaleButton; + bool m_bEditingRightNow; + bool m_bTopXOfObjectIsOnLeftOfScreen; + bool m_bTopYOfObjectIsOnLeftOfScreen; + bool m_bTopZOfObjectIsOnLeftOfScreen; + CPoint m_EditStartPos; + CPoint m_CursorPosInGame; + BOOL m_bObjectXSizeYCoordDiffMoreThanX; + BOOL m_bObjectYSizeYCoordDiffMoreThanX; + BOOL m_bObjectZSizeYCoordDiffMoreThanX; + CMatrix m_entityMatrix; + IDirect3DDevice9* m_pDevice; + ID3DXLine* m_pLine; + ID3DXFont* m_pIconFontSmall; + ID3DXFont* m_pIconFontBig; + int m_nProcessType; + + CObjectEdit(IDirect3DDevice9* RefDevice); + float WorldToScreen(CVector* in, float*); + int RenderAxes(CMatrix* a2, float linesize); + const char* GetRenderChar(BOOL for_big_font); + void TryChangeProcessType(); + void SetEditMode(ObjectEditMode mode); + void ResetMousePos(); + void EnterEditObject(ID object_id, BOOL player_object); + void SendEditEndNotification(int response); + void SendAttachedEditEndNotification(int response); + void Disable(BOOL result); + BOOL RenderControlsForObject(CMatrix* object_matrix, float linesize); + void ApplyChanges(ObjectEditProcessType type, float diff); + void ProcessMouseMove(); + BOOL MsgProc(int uMsg, int wParam, int lParam); + void Render(); + + static const char* GetMaxSizeChar(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectEdit*& RefObjectEdit(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R3-1/CPickupPool.h b/include/sampapi/0.3.7-R3-1/CPickupPool.h index 353dc401..dce18d90 100644 --- a/include/sampapi/0.3.7-R3-1/CPickupPool.h +++ b/include/sampapi/0.3.7-R3-1/CPickupPool.h @@ -39,7 +39,7 @@ class SAMPAPI_EXPORT CPickupPool { CPickupPool(); ~CPickupPool(); - void Create(Pickup* pData, ID nId); + void Create(Pickup* pData, int nId); void CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner); void Delete(int nId); void DeleteWeapon(ID nExOwner); diff --git a/include/sampapi/0.3.7-R3-1/CVehicle.h b/include/sampapi/0.3.7-R3-1/CVehicle.h index 1b2b4b54..fb3120eb 100644 --- a/include/sampapi/0.3.7-R3-1/CVehicle.h +++ b/include/sampapi/0.3.7-R3-1/CVehicle.h @@ -24,15 +24,16 @@ class SAMPAPI_EXPORT CVehicle : public CEntity { // void **m_lpVtbl = 0xED6E8; CVehicle* m_pTrailer; ::CVehicle* m_pGameVehicle; - char pad_50[8]; - BOOL m_bIsInvulnerable; + BOOL m_bEngineOn; BOOL m_bIsLightsOn; + BOOL m_bIsInvulnerable; + int pad_5c; BOOL m_bIsLocked; bool m_bIsObjective; BOOL m_bObjectiveBlipCreated; TICK m_timeSinceLastDriven; BOOL m_bHasBeenDriven; - char pad_71[4]; + int pad_71; BOOL m_bEngineState; unsigned char m_nPrimaryColor; unsigned char m_nSecondaryColor; @@ -40,7 +41,7 @@ class SAMPAPI_EXPORT CVehicle : public CEntity { BOOL m_bUnoccupiedSync; BOOL m_bRemoteUnocSync; BOOL m_bKeepModelLoaded; - int m_bHasSiren; + BOOL m_bHasSiren; IDirect3DTexture9* m_pLicensePlate; char m_szLicensePlateText[MAX_LICENSE_PLATE_TEXT + 1]; GTAREF m_marker; diff --git a/include/sampapi/0.3.7-R3-1/InputHandler.h b/include/sampapi/0.3.7-R3-1/InputHandler.h new file mode 100644 index 00000000..67e4687c --- /dev/null +++ b/include/sampapi/0.3.7-R3-1/InputHandler.h @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R3) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V037R3_1 + +void SwitchWindowedMode(); + +namespace InputHandler { + enum { MAX_ANTICHEAT_DETECT_COUNT = 0xA }; + + SAMPAPI_EXPORT SAMPAPI_VAR void*& RefPrevWindowProc(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned int& RefAntiCheatDetectCount(); + + SAMPAPI_EXPORT int WindowProc(unsigned int uMsg, unsigned int wParam, long lParam); + SAMPAPI_EXPORT BOOL KeyPressHandler(unsigned int nKey); + SAMPAPI_EXPORT BOOL CharInputHandler(unsigned int nChar); + SAMPAPI_EXPORT BOOL Initialize(); +} // namespace InputHandler + +SAMPAPI_END diff --git a/include/sampapi/0.3.7-R3-1/RPCHandlers.h b/include/sampapi/0.3.7-R3-1/RPCHandlers.h new file mode 100644 index 00000000..e9f23343 --- /dev/null +++ b/include/sampapi/0.3.7-R3-1/RPCHandlers.h @@ -0,0 +1,159 @@ +/* + This is a SAMP (0.3.7-R3) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +struct RPCParameters; + +SAMPAPI_BEGIN_PACKED_V037R3_1 + +namespace RPCHandlers { + // RegisterRPCs1 + + void ScrSetPlayerSkillLevel(RPCParameters* pParams); + void ScrCreate3DTextLabel(RPCParameters* pParams); + void ScrDestroy3DTextLabel(RPCParameters* pParams); + void ScrChatBubble(RPCParameters* pParams); + void ScrShowDialog(RPCParameters* pParams); + void ScrSetCheckpoint(RPCParameters* pParams); + void ScrDisableCheckpoint(RPCParameters* pParams); + void ScrSetRaceCheckpoint(RPCParameters* pParams); + void ScrDisableRaceCheckpoint(RPCParameters* pParams); + void UpdateScoresPingsIps(RPCParameters* pParams); + void SrvNetStats(RPCParameters* pParams); + void ScrGamemodeRestart(RPCParameters* pParams); + void ConnectionRejected(RPCParameters* pParams); + void ScrClientMessage(RPCParameters* pParams); + void ScrSetWorldTime(RPCParameters* pParams); + void ScrCreatePickup(RPCParameters* pParams); + void ScrDestroyPickup(RPCParameters* pParams); + void ScrDestroyWeaponPickup(RPCParameters* pParams); + void ScmEvent(RPCParameters* pParams); + void ScrSetWeather(RPCParameters* pParams); + void ScrSetPlayerTime(RPCParameters* pParams); + void ScrToggleClock(RPCParameters* pParams); + void ScrSetIngameTimer(RPCParameters* pParams); + void ScrWorldPlayerAdd(RPCParameters* pParams); + void ScrWorldPlayerDeath(RPCParameters* pParams); + void ScrWorldPlayerRemove(RPCParameters* pParams); + void ScrWorldVehicleAdd(RPCParameters* pParams); + void ScrWorldVehicleRemove(RPCParameters* pParams); + void DamageVehicle(RPCParameters* pParams); + void ScrSetVehicleParamsEx(RPCParameters* pParams); + void EnterVehicle(RPCParameters* pParams); + void ExitVehicle(RPCParameters* pParams); + void ScrServerJoin(RPCParameters* pParams); + void ScrServerQuit(RPCParameters* pParams); + void ScrInitGame(RPCParameters* pParams); + void Chat(RPCParameters* pParams); + void RequestClass(RPCParameters* pParams); + void RequestSpawn(RPCParameters* pParams); + void EditAttachedObject(RPCParameters* pParams); + void EditObject(RPCParameters* pParams); + void EnterEditObject(RPCParameters* pParams); + void ScrCancelEdit(RPCParameters* pParams); + void ScrUpdateCameraTarget(RPCParameters* pParams); + void ClientCheck(RPCParameters* pParams); + void ScrCreateActor(RPCParameters* pParams); + void ScrDestroyActor(RPCParameters* pParams); + + // RegisterRPCs2 + + void ScrDisableVehicleCollisions(RPCParameters* pParams); + void ScrSetPlayerMapIcon(RPCParameters* pParams); + void ScrRemovePlayerMapIcon(RPCParameters* pParams); + void ScrSetPlayerAmmo(RPCParameters* pParams); + void ScrSetGravity(RPCParameters* pParams); + void ScrSetVehicleHealth(RPCParameters* pParams); + void ScrAttachTrailerToVehicle(RPCParameters* pParams); + void ScrDetachTrailerFromVehicle(RPCParameters* pParams); + void ScrCreateObject(RPCParameters* pParams); + void ScrSetObjectPosition(RPCParameters* pParams); + void ScrSetObjectRotation(RPCParameters* pParams); + void ScrDestroyObject(RPCParameters* pParams); + void ScrCreateExplosion(RPCParameters* pParams); + void ScrShowPlayerNametagForPlayer(RPCParameters* pParams); + void ScrMoveObject(RPCParameters* pParams); + void ScrStopObject(RPCParameters* pParams); + void ScrSetNumberPlate(RPCParameters* pParams); + void ScrTogglePlayerSpectating(RPCParameters* pParams); + void ScrPlayerSpectatePlayer(RPCParameters* pParams); + void ScrPlayerSpectateVehicle(RPCParameters* pParams); + void ScrMoveVehicleComponent(RPCParameters* pParams); + void ScrForceClassSelection(RPCParameters* pParams); + void ScrAttachObjectToPlayer(RPCParameters* pParams); + void ScrInitMenu(RPCParameters* pParams); + void ScrShowMenu(RPCParameters* pParams); + void ScrHideMenu(RPCParameters* pParams); + void ScrSetPlayerWantedLevel(RPCParameters* pParams); + void ScrShowTextDraw(RPCParameters* pParams); + void ScrHideTextDrawForPlayer(RPCParameters* pParams); + void ScrTextDrawSetString(RPCParameters* pParams); + void ScrGangZoneCreate(RPCParameters* pParams); + void ScrGangZoneDestroy(RPCParameters* pParams); + void ScrGangZoneFlash(RPCParameters* pParams); + void ScrGangZoneStopFlash(RPCParameters* pParams); + void ScrApplyAnimation(RPCParameters* pParams); + void ScrClearAnimations(RPCParameters* pParams); + void ScrSetPlayerSpecialAction(RPCParameters* pParams); + void ScrEnableStuntBonusForPlayer(RPCParameters* pParams); + void ScrSetPlayerFightingStyle(RPCParameters* pParams); + void ScrSetPlayerVelocity(RPCParameters* pParams); + void ScrSetVehicleVelocity(RPCParameters* pParams); + void ScrPlayCrimeReport(RPCParameters* pParams); + void ScrSetSpawnInfo(RPCParameters* pParams); + void ScrSetPlayerTeam(RPCParameters* pParams); + void ScrSetPlayerSkin(RPCParameters* pParams); + void ScrSetPlayerName(RPCParameters* pParams); + void ScrSetPlayerPosition(RPCParameters* pParams); + void ScrSetPlayerPositionFindZ(RPCParameters* pParams); + void ScrSetPlayerHealth(RPCParameters* pParams); + void ScrPutPlayerInVehicle(RPCParameters* pParams); + void ScrRemovePlayerFromVehicle(RPCParameters* pParams); + void ScrSetPlayerColor(RPCParameters* pParams); + void ScrDisplayGametext(RPCParameters* pParams); + void ScrSetPlayerInterior(RPCParameters* pParams); + void ScrSetPlayerCameraPosition(RPCParameters* pParams); + void ScrSetPlayerCameraLookAt(RPCParameters* pParams); + void ScrSetVehiclePosition(RPCParameters* pParams); + void ScrSetVehicleZAngle(RPCParameters* pParams); + void ScrSetVehicleParamsForPlayer(RPCParameters* pParams); + void ScrSetCameraBehindPlayer(RPCParameters* pParams); + void ScrTogglePlayerControllable(RPCParameters* pParams); + void ScrPlaySound(RPCParameters* pParams); + void ScrSetPlayerWorldBounds(RPCParameters* pParams); + void ScrGivePlayerMoney(RPCParameters* pParams); + void ScrSetPlayerFacingAngle(RPCParameters* pParams); + void ScrResetPlayerMoney(RPCParameters* pParams); + void ScrResetPlayerWeapons(RPCParameters* pParams); + void ScrGivePlayerWeapon(RPCParameters* pParams); + void ScrLinkVehicleToInterior(RPCParameters* pParams); + void ScrSetPlayerArmor(RPCParameters* pParams); + void ScrDeathMessage(RPCParameters* pParams); + void ScrSetPlayerShopName(RPCParameters* pParams); + void ScrSetPlayerDrunkLevel(RPCParameters* pParams); + void ScrSetPlayerArmedWeapon(RPCParameters* pParams); + void ScrSetPlayerAttachedObject(RPCParameters* pParams); + void ScrPlayAudioStream(RPCParameters* pParams); + void ScrStopAudioStream(RPCParameters* pParams); + void ScrRemoveBuildingForPlayer(RPCParameters* pParams); + void ScrAttachCameraToObject(RPCParameters* pParams); + void ScrInterpolateCamera(RPCParameters* pParams); + void ClickTextDraw(RPCParameters* pParams); + void ScrSetObjectMaterial(RPCParameters* pParams); + void ScrStopObjectCameraCollision(RPCParameters* pParams); + void ScrSetActorAnimation(RPCParameters* pParams); + void ScrSetActorRotation(RPCParameters* pParams); + void ScrSetActorPosition(RPCParameters* pParams); + void ScrSetActorHealth(RPCParameters* pParams); +} // namespace RPCHandlers + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/AimStuff.h b/include/sampapi/0.3.7-R5-1/AimStuff.h new file mode 100644 index 00000000..f295aaec --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/AimStuff.h @@ -0,0 +1,55 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +namespace AimStuff { + struct SAMPAPI_EXPORT Aim { + CVector front; + CVector source; + CVector sourceBeforeLookBehind; + CVector up; + }; + + SAMPAPI_EXPORT SAMPAPI_VAR float& RefLocalPlayerCameraExtZoom(); + SAMPAPI_EXPORT SAMPAPI_VAR float& RefLocalPlayerAspectRatio(); + SAMPAPI_EXPORT SAMPAPI_VAR float*& RefInternalCameraExtZoom(); + SAMPAPI_EXPORT SAMPAPI_VAR float*& RefInternalAspectRatio(); + SAMPAPI_EXPORT SAMPAPI_VAR float* ArrayCameraExtZoom(); + SAMPAPI_EXPORT SAMPAPI_VAR float* ArrayAspectRatio(); + SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayCameraMode(); + SAMPAPI_EXPORT SAMPAPI_VAR char*& RefInternalCameraMode(); + SAMPAPI_EXPORT SAMPAPI_VAR Aim& RefLocalPlayerAim(); + SAMPAPI_EXPORT SAMPAPI_VAR Aim* ArrayPlayerAim(); + SAMPAPI_EXPORT SAMPAPI_VAR Aim*& RefInternalAim(); + + SAMPAPI_EXPORT void UpdateCameraExtZoomAndAspectRatio(); + SAMPAPI_EXPORT void ApplyCameraExtZoomAndAspectRatio(); + SAMPAPI_EXPORT void SetCameraExtZoomAndAspectRatio(NUMBER nPlayer, float fCameraExtZoom, float fAspectRatio); + SAMPAPI_EXPORT float GetAspectRatio(); + SAMPAPI_EXPORT float GetCameraExtZoom(); + SAMPAPI_EXPORT void ApplyCameraExtZoomAndAspectRatio(NUMBER nPlayer); + SAMPAPI_EXPORT void SetCameraMode(char nMode, NUMBER nPlayer); + SAMPAPI_EXPORT char GetCameraMode(NUMBER nPlayer); + SAMPAPI_EXPORT char GetCameraMode(); + SAMPAPI_EXPORT void Initialize(); + SAMPAPI_EXPORT void UpdateAim(); + SAMPAPI_EXPORT void ApplyAim(); + SAMPAPI_EXPORT Aim* GetAim(); + SAMPAPI_EXPORT void SetAim(int nPlayer, const Aim* pAim); + SAMPAPI_EXPORT void ApplyAim(int nPlayer); + SAMPAPI_EXPORT Aim* GetAim(int nPlayer); +} // namespace AimStuff + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/Animation.h b/include/sampapi/0.3.7-R5-1/Animation.h new file mode 100644 index 00000000..32791b76 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/Animation.h @@ -0,0 +1,31 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT Animation { + union { + struct { + unsigned short m_nId : 16; + unsigned char m_nFramedelta : 8; + unsigned char m_nLoopA : 1; + unsigned char m_nLockX : 1; + unsigned char m_nLockY : 1; + unsigned char m_nLockF : 1; + unsigned char m_nTime : 2; + }; + int m_value; + }; +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CActor.h b/include/sampapi/0.3.7-R5-1/CActor.h new file mode 100644 index 00000000..d0b7b72b --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CActor.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CEntity.h" + +class CPed; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CActor : public CEntity { +public: + // void **m_lpVtbl = 0xEC298; + ::CPed* m_pGamePed; + GTAREF m_marker; + GTAREF m_arrow; + bool m_bNeedsToCreateMarker; + bool m_bInvulnerable; + + CActor(int nModel, CVector position, float fRotation); + virtual ~CActor() = 0; + + void Destroy(); + void PerformAnimation(const char* szAnim, const char* szIFP, float fFramedelta, int bLockA, int bLockX, int bLockY, int bLockF, int nTime); + void SetRotation(float fAngle); + float GetHealth(); + void SetHealth(float fAngle); + void SetInvulnerable(bool bEnable); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CActorPool.h b/include/sampapi/0.3.7-R5-1/CActorPool.h new file mode 100644 index 00000000..4076157e --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CActorPool.h @@ -0,0 +1,49 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CActor.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT ActorInfo { + ID m_nId; + int m_nModel; + CVector m_position; + float m_fRotation; + float m_fHealth; + bool m_bInvulnerable; +}; + +class SAMPAPI_EXPORT CActorPool { +public: + enum { MAX_ACTORS = 1000 }; + + int m_nLargestId; + CActor* m_pObject[MAX_ACTORS]; + BOOL m_bNotEmpty[MAX_ACTORS]; + ::CPed* m_pGameObject[MAX_ACTORS]; + int pad_2ee4[MAX_ACTORS]; + int pad_3e84[MAX_ACTORS]; + + CActorPool(); + ~CActorPool(); + + CActor* Get(ID nId); + BOOL DoesExist(ID nId); + void UpdateLargestId(); + BOOL Delete(ID nId); + ID Find(::CPed* pGamePed); + BOOL Create(ActorInfo* pInfo); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CAudio.h b/include/sampapi/0.3.7-R5-1/CAudio.h new file mode 100644 index 00000000..c14b4437 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CAudio.h @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CAudio { +public: + enum SoundId { + SOUND_OFF = 0, + SOUND_DISABLE_OUTDOOR_AMBIENCE_TRACK = 1, + }; + + BOOL m_bSoundLoaded; + bool m_bOutdoorAmbienceTrackDisabled; + + CAudio() { + m_bSoundLoaded = false; + m_bOutdoorAmbienceTrackDisabled = false; + } + + ~CAudio() { + Play(SOUND_OFF); + } + + int GetRadioStation(); + void StartRadio(int nStation); + void StopRadio(); + float GetRadioVolume(); + void StopOutdoorAmbienceTrack(); + void SetOutdoorAmbienceTrack(int nSound); + void Play(int nSound, CVector location = {}); + bool IsOutdoorAmbienceTrackDisabled(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CAudioStream.h b/include/sampapi/0.3.7-R5-1/CAudioStream.h new file mode 100644 index 00000000..79b11738 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CAudioStream.h @@ -0,0 +1,48 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CAudioStream { +public: + enum { AUDIOSTREAM_MAX_STRING = 256 }; + static constexpr auto AUDIOSTREAM_USERAGENT = "SA-MP/0.3"; + + bool m_bInitialized; + + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefStream(); + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefIsPlaying(); + static SAMPAPI_EXPORT SAMPAPI_VAR CVector& RefPosition(); + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefIs3d(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayIcyUrl(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayInfo(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayUrl(); + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefNeedsToDestroy(); + static SAMPAPI_EXPORT SAMPAPI_VAR float& RefRadius(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayIcyName(); + + static void ConstructInfo(); + static void SyncProc(int handle, int channel, int data, void* user); + static void Process(void* arglist); + + BOOL Reset(); + BOOL Stop(bool bWait); + BOOL Play(const char* szUrl, CVector position, float fRadius, bool bIs3d); + void ControlGameRadio(); + void DrawInfo(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CAudioStream*& RefAudioStream(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CCamera.h b/include/sampapi/0.3.7-R5-1/CCamera.h new file mode 100644 index 00000000..f3a2dfaf --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CCamera.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/0.3.7-R5-1/CEntity.h" + +class CEntity; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CCamera { +public: + CEntity* m_pAttachedTo; + CMatrix* m_pMatrix; + + CCamera(); + ~CCamera(); + + void Fade(BOOL bin); + void GetMatrix(CMatrix* pMatrix); + void SetMatrix(CMatrix matrix); + void TakeControl(::CEntity* pTarget, short nModeToGoTo, short nTypeOfSwitch); + void SetMoveVector(CVector* pCamera, CVector* pPosition, int nTime, bool bSmoothTransmition); + void SetTrackVector(CVector* pPointAt, CVector* pTransverseTo, int nTime, bool bSmooth); + void Attach(CEntity* pOwner); + void SetToOwner(); + float GetDistanceToPoint(CVector* pPoint); + void Restore(); + void Set(CVector position, CVector rotation); + void PointAt(CVector point, int nSwitchStyle); + void Detach(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CChat.h b/include/sampapi/0.3.7-R5-1/CChat.h new file mode 100644 index 00000000..2c92788c --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CChat.h @@ -0,0 +1,105 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" +#include "sampapi/0.3.7-R5-1/CFonts.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CChat { +public: + enum EntryType { + ENTRY_TYPE_NONE = 0, + ENTRY_TYPE_CHAT = 1 << 1, + ENTRY_TYPE_INFO = 1 << 2, + ENTRY_TYPE_DEBUG = 1 << 3 + }; + enum DisplayMode { + DISPLAY_MODE_OFF, + DISPLAY_MODE_NOSHADOW, + DISPLAY_MODE_NORMAL + }; + enum { MAX_MESSAGES = 100 }; + + unsigned int m_nPageSize; + char* m_szLastMessage; + int m_nMode; + bool m_bTimestamps; + BOOL m_bDoesLogExist; + char m_szLogPath[261]; // MAX_PATH(+1) + CDXUTDialog* m_pGameUi; + CDXUTEditBox* m_pEditbox; + CDXUTScrollBar* m_pScrollbar; + D3DCOLOR m_textColor; // 0xFFFFFFFF + D3DCOLOR m_infoColor; // 0xFF88AA62 + D3DCOLOR m_debugColor; // 0xFFA9C4E4 + long m_nWindowBottom; + + struct SAMPAPI_EXPORT ChatEntry { + int m_timestamp; + char m_szPrefix[28]; + char m_szText[144]; + char unused[64]; + int m_nType; + D3DCOLOR m_textColor; + D3DCOLOR m_prefixColor; + }; + ChatEntry m_entry[MAX_MESSAGES]; + + CFonts* m_pFontRenderer; + ID3DXSprite* m_pTextSprite; + ID3DXSprite* m_pSprite; + IDirect3DDevice9* m_pDevice; + BOOL m_bRenderToSurface; + ID3DXRenderToSurface* m_pRenderToSurface; + IDirect3DTexture9* m_pTexture; + IDirect3DSurface9* m_pSurface; +#ifdef _d3d9TYPES_H_ + D3DDISPLAYMODE m_displayMode; +#else + unsigned int m_displayMode[4]; +#endif + int pad_[2]; + BOOL m_bRedraw; + long m_nScrollbarPos; + long m_nCharHeight; // this is the height of the "Y" + long m_nTimestampWidth; + + CChat(IDirect3DDevice9* pDevice, CFonts* pFontRenderer, const char* szLogPath); + + int GetMode(); + void SwitchMode(); + void RecalcFontSize(); + void OnLostDevice(); + void UpdateScrollbar(); + void SetPageSize(int nValue); + void PageUp(); + void PageDown(); + void ScrollToBottom(); + void Scroll(int nDelta); + void FilterOutInvalidChars(char* szString); + void PushBack(); + void RenderEntry(const char* szText, CRect rect, D3DCOLOR color); + void Log(int nType, const char* szText, const char* szPrefix); + void ResetDialogControls(CDXUTDialog* pGameUi); + void Render(); + void AddEntry(int nType, const char* szText, const char* szPrefix, D3DCOLOR textColor, D3DCOLOR prefixColor); + void Draw(); + void RenderToSurface(); + void AddChatMessage(const char* szPrefix, D3DCOLOR prefixColor, const char* szText); + void AddMessage(D3DCOLOR color, const char* szText); + void OnResetDevice(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CChat*& RefChat(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CChatBubble.h b/include/sampapi/0.3.7-R5-1/CChatBubble.h new file mode 100644 index 00000000..a9b9e260 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CChatBubble.h @@ -0,0 +1,36 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CChatBubble { +public: + struct SAMPAPI_EXPORT Player { + BOOL m_bExists; + char m_szText[256]; + int m_creationTick; + int m_lifeSpan; + D3DCOLOR m_color; + float m_fDrawDistance; + int m_nMaxLineLength; + } m_player[1004]; + + CChatBubble(); + + void Add(ID nPlayer, const char* szText, D3DCOLOR color, float fDrawDistance, int lifeSpan); + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CChatBubble*& RefChatBubble(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CConfig.h b/include/sampapi/0.3.7-R5-1/CConfig.h new file mode 100644 index 00000000..6ebd8d71 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CConfig.h @@ -0,0 +1,67 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CConfig { +public: + enum { + MAX_ENTRIES = 512, + MAX_ENTRY_NAME = 40, + }; + enum ValueType { + VALUE_TYPE_NONE, + VALUE_TYPE_INT, + VALUE_TYPE_STRING, + VALUE_TYPE_FLOAT + }; + + struct SAMPAPI_EXPORT ConfigEntry { + char m_szName[MAX_ENTRY_NAME + 1]; + BOOL m_bReadOnly; // maybe + int m_nType; + int m_nValue; + float m_fValue; + char* m_szValue; + }; + + ConfigEntry m_entry[MAX_ENTRIES]; + BOOL m_bNotEmpty[MAX_ENTRIES]; // map + char m_szFilename[261]; + int m_nFirstFree; + + CConfig(const char* szFile); + ~CConfig(); + + void FindFirstFree(); + int GetIndex(const char* szEntry); + bool DoesExist(const char* szEntry); + int CreateEntry(const char* szName); + int GetIntValue(const char* szEntry); + const char* GetStringValue(const char* szEntry); + float GetFloatValue(const char* szEntry); + BOOL Free(const char* szEntry); + int GetValueType(const char* szEntry); + ConfigEntry* GetEntry(int nIndex); + int GetType(const char* szString); + BOOL Save(); + BOOL WriteIntValue(const char* szEntry, int nValue, BOOL bReadOnly = 0); + BOOL WriteStringValue(const char* szEntry, const char* szValue, BOOL bReadOnly = 0); + BOOL WriteFloatValue(const char* szEntry, float fValue, BOOL bReadOnly = 0); + void Write(const char* szEntry, char* szBuffer); + BOOL Load(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CConfig*& RefConfig(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CDeathWindow.h b/include/sampapi/0.3.7-R5-1/CDeathWindow.h new file mode 100644 index 00000000..3cc6f47b --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CDeathWindow.h @@ -0,0 +1,59 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CDeathWindow { +public: + enum { MAX_DEATHMESSAGES = 5 }; + + BOOL m_bEnabled; + + struct SAMPAPI_EXPORT { + char m_szKiller[25]; + char m_szVictim[25]; + D3DCOLOR m_killerColor; + D3DCOLOR m_victimColor; + char m_nWeapon; + } m_entry[MAX_DEATHMESSAGES]; + + int m_nLongestNickWidth; + int m_position[2]; + ID3DXFont* m_pFont; + ID3DXFont* m_pWeaponFont1; + ID3DXFont* m_pWeaponFont2; + ID3DXSprite* m_pSprite; + IDirect3DDevice9* m_pDevice; + BOOL m_bAuxFontInitialized; + ID3DXFont* m_pAuxFont1; + ID3DXFont* m_pAuxFont2; + + CDeathWindow(IDirect3DDevice9* pDevice); + ~CDeathWindow(); + + void InitializeAuxFonts(); + void PushBack(); + void DrawText(const char* szText, CRect rect, D3DCOLOR color, int nFormat); + void DrawWeaponSprite(const char* szSpriteId, CRect rect, D3DCOLOR color); + void GetWeaponSpriteRectSize(void* pPoint); + const char* GetWeaponSpriteId(char nWeapon); + void ResetFonts(); + void Draw(); + void AddEntry(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon); + void AddMessage(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CDeathWindow*& RefDeathWindow(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CDialog.h b/include/sampapi/0.3.7-R5-1/CDialog.h new file mode 100644 index 00000000..b24a48f8 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CDialog.h @@ -0,0 +1,57 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CDialog { +public: + enum DialogType { + DIALOG_MESSAGEBOX, + DIALOG_INPUT, + DIALOG_LIST, + DIALOG_PASSWORD, + DIALOG_TABLIST, + DIALOG_HEADERSLIST + }; + + IDirect3DDevice9* m_pDevice; + unsigned long m_position[2]; + unsigned long m_size[2]; + unsigned long m_buttonOffset[2]; + CDXUTDialog* m_pDialog; + CDXUTListBox* m_pListbox; + CDXUTIMEEditBox* m_pEditbox; + BOOL m_bIsActive; + int m_nType; + unsigned int m_nId; + char* m_szText; + unsigned long m_textSize[2]; + char m_szCaption[65]; + BOOL m_bServerside; + char pad[536]; + + CDialog(IDirect3DDevice9* pDevice); + + void GetScreenRect(CRect* pRect); + int GetTextScreenLength(const char* szString); + void Hide(); + void ResetDialogControls(CDXUTDialog* pDialog); + void Show(int nId, int nType, const char* szCaption, const char* szText, const char* szLeftButton, const char* szRightButton, BOOL bServerside); + void Close(char nProcessButton); + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CDialog*& RefDialog(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CEntity.h b/include/sampapi/0.3.7-R5-1/CEntity.h new file mode 100644 index 00000000..2d1b1d5b --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CEntity.h @@ -0,0 +1,64 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" + +class CEntity; +struct RwObject; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CEntity { +public: + // void **m_lpVtbl = samp.dll+0xEC2E4; + char pad_4[60]; + ::CEntity* m_pGameEntity; + GTAREF m_handle; + + CEntity(); + + virtual ~CEntity() = 0; + virtual void Add() = 0; // adds entity to the game world + virtual void Remove() = 0; // removes entity from the game world + + void GetMatrix(CMatrix* pMatrix); + void SetMatrix(CMatrix matrix); + void GetSpeed(CVector* pVec); + void SetSpeed(CVector vec); + void GetTurnSpeed(CVector* pVec); + void SetTurnSpeed(CVector vec); + void ApplyTurnSpeed(); + float GetDistanceFromCentreOfMassToBaseOfModel(); + void GetBoundCentre(CVector* pVec); + void SetModelIndex(int nModel); + int GetModelIndex(); + void Teleport(CVector position); + float GetDistanceToLocalPlayer(); + float GetDistanceToCamera(); + float GetDistanceToPoint(CVector position); + BOOL DoesExist(); // does entity exist in the game world? + BOOL EnforceWorldBoundries(float fPX, float fZX, float fPY, float fNY); + BOOL HasExceededWorldBoundries(float fPX, float fZX, float fPY, float fNY); + void GetEulerInverted(float* x, float* y, float* z); + BOOL IsIgnored(); + BOOL IsStationary(); + BOOL GetCollisionFlag(); + void SetCollisionFlag(BOOL bEnable); + RwObject* GetRwObject(); + void DeleteRwObject(); + void UpdateRwFrame(); + float GetDistanceToLocalPlayerNoHeight(); + void SetCollisionProcessed(BOOL bProcessed); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CFont.h b/include/sampapi/0.3.7-R5-1/CFont.h new file mode 100644 index 00000000..01e555c9 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CFont.h @@ -0,0 +1,89 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +/* + this class handles RGB-formatted tags in ANSI text + like a "{FFFFFF}Hello {FF5000}World!" +*/ + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +#if defined(__D3DX9CORE_H__) + +class SAMPAPI_EXPORT CFont : ID3DXFont { +public: + // void **m_lpVtbl = 0xEA3B8; + ID3DXFont* m_pFont; + + CFont(); + CFont(ID3DXFont* pFont); + + // IUnknown + STDMETHOD(QueryInterface) + (THIS_ REFIID iid, LPVOID* ppv) PURE; + STDMETHOD_(ULONG, AddRef) + (THIS) PURE; + STDMETHOD_(ULONG, Release) + (THIS) PURE; + + // ID3DXFont + STDMETHOD(GetDevice) + (THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; + STDMETHOD(GetDescA) + (THIS_ D3DXFONT_DESCA* pDesc) PURE; + STDMETHOD(GetDescW) + (THIS_ D3DXFONT_DESCW* pDesc) PURE; + STDMETHOD_(BOOL, GetTextMetricsA) + (THIS_ TEXTMETRICA* pTextMetrics) PURE; + STDMETHOD_(BOOL, GetTextMetricsW) + (THIS_ TEXTMETRICW* pTextMetrics) PURE; + + STDMETHOD_(HDC, GetDC) + (THIS) PURE; + STDMETHOD(GetGlyphData) + (THIS_ UINT Glyph, LPDIRECT3DTEXTURE9* ppTexture, RECT* pBlackBox, POINT* pCellInc) PURE; + + STDMETHOD(PreloadCharacters) + (THIS_ UINT First, UINT Last) PURE; + STDMETHOD(PreloadGlyphs) + (THIS_ UINT First, UINT Last) PURE; + STDMETHOD(PreloadTextA) + (THIS_ LPCSTR pString, INT Count) PURE; + STDMETHOD(PreloadTextW) + (THIS_ LPCWSTR pString, INT Count) PURE; + + STDMETHOD_(INT, DrawTextA) + (THIS_ LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; + STDMETHOD_(INT, DrawTextW) + (THIS_ LPD3DXSPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; + + STDMETHOD(OnLostDevice) + (THIS) PURE; + STDMETHOD(OnResetDevice) + (THIS) PURE; +}; + +#else + +class SAMPAPI_EXPORT CFont { +public: + void** m_lpVtbl; + ID3DXFont* m_pFont; + + CFont(); + CFont(ID3DXFont* pFont); +}; + +#endif + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CFonts.h b/include/sampapi/0.3.7-R5-1/CFonts.h new file mode 100644 index 00000000..1639bbc8 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CFonts.h @@ -0,0 +1,48 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" +#include "sampapi/0.3.7-R5-1/CFont.h" + +#undef DrawText + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CFonts { +public: + CFont* m_pFont; + CFont* m_pLittleFont; + CFont* m_pShadow; + CFont* m_pLittleShadow; + CFont* m_pLicensePlateFont; + ID3DXSprite* m_pDefaultSprite; + IDirect3DDevice9* m_pDevice; + char* m_szTempBuffer; + int m_nCharHeight; + int m_nLittleCharHeight; + + CFonts(IDirect3DDevice9* pDevice); + ~CFonts(); + + void OnLostDevice(); + void OnResetDevice(); + void GetTextScreenSize(void* pSize, const char* szText, int nFormat); + void GetLittleTextScreenSize(void* pSize, const char* szText, int nFormat); + void DrawText(ID3DXSprite* pSprite, const char* szText, CRect rect, D3DCOLOR color, BOOL bShadow); + void DrawLittleText(ID3DXSprite* pSprite, const char* szText, CRect rect, int nFormat, D3DCOLOR color, BOOL bShadow); + void DrawLicensePlateText(const char* szText, CRect rect, D3DCOLOR color); + void Reset(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CFonts*& RefFontRenderer(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CGame.h b/include/sampapi/0.3.7-R5-1/CGame.h new file mode 100644 index 00000000..7c195b39 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CGame.h @@ -0,0 +1,144 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CCamera.h" +#include "sampapi/0.3.7-R5-1/CAudio.h" +#include "sampapi/0.3.7-R5-1/CPed.h" +#include "sampapi/0.3.7-R5-1/CVehicle.h" +#include "sampapi/0.3.7-R5-1/CObject.h" + +class CWeaponInfo; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +enum CursorMode { + CURSOR_NONE, + CURSOR_LOCKKEYS_NOCURSOR, + CURSOR_LOCKCAMANDCONTROL, + CURSOR_LOCKCAM, + CURSOR_LOCKCAM_NOCURSOR +}; + +class SAMPAPI_EXPORT CGame { +public: + CAudio* m_pAudio; + CCamera* m_pCamera; + CPed* m_pPlayerPed; + + struct SAMPAPI_EXPORT { + CVector m_currentPosition; + CVector m_nextPosition; + float m_fSize; + char m_nType; + BOOL m_bEnabled; + GTAREF m_marker; + GTAREF m_handle; + } m_racingCheckpoint; + + struct SAMPAPI_EXPORT { + CVector m_position; + CVector m_size; + BOOL m_bEnabled; + GTAREF m_handle; + } m_checkpoint; + + int field_61; + BOOL m_bHeadMove; + int m_nFrameLimiter; + int m_nCursorMode; + unsigned int m_nInputEnableWaitFrames; + BOOL m_bClockEnabled; + char field_6d; + bool m_aKeepLoadedVehicleModels[212]; + + static SAMPAPI_EXPORT SAMPAPI_VAR char*& RefGameTextMessage(); // [256], temp buffer + static SAMPAPI_EXPORT SAMPAPI_VAR BOOL* ArrayUsedPlayerSlots(); // [SAMP_MAX_PLAYER_PED_SLOTS] + + CGame(); + + CPed* GetPlayerPed(); + float FindGroundZ(CVector vPoint); + void SetCursorMode(int nMode, BOOL bImmediatelyHideCursor); + void InitGame(); + void StartGame(); + BOOL IsMenuVisible(); + BOOL IsStarted(); + void RequestModel(int nModel, int nLoadingStream = SAMPAPI_UNUSED); + void LoadRequestedModels(); + BOOL IsModelAvailable(int nModel); + void ReleaseModel(int nModel, bool bGameFunc = true); + void SetWorldTime(char nHour, char nMinute); + void GetWorldTime(char* nHour, char* nMinute); + void LetTimeGo(bool blet); + void SetWorldWeather(char nWeather); + void SetFrameLimiter(int nValue); + void SetMaxStats(); + void DisableTrainTraffic(); + void RefreshRenderer(float fX, float fY); + void RequestAnimation(const char* szFile); + BOOL IsAnimationLoaded(const char* szFile); + void ReleaseAnimation(const char* szFile); + void DisplayGameText(const char* szText, int nType, int nSize); + void DeleteRacingCheckpoint(); + GTAREF CreateMarker(int nIcon, CVector vPosition, int nColor, int nType); + void DeleteMarker(GTAREF handle); + char GetCurrentInterior(); + void UpdateFarClippingPlane(); + void IncreasePlayerMoney(int nInc); + int GetPlayerMoney(); + const char* GetWeaponName(int nWeapon); + void CreatePickup(int nModel, int nType, CVector vPosition, GTAREF* handle); + GTAREF CreateWeaponPickup(int nModel, int nAmmo, CVector vPosition); + IDirect3DDevice9* GetDevice(); + void Restart(); + ::CWeaponInfo* GetWeaponInfo(int nWeapon, int nSkill); + void SetWorldGravity(float fValue); + void SetWantedLevel(char nLevel); + void SetNumberOfIntroTextLinesThisFrame(unsigned short nValue); + void DrawGangZone(float* pPos, char nColor); + void EnableZoneDisplaying(bool bEnable); + void EnableStuntBonus(bool bEnable); + void LoadScene(const char* szFile); + int GetUsedMemory(); + int GetStreamingMemory(); + void SetRequiredVehicleModels(unsigned char* pModelCount); + int GetTimer(); + void LoadAnimationsAndModels(); + void LoadCollisionFile(const char* szFile); + void LoadCullZone(const char* szLine); + BOOL UsingGamepad(); + void DisableAutoAiming(); + void EnableHUD(BOOL bEnable); + void SetCheckpoint(CVector* pPos, CVector* pSize); + void CreateRacingCheckpoint(); + void ProcessCheckpoints(); + void ResetMoney(); + void SetRacingCheckpoint(int nType, CVector* pCurrentPos, CVector* pNextPos, float fSize); + void EnableRadar(BOOL bEnable); + void* GetWindowHandle(); + CAudio* GetAudio(); + CCamera* GetCamera(); + BOOL DoesHeadMoves(); + void EnableClock(bool bEnable); + void Sleep(int elapsed, int fpsLimit); + CPed* CreatePed(int nModel, CVector position, float fRotation, int a6, int a7); + BOOL RemovePed(CPed* pPed); + CVehicle* CreateVehicle(int nModel, CVector position, float fRotation, BOOL bHasSiren); + CObject* CreateObject(int nModel, CVector position, CVector rotation, float fDrawDistance, char a11, char a12); + void ProcessInputEnabling(); + void ProcessFrameLimiter(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CGame*& RefGame(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CGangZonePool.h b/include/sampapi/0.3.7-R5-1/CGangZonePool.h new file mode 100644 index 00000000..3d8cc276 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CGangZonePool.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT GangZone { + struct SAMPAPI_EXPORT { + float left; + float bottom; + float right; + float top; + } m_rect; + D3DCOLOR m_color; + D3DCOLOR m_altColor; +}; + +class SAMPAPI_EXPORT CGangZonePool { +public: + enum { MAX_GANGZONES = 1024 }; + + GangZone* m_pObject[MAX_GANGZONES]; + BOOL m_bNotEmpty[MAX_GANGZONES]; + + CGangZonePool(); + ~CGangZonePool(); + + void Create(ID nId, float left, float top, float right, float bottom, D3DCOLOR color); + void StartFlashing(ID nId, D3DCOLOR color); + void StopFlashing(ID nId); + void Delete(ID nId); + void Draw(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CHelpDialog.h b/include/sampapi/0.3.7-R5-1/CHelpDialog.h new file mode 100644 index 00000000..3a1dc1fb --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CHelpDialog.h @@ -0,0 +1,27 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CHelpDialog { +public: + IDirect3DDevice9* m_pDevice; + + CHelpDialog(IDirect3DDevice9* pDevice = SAMPAPI_UNUSED); + + void Show(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CHelpDialog*& RefHelpDialog(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CHttpClient.h b/include/sampapi/0.3.7-R5-1/CHttpClient.h new file mode 100644 index 00000000..89a71c9d --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CHttpClient.h @@ -0,0 +1,81 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CHttpClient { +public: + enum { + RECEIVE_BUFFER_SIZE = 4096 + }; + + struct SAMPAPI_EXPORT Request { + enum RequestType { + GET = 1, + POST, + HEAD + }; + + unsigned short m_nPort; + int m_nType; + char* m_szHost; + char* m_szFile; + char* m_szData; + char* m_szReferer; + }; + + struct SAMPAPI_EXPORT Response { + enum ContentType { + CONTENT_UNKNOWN, + CONTENT_TEXT, + CONTENT_HTML + }; + + char* m_szHeader; + char* m_szResponse; + unsigned int m_nHeaderLen; + unsigned int m_nResponseLen; + unsigned int m_nResponseCode; + unsigned int m_nContentType; + }; + + enum ErrorCode { + ERROR_SUCCESS, + ERROR_BAD_HOST, + ERROR_NO_SOCKET, + ERROR_CANNOT_CONNECT, + ERROR_CANNOT_WRITE, + ERROR_TOO_BIG_CONTENT, + ERROR_INCORRECT_RESPONSE + }; + + int m_nSocket; + Request m_request; + Response m_response; + ErrorCode m_error; + + CHttpClient(); + ~CHttpClient(); + + bool GetHeaderValue(const char* szHeaderName, char* szBuffer, int nBufferLen); + void InitializeRequest(int nType, const char* szUrl, const char* szPostData, const char* szReferer); + void HandleEntity(); + bool Connect(const char* szHost, int nPort); + void Process(); + void Disconnect(); + ErrorCode ProcessUrl(int nType, const char* szUrl, const char* szPostData, const char* szReferer); + bool Send(const char* szBuffer); + int Receive(char* szBuffer, int nBufferLen); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CInput.h b/include/sampapi/0.3.7-R5-1/CInput.h new file mode 100644 index 00000000..d07e07b1 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CInput.h @@ -0,0 +1,59 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" +#include "sampapi/0.3.7-R5-1/Commands.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CInput { +public: + enum { + MAX_CLIENT_CMDS = 144, + MAX_CMD_LENGTH = 32, + }; + + IDirect3DDevice9* m_pDevice; + CDXUTDialog* m_pGameUI; + CDXUTEditBox* m_pEditbox; + CMDPROC m_commandProc[MAX_CLIENT_CMDS]; + char m_szCommandName[MAX_CLIENT_CMDS][MAX_CMD_LENGTH + 1]; + int m_nCommandCount; + BOOL m_bEnabled; + char m_szInput[129]; + char m_szRecallBufffer[10][129]; + char m_szCurrentBuffer[129]; + int m_nCurrentRecall; + int m_nTotalRecall; + CMDPROC m_pDefaultCommand; + + CInput(IDirect3DDevice9* pDevice); + + void GetRect(CRect* pRect); + void Open(); + void Close(); + void AddRecall(const char* szString); + void RecallUp(); + void RecallDown(); + void EnableCursor(); + CMDPROC GetCommandHandler(const char* szName); + void SetDefaultCommand(CMDPROC handler); + void AddCommand(const char* szName, CMDPROC handler); + BOOL MsgProc(int uMsg, int wParam, int lParam); + void ResetDialogControls(CDXUTDialog* pGameUi); + void Send(const char* szString); + void ProcessInput(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CInput*& RefInputBox(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CLabel.h b/include/sampapi/0.3.7-R5-1/CLabel.h new file mode 100644 index 00000000..f4950355 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CLabel.h @@ -0,0 +1,35 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CLabel { +public: + IDirect3DDevice9* m_pDevice; + ID3DXSprite* m_pSprite; + + CLabel(IDirect3DDevice9* pDevice); + ~CLabel(); + + void OnLostDevice(); + void OnResetDevice(); + BOOL HasNoObstacles(CVector position); + void Begin(); + void End(); + void Draw(CVector* pPosition, const char* szText, D3DCOLOR color, BOOL bShadow, bool bNoObstacles); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CLabel*& RefLabel(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CLabelPool.h b/include/sampapi/0.3.7-R5-1/CLabelPool.h new file mode 100644 index 00000000..045aaced --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CLabelPool.h @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT TextLabel { + char* m_pText; + D3DCOLOR m_color; + CVector m_position; + float m_fDrawDistance; + bool m_bBehindWalls; + ID m_nAttachedToPlayer; + ID m_nAttachedToVehicle; +}; + +class SAMPAPI_EXPORT CLabelPool { +public: + enum { MAX_TEXT_LABELS = 2048 }; + + TextLabel m_object[MAX_TEXT_LABELS]; + BOOL m_bNotEmpty[MAX_TEXT_LABELS]; + + CLabelPool(); + ~CLabelPool(); + + void Create(ID nId, const char* szText, D3DCOLOR color, CVector position, float fDrawDistance, bool bBehindWalls, ID nAttachedToPlayer, ID nAttachedToVehicle); + BOOL Delete(ID nId); + void Draw(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CLicensePlate.h b/include/sampapi/0.3.7-R5-1/CLicensePlate.h new file mode 100644 index 00000000..d7006de7 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CLicensePlate.h @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CLicensePlate { +public: + static constexpr auto DEFAULT_PLATE_FONT = "Arial"; + static constexpr auto DEFAULT_PLATE_TEXT = "XYZSR998"; + enum { + DEFAULT_PLATE_TEXT_COLOR = 0xEE444470, + DEFAULT_PLATE_BG_COLOR = 0xFFBEB6A8, + }; + + IDirect3DDevice9* m_pDevice; + ID3DXRenderToSurface* m_pRenderer; + IDirect3DTexture9* m_pTexture; + IDirect3DSurface9* m_pSurface; +#ifdef _d3d9TYPES_H_ + D3DDISPLAYMODE m_displayMode; +#else + unsigned int m_displayMode[4]; +#endif + IDirect3DTexture9* m_pDefaultPlate; + + CLicensePlate(IDirect3DDevice9* pDevice); + ~CLicensePlate(); + + void OnLostDevice(); + void OnResetDevice(); + IDirect3DTexture9* Create(const char* szText); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CLicensePlate*& RefLicensePlateManager(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CLocalPlayer.h b/include/sampapi/0.3.7-R5-1/CLocalPlayer.h new file mode 100644 index 00000000..a180e6ee --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CLocalPlayer.h @@ -0,0 +1,215 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CPed.h" +#include "sampapi/0.3.7-R5-1/CVehicle.h" +#include "sampapi/0.3.7-R5-1/Synchronization.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +enum SpectatingMode { + SPECTATING_MODE_VEHICLE = 3, + SPECTATING_MODE_PLAYER = 4, + SPECTATING_MODE_FIXED = 15, + SPECTATING_MODE_SIDE = 14 +}; + +enum SpectatingType { + SPEC_TYPE_NONE, + SPEC_TYPE_PLAYER, + SPEC_TYPE_VEHICLE +}; + +enum SurfingMode { + SURFING_MODE_NONE, + SURFING_MODE_UNFIXED, + SURFING_MODE_FIXED +}; + +class SAMPAPI_EXPORT CLocalPlayer { +public: + + Synchronization::IncarData m_incarData; + Synchronization::AimData m_aimData; + Synchronization::TrailerData m_trailerData; + Synchronization::OnfootData m_onfootData; + Synchronization::PassengerData m_passengerData; + + BOOL m_bIsActive; + BOOL m_bIsWasted; + ID m_nCurrentVehicle; + ID m_nLastVehicle; + + Animation m_animation; + int field_100; + + CPed* m_pPed; + + BOOL m_bDoesSpectating; + NUMBER m_nTeam; + short field_10d; + TICK m_lastUpdate; + TICK m_lastSpecUpdate; + TICK m_lastAimUpdate; + TICK m_lastStatsUpdate; + + struct SAMPAPI_EXPORT CameraTarget { + ID m_nObject; + ID m_nVehicle; + ID m_nPlayer; + ID m_nActor; + } m_cameraTarget; + + TICK m_lastCameraTargetUpdate; + + struct SAMPAPI_EXPORT { + CVector m_direction; + TICK m_lastUpdate; + TICK m_lastLook; + } m_head; + + TICK m_lastAnyUpdate; + BOOL m_bClearedToSpawn; + TICK m_lastSelectionTick; + TICK m_initialSelectionTick; + + struct SAMPAPI_EXPORT SpawnInfo { + NUMBER m_nTeam; + int m_nSkin; + char field_c; + CVector m_position; + float m_fRotation; + int m_aWeapon[3]; + int m_aAmmo[3]; + } m_spawnInfo; + + BOOL m_bHasSpawnInfo; + TICK m_lastWeaponsUpdate; + + struct SAMPAPI_EXPORT { + ID m_nAimedPlayer; + ID m_nAimedActor; + NUMBER m_nCurrentWeapon; + NUMBER m_aLastWeapon[13]; + int m_aLastWeaponAmmo[13]; + } m_weaponsData; + + BOOL m_bPassengerDriveBy; + char m_nCurrentInterior; + BOOL m_bInRCMode; + char m_szName[256]; + + struct SAMPAPI_EXPORT { + ID m_nEntityId; // vehicle 0 =< id < 2000; object 2000 <= id < 3000 + TICK m_lastUpdate; + + union SAMPAPI_EXPORT { + CVehicle* m_pVehicle; + CObject* m_pObject; + }; + + BOOL m_bStuck; + BOOL m_bIsActive; + CVector m_position; + int field_; + int m_nMode; + } m_surfing; + + struct SAMPAPI_EXPORT { + BOOL m_bEnableAfterDeath; + int m_nSelected; + BOOL m_bWaitingForSpawnRequestReply; + BOOL m_bIsActive; + } m_classSelection; + + TICK m_zoneDisplayingEnd; + + struct SAMPAPI_EXPORT { + char m_nMode; + char m_nType; + int m_nObject; + BOOL m_bProcessed; + } m_spectating; + + struct SAMPAPI_EXPORT { + ID m_nVehicleUpdating; + int m_nBumper; + int m_nDoor; + bool m_bLight; + bool m_bWheel; + } m_damage; + + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefIncarSendrate(); // = NETMODE_INCAR_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefOnfootSendrate(); // = NETMODE_ONFOOT_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefFiringSendrate(); // = NETMODE_FIRING_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefSendMultiplier(); // = NETMODE_SEND_MULTIPLIER; + + CLocalPlayer(); + + CPed* GetPed(); + void ResetData(); + void ProcessHead(); + void SetSpecialAction(char nId); + char GetSpecialAction(); + void UpdateSurfing(); + void SetSurfing(CVehicle* pVehicle, BOOL bStuck); + void ProcessSurfing(); + BOOL NeedsToUpdate(const void* pOld, const void* pNew, unsigned int nLen); + int GetIncarSendRate(); + int GetOnfootSendRate(); + int GetUnoccupiedSendRate(); + void SetSpawnInfo(const SpawnInfo* pInfo); + BOOL Spawn(); + void SetColor(D3DCOLOR color); + D3DCOLOR GetColorAsRGBA(); + D3DCOLOR GetColorAsARGB(); + void ProcessOnfootWorldBounds(); + void ProcessIncarWorldBounds(); + void RequestSpawn(); + void PrepareForClassSelection(); + void PrepareForClassSelection_Outcome(BOOL bOutcome); + void EnableSpectating(BOOL bEnable); + void SpectateForVehicle(ID nId); + void SpectateForPlayer(ID nId); + BOOL NeedsToSendOnfootData(short controllerState, short sLeftStickX, short sLeftStickY); + BOOL NeedsToSendIncarData(short controllerState, short sLeftStickX, short sLeftStickY); + bool DefineCameraTarget(CameraTarget* pInfo); + void UpdateCameraTarget(); + void DrawCameraTargetLabel(); + void SendUnoccupiedData(ID nVehicle, char arg4); + void SendOnfootData(); + void SendAimData(); + void SendTrailerData(ID nTrailer); + void SendPassengerData(); + void WastedNotification(); + void RequestClass(int nId); + void ChangeInterior(char nId); + void Chat(const char* szText); + void EnterVehicle(int nVehicle, BOOL bPassenger); + void ExitVehicle(int nVehicle); + void SendStats(); + void UpdateVehicleDamage(ID nVehicle); + void NextClass(); + void PrevClass(); + void ProcessClassSelection(); + void UpdateWeapons(); + void ProcessSpectating(); + void SendTakeDamage(int nId, float fDamage, int nWeapon, int nBodyPart); + void SendGiveDamage(int nId, float fDamage, int nWeapon, int nBodyPart); + bool ProcessUnoccupiedSync(ID nVehicle, CVehicle* pVehicle); + void EnterVehicleAsPassenger(); + void SendIncarData(); + void Process(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CMakeLists.txt b/include/sampapi/0.3.7-R5-1/CMakeLists.txt new file mode 100644 index 00000000..a620acb4 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CMakeLists.txt @@ -0,0 +1,62 @@ +target_sources(sampapi + PRIVATE + AimStuff.h + Animation.h + CActor.h + CActorPool.h + CAudio.h + CAudioStream.h + CCamera.h + CChat.h + CChatBubble.h + CConfig.h + CDeathWindow.h + CDialog.h + CEntity.h + CFont.h + CFonts.h + CGame.h + CGangZonePool.h + CHelpDialog.h + CHttpClient.h + CInput.h + CLabel.h + CLabelPool.h + CLicensePlate.h + CLocalPlayer.h + CMenu.h + CMenuPool.h + CNetGame.h + CNetStats.h + CObject.h + CObjectMaterialText.h + CObjectPool.h + CObjectSelection.h + Commands.h + ControllerState.h + CPed.h + CPickupPool.h + CPlayerInfo.h + CPlayerPool.h + CPlayerTags.h + CRemotePlayer.h + CScoreboard.h + CSpawnScreen.h + CSrvNetStats.h + CTextDraw.h + CTextDrawPool.h + CTextDrawSelection.h + CVehicle.h + CVehiclePool.h + DebugScript.h + Exception.h + GUI.h + KeyStuff.h + Scripting.h + Settings.h + SpecialAction.h + Synchronization.h + InputHandler.h + CObjectEdit.h + RPCHandlers.h +) diff --git a/include/sampapi/0.3.7-R5-1/CMenu.h b/include/sampapi/0.3.7-R5-1/CMenu.h new file mode 100644 index 00000000..6ffd37b2 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CMenu.h @@ -0,0 +1,59 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CMenu { +public: + enum { + MAX_MENU_ITEMS = 12, + MAX_COLUMNS = 2, + MAX_MENU_LINE = 33, + }; + + struct SAMPAPI_EXPORT Interaction { + BOOL m_bMenu; + BOOL m_bRow[MAX_MENU_ITEMS]; + BOOL m_bPadding[8 - ((MAX_MENU_ITEMS + 1) % 8)]; + }; + + unsigned char m_nId; + char m_szTitle[MAX_MENU_LINE]; + char m_szItems[MAX_MENU_ITEMS][MAX_COLUMNS][MAX_MENU_LINE]; + char m_szHeader[MAX_COLUMNS][MAX_MENU_LINE]; + float m_fPosX; + float m_fPosY; + float m_fFirstColumnWidth; + float m_fSecondColumnWidth; + unsigned char m_nColumns; + Interaction m_interaction; + unsigned char m_nColumnCount[MAX_COLUMNS]; + GTAREF m_panel; + + CMenu(float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const Interaction* pInteraction); + CMenu() { + Hide(); + } + + void SetTitle(const char* szText); + void AddItem(NUMBER nColumn, NUMBER nRow, const char* szText); + void SetColumnTitle(NUMBER nColumn, const char* szText); + void Hide(); + char* GetItem(NUMBER nColumn, NUMBER nRow); + char* GetTitle(); + char* MS(NUMBER nColumn, NUMBER nRow); + char GetActiveRow(); + void Show(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CMenuPool.h b/include/sampapi/0.3.7-R5-1/CMenuPool.h new file mode 100644 index 00000000..39160ee2 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CMenuPool.h @@ -0,0 +1,37 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CMenu.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CMenuPool { +public: + enum { MAX_MENUS = 128 }; + + CMenu* m_pObject[MAX_MENUS]; + BOOL m_bNotEmpty[MAX_MENUS]; + NUMBER m_nCurrent; + bool m_bCanceled; + + CMenuPool(); + ~CMenuPool(); + + CMenu* Create(NUMBER nId, float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const CMenu::Interaction* pInteraction); + BOOL Delete(NUMBER nId); + void Show(NUMBER nId); + void Hide(NUMBER nId); + char* GetTextPointer(const char* szName); + void Process(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CNetGame.h b/include/sampapi/0.3.7-R5-1/CNetGame.h new file mode 100644 index 00000000..ab12ed38 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CNetGame.h @@ -0,0 +1,173 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CPlayerPool.h" +#include "sampapi/0.3.7-R5-1/CVehiclePool.h" +#include "sampapi/0.3.7-R5-1/CGangZonePool.h" +#include "sampapi/0.3.7-R5-1/CPickupPool.h" +#include "sampapi/0.3.7-R5-1/CLabelPool.h" +#include "sampapi/0.3.7-R5-1/CMenuPool.h" +#include "sampapi/0.3.7-R5-1/CTextDrawPool.h" +#include "sampapi/0.3.7-R5-1/CActorPool.h" +#include "sampapi/0.3.7-R5-1/CObjectPool.h" + +struct Packet; +struct NetworkID; +class RakClientInterface; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +enum MarkersMode { + MARKERS_MODE_OFF, + MARKERS_MODE_GLOBAL, + MARKERS_MODE_STREAMED +}; + +class SAMPAPI_EXPORT CNetGame { +public: + enum GameMode { + GAME_MODE_WAITCONNECT = 0x1, + GAME_MODE_CONNECTING = 0x2, + GAME_MODE_CONNECTED = 0x5, + GAME_MODE_WAITJOIN = 0x6, + GAME_MODE_RESTARTING = 0xB + }; + enum { + NETMODE_STATS_UPDATE_DELAY = 1000, + NETMODE_INCAR_SENDRATE = 30, // passenger/trailer/incar/unoccupied + NETMODE_ONFOOT_SENDRATE = 30, // onfoot/unoccupied + NETMODE_FIRING_SENDRATE = 30, + LANMODE_INCAR_SENDRATE = 15, + LANMODE_ONFOOT_SENDRATE = 15, + NETMODE_SEND_MULTIPLIER = 2, + NETMODE_AIM_UPDATE_DELAY = 500, + NETMODE_HEAD_UPDATE_DELAY = 1000, + NETMODE_TARGET_UPDATE_DELAY = 100, + NETMODE_PLAYERS_UPDATE_DELAY = 3000, + }; + + struct SAMPAPI_EXPORT Pools { + CVehiclePool* m_pVehicle; + CPlayerPool* m_pPlayer; + CPickupPool* m_pPickup; + CObjectPool* m_pObject; + CActorPool* m_pActor; + CGangZonePool* m_pGangZone; + CLabelPool* m_pLabel; + CTextDrawPool* m_pTextDraw; + CMenuPool* m_pMenu; + }; + + struct SAMPAPI_EXPORT Settings { + bool m_bUseCJWalk; + unsigned int m_nDeadDropsMoney; + float m_fWorldBoundaries[4]; + bool m_bAllowWeapons; + float m_fGravity; + bool m_bEnterExit; + BOOL m_bVehicleFriendlyFire; + bool m_bHoldTime; + bool m_bInstagib; + bool m_bZoneNames; + bool m_bFriendlyFire; + BOOL m_bClassesAvailable; + float m_fNameTagsDrawDist; + bool m_bManualVehicleEngineAndLight; + unsigned char m_nWorldTimeHour; + unsigned char m_nWorldTimeMinute; + unsigned char m_nWeather; + bool m_bNoNametagsBehindWalls; + int m_nPlayerMarkersMode; + float m_fChatRadius; + bool m_bNameTags; + bool m_bLtdChatRadius; + }; + + RakClientInterface* m_pRakClient; + char pad_0[44]; + char m_szHostAddress[257]; + char m_szHostname[257]; + bool m_bDisableCollision; + bool m_bUpdateCameraTarget; + bool m_bNametagStatus; + int m_nPort; + BOOL m_bLanMode; + GTAREF m_aMapIcons[100]; + int m_nGameState; + TICK m_lastConnectAttempt; + Settings* m_pSettings; + char pad_2[5]; + Pools* m_pPools; + + static SAMPAPI_EXPORT SAMPAPI_VAR TICK& RefLastPlayersUpdateRequest(); + + CNetGame(const char* szHostAddress, int nPort, const char* szNick, const char* szPass); + ~CNetGame(); + + CPickupPool* GetPickupPool(); + CMenuPool* GetMenuPool(); + void SetState(int nValue); + void InitializePools(); + void InitialNotification(); + void InitializeGameLogic(); + void Connect(); + void SpawnScreen(); + void Packet_RSAPublicKeyMismatch(Packet* pPacket); + void Packet_ConnectionBanned(Packet* pPacket); + void Packet_ConnectionRequestAcepted(Packet* pPacket); + void Packet_NoFreeIncomingConnections(Packet* pPacket); + void Packet_DisconnectionNotification(Packet* pPacket); + void Packet_InvalidPassword(Packet* pPacket); + void Packet_ConnectionAttemptFailed(Packet* pPacket); + void UpdatePlayers(); + void DeleteMarker(NUMBER nIndex); + void ResetPlayerPool(); + void ResetVehiclePool(); + void ResetTextDrawPool(); + void ResetObjectPool(); + void ResetGangZonePool(); + void ResetPickupPool(); + void ResetMenuPool(); + void ResetLabelPool(); + void ResetActorPool(); + void Packet_UnoccupiedSync(Packet* pPacket); + void Packet_BulletSync(Packet* pPacket); + void Packet_AimSync(Packet* pPacket); + void Packet_PassengerSync(Packet* pPacket); + void Packet_TrailerSync(Packet* pPacket); + void Packet_MarkersSync(Packet* pPacket); + void Packet_AuthKey(Packet* pPacket); + void ResetMarkers(); + void CreateMarker(NUMBER nIndex, CVector position, char nIcon, int nColor, int nType); + void ResetPools(); + void ShutdownForRestart(); + void Packet_PlayerSync(Packet* pPacket); + void Packet_VehicleSync(Packet* pPacket); + void Packet_ConnectionLost(Packet* pPacket); + void Packet_ConnectionSucceeded(Packet* pPacket); + void UpdateNetwork(); + void Process(); + void ProcessGameStuff(); + CPlayerPool* GetPlayerPool(); + CObjectPool* GetObjectPool(); + CActorPool* GetActorPool(); + int GetState(); + BOOL LanMode(); + CVehiclePool* GetVehiclePool(); + RakClientInterface* GetRakClient(); + __int64 GetCounter(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CNetGame*& RefNetGame(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CNetStats.h b/include/sampapi/0.3.7-R5-1/CNetStats.h new file mode 100644 index 00000000..e6664655 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CNetStats.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CNetStats { +public: + unsigned long m_dwLastTotalBytesSent; + unsigned long m_dwLastTotalBytesRecv; + unsigned long m_dwLastUpdateTick; + unsigned long m_dwBPSUpload; + unsigned long m_dwBPSDownload; + IDirect3DDevice9* m_pDevice; + + CNetStats(IDirect3DDevice9* pDevice); + + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CNetStats*& RefNetStats(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CObject.h b/include/sampapi/0.3.7-R5-1/CObject.h new file mode 100644 index 00000000..e73761cb --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CObject.h @@ -0,0 +1,132 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/0.3.7-R5-1/CEntity.h" + +class CSprite2d; +struct RwTexture; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class CVehicle; + +class SAMPAPI_EXPORT CObject : public CEntity { +public: + // void **m_lpVtbl = 0xECD1C; + char pad_0[6]; + int m_nModel; + char pad_1; + bool m_bDontCollideWithCamera; + float m_fDrawDistance; + float field_0; + CVector m_position; + float m_fDistanceToCamera; + bool m_bDrawLast; + char pad_2[64]; + CVector m_rotation; + char pad_3[5]; + ID m_nAttachedToVehicle; + ID m_nAttachedToObject; + CVector m_attachOffset; + CVector m_attachRotation; + bool m_bSyncRotation; + CMatrix m_targetMatrix; + char pad_4[148]; + char m_bMoving; + float m_fSpeed; + char pad_5[99]; + + enum { + MAX_MATERIALS = 16 + }; + enum MaterialType { + MATERIAL_TYPE_NONE = 0, + MATERIAL_TYPE_TEXTURE = 1, + MATERIAL_TYPE_TEXT = 2 + }; + enum MaterialSize { + MATERIAL_SIZE_32X32 = 10, + MATERIAL_SIZE_64X32 = 20, + MATERIAL_SIZE_64X64 = 30, + MATERIAL_SIZE_128X32 = 40, + MATERIAL_SIZE_128X64 = 50, + MATERIAL_SIZE_128X128 = 60, + MATERIAL_SIZE_256X32 = 70, + MATERIAL_SIZE_256X64 = 80, + MATERIAL_SIZE_256X128 = 90, + MATERIAL_SIZE_256X256 = 100, + MATERIAL_SIZE_512X64 = 110, + MATERIAL_SIZE_512X128 = 120, + MATERIAL_SIZE_512X256 = 130, + MATERIAL_SIZE_512X512 = 140 + }; + + struct SAMPAPI_EXPORT ObjectMaterial { + union { + ::CSprite2d* m_pSprite[MAX_MATERIALS]; + ::RwTexture* m_pTextBackground[MAX_MATERIALS]; + }; + + D3DCOLOR m_color[MAX_MATERIALS]; + char pad_6[68]; + int m_nType[MAX_MATERIALS]; + BOOL m_bTextureWasCreated[MAX_MATERIALS]; + + struct SAMPAPI_EXPORT MaterialText { + char m_nMaterialIndex; + char pad_0[137]; + char m_nMaterialSize; + char m_szFont[65]; + char m_nFontSize; + bool m_bBold; + D3DCOLOR m_fontColor; + D3DCOLOR m_backgroundColor; + char m_align; + }; + MaterialText m_textInfo[MAX_MATERIALS]; + char* m_szText[MAX_MATERIALS]; + IDirect3DTexture9* m_pBackgroundTexture[MAX_MATERIALS]; + IDirect3DTexture9* m_pTexture[MAX_MATERIALS]; + }; + ObjectMaterial m_material; + + BOOL m_bHasCustomMaterial; + char pad_9[13]; + + CObject(int nModel, CVector position, CVector rotation, float fDrawDistance, int a10, char a11, char a12); + + virtual ~CObject() = 0; + virtual void Add() = 0; + virtual void Remove() = 0; + + float GetDistance(const CMatrix* pMatrix); + void Stop(); + void SetRotation(const CVector* pVector); + void SetAttachedToVehicle(ID nId, const CVector* pOffset, const CVector* pRotation); + void SetAttachedToObject(ID nId, const CVector* pOffset, const CVector* pRotation, char a5); + void AttachToVehicle(CVehicle* pVehicle); + void AttachToObject(CObject* pObject); + void Rotate(CVector vector); + BOOL AttachedToMovingEntity(); + void SetMaterial(int nModel, int nIndex, const char* szTxd, const char* szTexture, D3DCOLOR color); + void SetMaterialText(int nIndex, const char* szText, char nMaterialSize, const char* szFont, char nFontSize, bool bBold, D3DCOLOR fontColor, D3DCOLOR backgroundColor, char align); + bool GetMaterialSize(int nSize, int* x, int* y); + void Render(); + void Process(float fElapsedTime); + void ConstructMaterialText(); + void Draw(); + void ShutdownMaterialText(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CObjectEdit.h b/include/sampapi/0.3.7-R5-1/CObjectEdit.h new file mode 100644 index 00000000..ceefdce5 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CObjectEdit.h @@ -0,0 +1,100 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , kin4stat, Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/CRect.h" +#include "sampapi/CPoint.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +enum ObjectEditType { + OBJECT_EDIT_TYPE_NONE = 0x0, + OBJECT_EDIT_TYPE_ATTACHEDOBJECT = 0x2, + OBJECT_EDIT_TYPE_OBJECT = 0x1, +}; + +enum ObjectEditMode { + OBJECT_EDIT_MODE_POSITION = 0x0, + OBJECT_EDIT_MODE_ROTATION = 0x1, + OBJECT_EDIT_MODE_SCALE = 0x2, +}; + +enum ObjectEditProcessType { + OBJECT_EDIT_PROCESS_TYPE_XAXIS = 0x0, + OBJECT_EDIT_PROCESS_TYPE_YAXIS = 0x1, + OBJECT_EDIT_PROCESS_TYPE_ZAXIS = 0x2, + OBJECT_EDIT_PROCESS_TYPE_SETPOSITION = 0x3, + OBJECT_EDIT_PROCESS_TYPE_SETROTATION = 0x4, + OBJECT_EDIT_PROCESS_TYPE_SETSCALE = 0x5, + OBJECT_EDIT_PROCESS_TYPE_SAVE = 0xA, +}; + +class CObjectEdit { +public: + CPoint m_CharMaxSize; + CRect m_xAxisButtonRect; + CRect m_yAxisButtonRect; + CRect m_zAxisButtonRect; + CRect m_PositionButtonRect; + CRect m_RotationButtonRect; + CRect m_ScaleButtonRect; + CRect m_SaveButtonRect; + int m_nEditType; + int m_nEditMode; + BOOL m_bEnabled; + BOOL m_bRenderedThisFrame; + ID m_nEditObjectId; + unsigned int m_nAttachedObjectIndex; + BOOL m_bIsPlayerObject; + CVector m_vRotation; + unsigned int m_nLastSentNotificationTick; + bool m_bRenderScaleButton; + bool m_bEditingRightNow; + bool m_bTopXOfObjectIsOnLeftOfScreen; + bool m_bTopYOfObjectIsOnLeftOfScreen; + bool m_bTopZOfObjectIsOnLeftOfScreen; + CPoint m_EditStartPos; + CPoint m_CursorPosInGame; + BOOL m_bObjectXSizeYCoordDiffMoreThanX; + BOOL m_bObjectYSizeYCoordDiffMoreThanX; + BOOL m_bObjectZSizeYCoordDiffMoreThanX; + CMatrix m_entityMatrix; + IDirect3DDevice9* m_pDevice; + ID3DXLine* m_pLine; + ID3DXFont* m_pIconFontSmall; + ID3DXFont* m_pIconFontBig; + int m_nProcessType; + + CObjectEdit(IDirect3DDevice9* RefDevice); + float WorldToScreen(CVector* in, float*); + int RenderAxes(CMatrix* a2, float linesize); + const char* GetRenderChar(BOOL for_big_font); + void TryChangeProcessType(); + void SetEditMode(ObjectEditMode mode); + void ResetMousePos(); + void EnterEditObject(ID object_id, BOOL player_object); + void SendEditEndNotification(int response); + void SendAttachedEditEndNotification(int response); + void Disable(BOOL result); + BOOL RenderControlsForObject(CMatrix* object_matrix, float linesize); + void ApplyChanges(ObjectEditProcessType type, float diff); + void ProcessMouseMove(); + BOOL MsgProc(int uMsg, int wParam, int lParam); + void Render(); + + static const char* GetMaxSizeChar(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectEdit*& RefObjectEdit(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CObjectMaterialText.h b/include/sampapi/0.3.7-R5-1/CObjectMaterialText.h new file mode 100644 index 00000000..d7554ca8 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CObjectMaterialText.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CObjectMaterialText { +public: + IDirect3DDevice9* m_pDevice; + ID3DXSprite* m_pSprite; + ID3DXSprite* m_pSprite_0; // maybe unused + + CObjectMaterialText(IDirect3DDevice9* pDevice); + ~CObjectMaterialText(); + + void OnResetDevice(); + void OnLostDevice(); + IDirect3DTexture9* Create(const char* szText, const char* szFont, char nFontSize, int nBgSizeX, int nBgSizeY, D3DCOLOR fontColor, D3DCOLOR bgColor, bool bBold, char align); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectMaterialText*& RefObjectMaterialTextManager(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CObjectPool.h b/include/sampapi/0.3.7-R5-1/CObjectPool.h new file mode 100644 index 00000000..49738081 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CObjectPool.h @@ -0,0 +1,45 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CObject.h" + +class CObject; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CObjectPool { +public: + enum { MAX_OBJECTS = 1000 }; + + int m_nLargestId; + BOOL m_bNotEmpty[MAX_OBJECTS]; + CObject* m_pObject[MAX_OBJECTS]; + + CObjectPool(); + ~CObjectPool(); + + void UpdateLargestId(); + int GetCount(); + BOOL Delete(ID nId); + BOOL Create(ID nId, int nModel, CVector position, CVector rotation, float fDrawDistance); + CObject* Find(::CObject* pGameObject); + int GetId(::CObject* pGameObject); + void Process(); + void ConstructMaterials(); + void ShutdownMaterials(); + void Draw(); + void DrawLast(); + CObject* Get(ID nId); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CObjectSelection.h b/include/sampapi/0.3.7-R5-1/CObjectSelection.h new file mode 100644 index 00000000..08868047 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CObjectSelection.h @@ -0,0 +1,33 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CObjectSelection { +public: + BOOL m_bIsActive; + ID m_nHoveredObject; + + CObjectSelection(); + + ID DefineObject(); + void DrawLabels(); + void Enable(BOOL bEnable); + void Draw(); + void SendNotification(); // enter + BOOL MsgProc(int uMsg, int wParam, int lParam); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectSelection*& RefObjectSelection(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CPed.h b/include/sampapi/0.3.7-R5-1/CPed.h new file mode 100644 index 00000000..e8f28314 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CPed.h @@ -0,0 +1,189 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CEntity.h" +#include "sampapi/0.3.7-R5-1/AimStuff.h" +#include "sampapi/0.3.7-R5-1/ControllerState.h" + +class CPed; +class CWeapon; +class CEntity; +class CVehicle; +class CWeaponInfo; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CPed : public CEntity { +public: + enum { MAX_ACCESSORIES = 10 }; + enum StuffType { + STUFF_TYPE_NONE, + STUFF_TYPE_BEER, + STUFF_TYPE_DYN_BEER, + STUFF_TYPE_PINT_GLASS, + STUFF_TYPE_CIGGI + }; + + struct SAMPAPI_EXPORT Accessory { + int m_nModel; + int m_nBone; + CVector m_offset; + CVector m_rotation; + CVector m_scale; + D3DCOLOR m_firstMaterialColor; + D3DCOLOR m_secondMaterialColor; + }; + + // void **m_lpVtbl = 0xED140; + BOOL m_bUsingCellphone; + + struct SAMPAPI_EXPORT { + BOOL m_bNotEmpty[MAX_ACCESSORIES]; + Accessory m_info[MAX_ACCESSORIES]; + class CObject* m_pObject[MAX_ACCESSORIES]; + } m_accessories; + + ::CPed* m_pGamePed; + unsigned int pad_2a8[2]; + unsigned char m_nPlayerNumber; + unsigned int pad_2b1[2]; + GTAREF m_parachuteObject; + GTAREF m_urinatingParticle; + + struct SAMPAPI_EXPORT { + int m_nType; + GTAREF m_object; + unsigned int m_nDrunkLevel; + } m_stuff; + + GTAREF m_arrow; + unsigned char field_2de; + BOOL m_bDoesDancing; + unsigned int m_nDanceStyle; + unsigned int m_nLastDanceMove; + unsigned char pad_2de[20]; + BOOL m_bDoesUrinating; + unsigned char pad[55]; + + CPed(); + CPed(int nPlayerNumber, int nModel, CVector position, float fRotation); + + virtual ~CPed() = 0; + + void ResetPointers(); + void SetInitialState(); + AimStuff::Aim* GetAim(); + void SetAim(const AimStuff::Aim* pAim); + char GetCurrentWeapon(); + GTAREF GetVehicleRef(); + void DeleteArrow(); + BOOL IsOnScreen(); + void SetImmunities(BOOL BP, BOOL FP, BOOL EP, BOOL CP, BOOL MP); + float GetHealth(); + void SetHealth(float fValue); + float GetArmour(); + void SetArmour(float fValue); + int GetFlags(); + void SetFlags(int nValue); + BOOL IsDead(); + char GetState(); + void SetState(char nValue); + float GetRotation(); + void ForceRotation(float fValue); + void SetRotation(float fValue); + BOOL IsPassenger(); + ::CVehicle* GetVehicle(); + void ClearWeapons(); + void SetArmedWeapon(int nWeapon, bool bGameFunc = true); + void RemoveWeaponWhenEnteringVehicle(); + ::CWeapon* GetCurrentWeaponSlot(); + BOOL CurrentWeaponHasAmmo(); + float GetDistanceToEntity(const CEntity* pEntity); + int GetVehicleSeatIndex(); + void PutIntoVehicle(GTAREF vehicle, int nSeat); + void EnterVehicle(GTAREF vehicle, BOOL bAsPassenger); + void ExitVehicle(); + void WarpFromVehicle(CVector putAt); + void SetSpawnInfo(const CVector* pPosition, float fRotation); + void SetControllable(BOOL bEnable); + char GetDeathInfo(ID* pKiller); + ::CEntity* GetFloor(); + ::CWeaponInfo* GetCurrentWeaponInfo(); + void HandsUp(); + BOOL DoesHandsUp(); + void HoldObject(int nModel); + void EnableJetpack(); + void DisableJetpack(); + BOOL HasJetpack(); + BOOL EnablePassengerDrivebyMode(); + void Extinguish(); + unsigned short GetCurrentWeaponAmmo(); + ::CWeapon* GetWeaponSlot(int nWeapon); + void SetWalkStyle(const char* szName); + void PerformAnimation(const char* szName, const char* szFile, float fFramedelta, int loopa, int nLockX, int nLockY, int nLockF, int nTime); + void LinkToInterior(char nId, BOOL bRefresh); + void DestroyParachute(); + BOOL OpenParachute(); // create + void ProcessParachuteEvent(const char* szName); + BOOL IsOnGround(); + void ResetDamageEntity(); + void RemoveWeaponModel(int nWeapon); + float GetAimZ(); + void SetAimZ(float fValue); + ::CEntity* GetContactEntity(); + ::CVehicle* GetContactVehicle(); + int GetStat(); + BOOL PerformingCustomAnimation(); + void StartDancing(int nStyle); + void StopDancing(); + BOOL DoesDancing(); + const char* GetAnimationForDance(int nMove); + void DropStuff(); + int GetStuff(); // type + BOOL ApplyStuff(); + void ProcessDrunk(); + int GetDrunkLevel(); + void SetDrunkLevel(int nValue); + void ApplyCommandTask(const char* szName, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11); + void DestroyCommandTask(); + void EnableCellphone(BOOL bEnable); + BOOL UsingCellphone(); + void SetFightingStyle(int nStyle); + void StartUrinating(); + void StopUrinating(); + BOOL DoesUrinating(); + const char* GetLoadedShoppingDataSubsection(); + void LoadShoppingDataSubsection(const char* szName); + ::CPed* GetAimedPed(); + void SetKeys(short controllerState, short sLeftStickX, short sLeftStickY); + short GetKeys(short* pLeftStickX, short* pLeftStickY); + void CreateArrow(int nColor); + void SetModelIndex(int nModel); + void Kill(); + void SetWeaponAmmo(unsigned char nWeapon, unsigned short nAmmo); + void ProcessDancing(); + void GiveStuff(int nType); + void Destroy(); + void SetCameraMode(char nMode); + void SetCameraExtZoomAndAspectRatio(float fExtZoom, float fAspectRatio); + BOOL HasAccessory(); + void DeleteAccessory(int nSlot); + BOOL GetAccessoryState(int nSlot); + void DeleteAllAccessories(); + void AddAccessory(int nSlot, const Accessory* pInfo); + CObject* GetAccessory(int nSlot); + char GetCameraMode(); + void GetBonePosition(unsigned int boneId, CVector* outPosition); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CPickupPool.h b/include/sampapi/0.3.7-R5-1/CPickupPool.h new file mode 100644 index 00000000..7a7b743e --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CPickupPool.h @@ -0,0 +1,51 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT Pickup { + int m_nModel; + int m_nType; + CVector m_position; +}; + +struct SAMPAPI_EXPORT WeaponPickup { + bool m_bExists; + ID m_nExOwner; +}; + +class SAMPAPI_EXPORT CPickupPool { +public: + enum { MAX_PICKUPS = 4096 }; + + int m_nCount; + GTAREF m_handle[MAX_PICKUPS]; + int m_nId[MAX_PICKUPS]; + unsigned long m_nTimer[MAX_PICKUPS]; + WeaponPickup m_weapon[MAX_PICKUPS]; + Pickup m_object[MAX_PICKUPS]; + + CPickupPool(); + ~CPickupPool(); + + void Create(Pickup* pData, int nId); + void CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner); + void Delete(int nId); + void DeleteWeapon(ID nExOwner); + int GetIndex(int nId); + void SendNotification(int nId); + void Process(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CPlayerInfo.h b/include/sampapi/0.3.7-R5-1/CPlayerInfo.h new file mode 100644 index 00000000..7720f6c1 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CPlayerInfo.h @@ -0,0 +1,37 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CRemotePlayer.h" +#include + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CPlayerInfo { +public: + int pad_0; + int m_nScore; + BOOL m_bIsNPC; + int m_nPing; + CRemotePlayer* m_pPlayer; +#ifndef _DEBUG +private: + int __aling; + +public: +#endif + std::string m_szNick; + + CPlayerInfo(const char* szName, BOOL bIsNPC); + ~CPlayerInfo(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CPlayerPool.h b/include/sampapi/0.3.7-R5-1/CPlayerPool.h new file mode 100644 index 00000000..b0d80404 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CPlayerPool.h @@ -0,0 +1,72 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CPlayerInfo.h" +#include "sampapi/0.3.7-R5-1/CLocalPlayer.h" +#include + +class CPed; +class CObject; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CPlayerPool { +public: + enum { MAX_PLAYERS = 1004 }; + + struct SAMPAPI_EXPORT { + int m_nScore; + ID m_nId; +#ifndef _DEBUG + private: + int __align; + + public: +#endif + std::string m_szName; + int m_nPing; + CLocalPlayer* m_pObject; + } m_localInfo; + + BOOL m_bNotEmpty[MAX_PLAYERS]; + BOOL m_bPrevCollisionFlag[MAX_PLAYERS]; + CPlayerInfo* m_pObject[MAX_PLAYERS]; + int m_nLargestId; + + CPlayerPool(); + ~CPlayerPool(); + + void UpdateLargestId(); + void Process(); + ID Find(::CPed* pGamePed); + void Deactivate(); + void ForceCollision(); + void RestoreCollision(); + BOOL Delete(ID nId, int nReason = SAMPAPI_UNUSED); + BOOL Create(ID nId, const char* szName, BOOL bIsNPC); + CRemotePlayer* GetPlayer(ID nId); + const char* GetLocalPlayerName(); + BOOL IsDisconnected(ID nId); + BOOL IsConnected(ID nId); + void SetLocalPlayerName(const char* szName); + void SetAt(ID nId, CPlayerInfo* pObject); + int GetScore(ID nId); + int GetPing(ID nId); + const char* GetName(ID nId); + int GetLocalPlayerPing(); + int GetLocalPlayerScore(); + int GetCount(BOOL bIncludeNPC = 0); + CLocalPlayer* GetLocalPlayer(); + CObject* FindAccessory(::CObject* pGameObject); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CPlayerTags.h b/include/sampapi/0.3.7-R5-1/CPlayerTags.h new file mode 100644 index 00000000..7bc73b5d --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CPlayerTags.h @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CPlayerTags { +public: + IDirect3DDevice9* m_pDevice; + IDirect3DStateBlock9* m_pStates; + ID3DXSprite* m_pSprite; + + CPlayerTags(IDirect3DDevice9* pDevice); + ~CPlayerTags(); + + void EndHealthBar(); + void BeginLabel(); + void EndLabel(); + void DrawLabel(CVector* pPosition, const char* szText, D3DCOLOR color, float fDistanceToCamera, bool bDrawStatus, int nStatus); + void DrawHealthBar(CVector* pPosition, float fHealth, float fArmour, float fDistanceToCamera); + void OnLostDevice(); + void OnResetDevice(); + void BeginHealthBar(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CPlayerTags*& RefPlayerTags(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CRemotePlayer.h b/include/sampapi/0.3.7-R5-1/CRemotePlayer.h new file mode 100644 index 00000000..4870169a --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CRemotePlayer.h @@ -0,0 +1,137 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CPed.h" +#include "sampapi/CMatrix.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/Synchronization.h" +#include "sampapi/0.3.7-R5-1/CVehicle.h" +#include "sampapi/0.3.7-R5-1/Animation.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CRemotePlayer { +public: + enum PlayerState { + PLAYER_STATE_NONE, + PLAYER_STATE_ONFOOT = 17, + PLAYER_STATE_DRIVER = 19, + PLAYER_STATE_PASSENGER = 18, + PLAYER_STATE_WASTED = 32, + PLAYER_STATE_SPAWNED = 33, + }; + enum UpdateType { + UPDATE_TYPE_NONE, + UPDATE_TYPE_ONFOOT = 16, + UPDATE_TYPE_INCAR = 17, + UPDATE_TYPE_PASSENGER = 18, + }; + enum PlayerStatus { PLAYER_STATUS_TIMEOUT = 2 }; + + int field_1; + BOOL m_bDrawLabels; + BOOL m_bHasJetpack; + unsigned char m_nSpecialAction; + char pad_2[12]; + Synchronization::IncarData m_incarData; + Synchronization::TrailerData m_trailerData; + Synchronization::AimData m_aimData; + Synchronization::PassengerData m_passengerData; + Synchronization::OnfootData m_onfootData; + unsigned char m_nTeam; + unsigned char m_nState; + unsigned char m_nSeatId; + int field_3; + BOOL m_bPassengerDriveBy; + char pad_1[76]; + CVector m_positionDifference; + struct SAMPAPI_EXPORT { + float real; + CVector imag; + } m_incarTargetRotation; + CVector m_onfootTargetPosition; + CVector m_onfootTargetSpeed; + CVector m_incarTargetPosition; + CVector m_incarTargetSpeed; + float m_fReportedArmour; + float m_fReportedHealth; + Animation m_animation; + unsigned char m_nUpdateType; + TICK m_lastUpdate; + TICK m_lastTimestamp; + BOOL m_bPerformingCustomAnimation; + int m_nStatus; + + struct SAMPAPI_EXPORT { + CVector m_direction; + TICK m_lastUpdate; + TICK m_lastLook; + } m_head; + + CPed* m_pPed; + CVehicle* m_pVehicle; + ID m_nId; + ID m_nVehicleId; + + BOOL m_bMarkerState; + + struct SAMPAPI_EXPORT { + int x, y, z; + } m_markerPosition; + + GTAREF m_marker; + + CRemotePlayer(); + ~CRemotePlayer(); + + void ProcessHead(); + void SetMarkerState(BOOL bState); + void SetMarkerPosition(int x, int y, int z); + BOOL SurfingOnVehicle(); + BOOL SurfingOnObject(); + void ProcessSurfing(); + void OnEnterVehicle(); + void OnExitVehicle(); + void ProcessSpecialAction(); + void UpdateOnfootSpeedAndPosition(); + void UpdateOnfootRotation(); + void SetOnfootTargetSpeedAndPosition(CVector* pPosition, CVector* pSpeed); + void UpdateIncarSpeedAndPosition(); + void UpdateIncarRotation(); + void SetIncarTargetSpeedAndPosition(CMatrix* pMatrix, CVector* pPosition, CVector* pSpeed); + void UpdateTrain(CMatrix* pMatrix, CVector* pSpeed, float fSpeed); + void Update(Synchronization::AimData* pData); + void Update(Synchronization::UnoccupiedData* pData); + void Update(Synchronization::TrailerData* pData); + void ResetData(); + float GetDistanceToPlayer(CRemotePlayer* pPlayer); + float GetDistanceToLocalPlayer(); + void SetColor(D3DCOLOR color); // rgba + D3DCOLOR GetColorAsRGBA(); + D3DCOLOR GetColorAsARGB(); + void EnterVehicle(ID nId, BOOL bPassenger); + void ExitVehicle(); + void ChangeState(char nOld, char nNew); + int GetStatus(); + void Update(Synchronization::BulletData* pData); + void Process(); + BOOL Spawn(/* unused */ int a2, int nModel, /* unused */ int a4, CVector* pPosition, float fRotation, D3DCOLOR color, char nFightingStyle); + void Update(Synchronization::OnfootData* pData, TICK timestamp); + void Update(Synchronization::IncarData* pData, TICK timestamp); + void Update(Synchronization::PassengerData* pData, TICK timestamp = SAMPAPI_UNUSED); + void Remove(); + void Kill(); + void Chat(const char* szText); + BOOL DoesExist(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CScoreboard.h b/include/sampapi/0.3.7-R5-1/CScoreboard.h new file mode 100644 index 00000000..f53326d4 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CScoreboard.h @@ -0,0 +1,45 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CScoreboard { +public: + BOOL m_bIsEnabled; + int m_nPlayerCount; + float m_position[2]; + float m_fScalar; + float m_size[2]; + float pad_[5]; + IDirect3DDevice9* m_pDevice; + CDXUTDialog* m_pDialog; + CDXUTListBox* m_pListbox; + int m_nCurrentOffset; + BOOL m_bIsSorted; + + CScoreboard(IDirect3DDevice9* pDevice); + + void Recalc(); + void GetRect(CRect* pRect); + void Close(bool bHideCursor); + void ResetDialogControls(CDXUTDialog* pDialog); + void SendNotification(); + void UpdateList(); + void Draw(); + void Enable(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CScoreboard*& RefScoreboard(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CSpawnScreen.h b/include/sampapi/0.3.7-R5-1/CSpawnScreen.h new file mode 100644 index 00000000..bddab930 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CSpawnScreen.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CFonts.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CSpawnScreen { +public: + BOOL m_bEnabled; + char* m_szSpawnText; + CFonts* m_pFont; + IDirect3DDevice9* m_pDevice; + IDirect3DTexture9* m_pTexture; + IDirect3DStateBlock9* m_pStateBlockSaved; + IDirect3DStateBlock9* m_pStateBlockDraw; + ID3DXSprite* m_pSprite; + + CSpawnScreen(IDirect3DDevice9* pDevice); + ~CSpawnScreen(); + + void SetText(const char* szString); + void OnResetDevice(); + void OnLostDevice(); + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CSpawnScreen*& RefSpawnScreen(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CSrvNetStats.h b/include/sampapi/0.3.7-R5-1/CSrvNetStats.h new file mode 100644 index 00000000..1469172d --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CSrvNetStats.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CSrvNetStats { +public: + unsigned long m_dwLastTotalBytesSent; + unsigned long m_dwLastTotalBytesRecv; + unsigned long m_dwLastUpdateTick; + unsigned long m_dwBPSUpload; + unsigned long m_dwBPSDownload; + IDirect3DDevice9* m_pDevice; + + CSrvNetStats(IDirect3DDevice9* pDevice); + + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CSrvNetStats*& RefServerNetStatistics(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CTextDraw.h b/include/sampapi/0.3.7-R5-1/CTextDraw.h new file mode 100644 index 00000000..b670f09c --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CTextDraw.h @@ -0,0 +1,99 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CTextDraw { +public: + struct SAMPAPI_EXPORT Transmit { + union { + struct { + unsigned char m_bBox : 1; + unsigned char m_bLeft : 1; + unsigned char m_bRight : 1; + unsigned char m_bCenter : 1; + unsigned char m_bProportional : 1; + }; + unsigned char m_nFlags; + }; + float m_fLetterWidth; + float m_fLetterHeight; + D3DCOLOR m_letterColor; + float m_fBoxWidth; + float m_fBoxHeight; + D3DCOLOR m_boxColor; + unsigned char m_nShadow; + bool m_bOutline; + D3DCOLOR m_backgroundColor; + unsigned char m_nStyle; + unsigned char is_selectable; + float m_fX; + float m_fY; + unsigned short m_nModel; + CVector m_rotation; + float m_fZoom; + unsigned short m_aColor[2]; + }; + + struct SAMPAPI_EXPORT Data { + float m_fLetterWidth; + float m_fLetterHeight; + D3DCOLOR m_letterColor; + unsigned char unknown; + unsigned char m_bCenter; + unsigned char m_bBox; + float m_fBoxSizeX; + float m_fBoxSizeY; + D3DCOLOR m_boxColor; + unsigned char m_nProportional; + D3DCOLOR m_backgroundColor; + unsigned char m_nShadow; + unsigned char m_nOutline; + unsigned char m_bLeft; + unsigned char m_bRight; + int m_nStyle; + float m_fX; + float m_fY; + unsigned char pad_[8]; + unsigned long field_99B; + unsigned long field_99F; + unsigned long m_nIndex; + unsigned char is_selectable; + unsigned short m_nModel; + CVector m_rotation; + float m_fZoom; + unsigned short m_aColor[2]; + unsigned char field_9BE; + unsigned char drawn_this_frame; + unsigned char text_contains_keys; + unsigned long computed_left; + unsigned long computed_top; + unsigned long computed_right; + unsigned long computed_bottom; + unsigned char is_selected; + unsigned long color_if_selected; + }; + + char m_szText[801]; + char m_szString[1602]; + Data m_data; + + CTextDraw(Transmit* pData, const char* szText); + ~CTextDraw(); + + void SetText(const char* szText); + void Draw(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CTextDrawPool.h b/include/sampapi/0.3.7-R5-1/CTextDrawPool.h new file mode 100644 index 00000000..ed43042f --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CTextDrawPool.h @@ -0,0 +1,35 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.7-R5-1/CTextDraw.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CTextDrawPool { +public: + enum { + MAX_TEXTDRAWS = 2048, + MAX_LOCAL_TEXTDRAWS = 256 + }; + + BOOL m_bNotEmpty[MAX_TEXTDRAWS + MAX_LOCAL_TEXTDRAWS]; + CTextDraw* m_pObject[MAX_TEXTDRAWS + MAX_LOCAL_TEXTDRAWS]; + + CTextDrawPool(); + ~CTextDrawPool(); + + void Delete(ID nId); + void Draw(); + CTextDraw* Create(int nId, CTextDraw::Transmit* pData, const char* szText); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CTextDrawSelection.h b/include/sampapi/0.3.7-R5-1/CTextDrawSelection.h new file mode 100644 index 00000000..538d9b2b --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CTextDrawSelection.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CTextDrawSelection { +public: + BOOL m_bIsActive; + D3DCOLOR m_hoveredColor; + ID m_nHoveredId; + + CTextDrawSelection() { + m_bIsActive = false; + m_hoveredColor = -1; + m_nHoveredId = -1; + } + + ~CTextDrawSelection() { + if (m_bIsActive) + ResetTextDraws(); + } + + void ResetTextDraws(); + void RawProcess(); + void Process(); + void Enable(D3DCOLOR hoveredColor); + void SendNotification(); + void Disable(); + BOOL MsgProc(int uMsg, int wParam, int lParam); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CTextDrawSelection*& RefTextDrawSelection(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CVehicle.h b/include/sampapi/0.3.7-R5-1/CVehicle.h new file mode 100644 index 00000000..a16d2759 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CVehicle.h @@ -0,0 +1,114 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CEntity.h" + +class CVehicle; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CVehicle : public CEntity { +public: + enum { MAX_LICENSE_PLATE_TEXT = 32 }; + + // void **m_lpVtbl = 0xED728; + CVehicle* m_pTrailer; + ::CVehicle* m_pGameVehicle; + BOOL m_bEngineOn; + BOOL m_bIsLightsOn; + BOOL m_bIsInvulnerable; + int pad_5c; + BOOL m_bIsLocked; + bool m_bIsObjective; + BOOL m_bObjectiveBlipCreated; + TICK m_timeSinceLastDriven; + BOOL m_bHasBeenDriven; + int pad_71; + BOOL m_bEngineState; + unsigned char m_nPrimaryColor; + unsigned char m_nSecondaryColor; + BOOL m_bNeedsToUpdateColor; + BOOL m_bUnoccupiedSync; + BOOL m_bRemoteUnocSync; + BOOL m_bKeepModelLoaded; + BOOL m_bHasSiren; + IDirect3DTexture9* m_pLicensePlate; + char m_szLicensePlateText[MAX_LICENSE_PLATE_TEXT + 1]; + GTAREF m_marker; + + CVehicle(int nModel, CVector position, float fRotation, BOOL bKeepModelLoaded, BOOL bHasSiren); + + virtual ~CVehicle() = 0; + virtual void Add() = 0; + virtual void Remove() = 0; + + void ChangeInterior(int nId); + void ResetPointers(); + BOOL HasDriver(); + BOOL IsOccupied(); + void SetInvulnerable(BOOL bInv); + void SetLocked(BOOL block); + float GetHealth(); + void SetHealth(float fValue); + void SetColor(NUMBER nPrimary, NUMBER nSecondary); + void UpdateColor(); + int GetSubtype(); + BOOL IsSunk(); + BOOL IsWrecked(); + BOOL DriverIsPlayerPed(); + BOOL HasPlayerPed(); + BOOL IsTrainPart(); + BOOL HasTurret(); + void EnableSiren(bool bEnable); + BOOL SirenEnabled(); + void SetLandingGearState(BOOL bHide); + BOOL GetLandingGearState(); + void SetHydraThrusters(int nDirection); + int GetHydraThrusters(); + void ProcessMarkers(); + void Lock(BOOL bLock); + BOOL UpdateLastDrivenTime(); + float GetTrainSpeed(); + void SetTrainSpeed(float fValue); + void SetTires(char nState); + char GetTires(); + void UpdateDamage(int nPanels, int nDoors, char nLights); + int GetPanelsDamage(); + int GetDoorsDamage(); + char GetLightsDamage(); + void AttachTrailer(); + void DetachTrailer(); + void SetTrailer(CVehicle* pVehicle); + CVehicle* GetTrailer(); + CVehicle* GetTractor(); + BOOL IsTrailer(); + BOOL IsTowtruck(); + BOOL IsRC(); + void EnableLights(bool bEnable); + void RemovePassengers(); + BOOL AddComponent(unsigned short nId); + BOOL RemoveComponent(unsigned short nId); + void SetPaintjob(NUMBER nId); + BOOL DoesExist(); + void SetLicensePlateText(const char* szText); + void SetRotation(float fValue); + void ConstructLicensePlate(); + void ShutdownLicensePlate(); + BOOL HasSiren(); + char GetMaxPassengers(); + void SetWindowOpenFlag(NUMBER nDoorId); + void ClearWindowOpenFlag(NUMBER nDoorId); + void EnableEngine(BOOL bEnable); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/CVehiclePool.h b/include/sampapi/0.3.7-R5-1/CVehiclePool.h new file mode 100644 index 00000000..5a0256ae --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/CVehiclePool.h @@ -0,0 +1,83 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/CVehicle.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class SAMPAPI_EXPORT CVehiclePool { +public: + enum { + MAX_VEHICLES = 2000, + WAITING_LIST_SIZE = 100, + }; + struct SAMPAPI_EXPORT VehicleInfo { + ID m_nId; + int m_nType; + CVector m_position; + float m_fRotation; + NUMBER m_nPrimaryColor; + NUMBER m_nSecondaryColor; + float m_fHealth; + char m_nInterior; + int m_nDoorDamageStatus; + int m_nPanelDamageStatus; + char m_nLightDamageStatus; + bool m_bDoorsLocked; + bool m_bHasSiren; + }; + + int m_nCount; + + // vehicles that will be created after loading the model + struct SAMPAPI_EXPORT { + VehicleInfo m_entry[WAITING_LIST_SIZE]; + BOOL m_bNotEmpty[WAITING_LIST_SIZE]; + } m_waitingList; + + CVehicle* m_pObject[MAX_VEHICLES]; + BOOL m_bNotEmpty[MAX_VEHICLES]; + ::CVehicle* m_pGameObject[MAX_VEHICLES]; + unsigned int pad_6ef4[MAX_VEHICLES]; + ID m_nLastUndrivenId[MAX_VEHICLES]; // a player who send unoccupied sync data + TICK m_lastUndrivenProcessTick[MAX_VEHICLES]; + BOOL m_bIsActive[MAX_VEHICLES]; + BOOL m_bIsDestroyed[MAX_VEHICLES]; + TICK m_tickWhenDestroyed[MAX_VEHICLES]; + CVector m_spawnedAt[MAX_VEHICLES]; + BOOL m_bNeedsToInitializeLicensePlates; + + CVehiclePool(); + ~CVehiclePool(); + + void UpdateCount(); + BOOL Delete(ID nId); + void ChangeInterior(ID nId, int nInteriorId); + void SetParams(ID nId, bool bIsObjective, bool bIsLocked); + ID Find(::CVehicle* pGameObject); + GTAREF GetRef(int nId); + GTAREF GetRef(::CVehicle* pGameObject); + ID GetNearest(); + ID GetNearest(CVector point); + void AddToWaitingList(const VehicleInfo* pInfo); + void ConstructLicensePlates(); + void ShutdownLicensePlates(); + BOOL Create(VehicleInfo* pInfo); + void SendDestroyNotification(ID nId); + void ProcessWaitingList(); + void Process(); + CVehicle* Get(ID nId); + BOOL DoesExist(ID nId); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/Commands.h b/include/sampapi/0.3.7-R5-1/Commands.h new file mode 100644 index 00000000..770f4694 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/Commands.h @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V037R5_1 + +namespace Commands { + SAMPAPI_EXPORT void Default(const char*); + SAMPAPI_EXPORT void TestDeathWindow(const char*); + SAMPAPI_EXPORT void ToggleCameraTargetLabels(const char*); + SAMPAPI_EXPORT void SetChatPageSize(const char*); + SAMPAPI_EXPORT void SetChatFontSize(const char*); + SAMPAPI_EXPORT void DrawNameTagStatus(const char*); + SAMPAPI_EXPORT void DrawChatTimestamps(const char*); + SAMPAPI_EXPORT void ToggleAudioStreamMessages(const char*); + SAMPAPI_EXPORT void ToggleURLMessages(const char*); + SAMPAPI_EXPORT void ToggleHUDScaleFix(const char*); + SAMPAPI_EXPORT void PrintMemory(const char*); + SAMPAPI_EXPORT void SetFrameLimiter(const char*); + SAMPAPI_EXPORT void ToggleHeadMoves(const char*); + SAMPAPI_EXPORT void Quit(const char*); + SAMPAPI_EXPORT void CmpStat(const char*); //dummy + SAMPAPI_EXPORT void SavePosition(const char*); + SAMPAPI_EXPORT void SavePositionOnly(const char*); + SAMPAPI_EXPORT void PrintCurrentInterior(const char*); + SAMPAPI_EXPORT void ToggleObjectsLight(const char*); + SAMPAPI_EXPORT void ToggleDebugLabels(const char*); + SAMPAPI_EXPORT void SendRconCommand(const char*); + + namespace Debug { + SAMPAPI_EXPORT void SetPlayerSkin(const char*); + SAMPAPI_EXPORT void CreateVehicle(const char*); + SAMPAPI_EXPORT void EnableVehicleSelection(const char*); + SAMPAPI_EXPORT void SetWorldWeather(const char*); + SAMPAPI_EXPORT void SetWorldTime(const char*); + } // namespace Debug + + SAMPAPI_EXPORT void Setup(); +} // namespace Commands + +SAMPAPI_END diff --git a/include/sampapi/0.3.7-R5-1/ControllerState.h b/include/sampapi/0.3.7-R5-1/ControllerState.h new file mode 100644 index 00000000..4995b440 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/ControllerState.h @@ -0,0 +1,49 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT ControllerState { + short m_sLeftStickX; // move/steer left = -128, right = 128 + short m_sLeftStickY; // move back = 128, forwards = -128 + union { + struct { + unsigned char m_bLeftShoulder1 : 1; // fire weapon alt + unsigned char m_bShockButtonL : 1; // crouch + unsigned char m_bButtonCircle : 1; // fire weapon + unsigned char m_bButtonCross : 1; // sprint, accelerate + unsigned char m_bButtonTriangle : 1; // enter/exit vehicle + unsigned char m_bButtonSquare : 1; // jump, reverse + unsigned char m_bRightShoulder2 : 1; // look right (incar) + unsigned char m_bRightShoulder1 : 1; // hand brake, target + + unsigned char m_bLeftShoulder2 : 1; // look left + unsigned char m_bShockButtonR : 1; // look behind + unsigned char m_bPedWalk : 1; // walking + unsigned char m_bRightStickDown : 1; + unsigned char m_bRightStickUp : 1; + unsigned char m_bRightStickRight : 1; // num 4 + unsigned char m_bRightStickLeft : 1; // num 6 + // 16th bit is unused + }; + short m_value; + }; + + ControllerState() { + m_sLeftStickX = 0; + m_sLeftStickY = 0; + m_value = 0; + } +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/DebugScript.h b/include/sampapi/0.3.7-R5-1/DebugScript.h new file mode 100644 index 00000000..d67471d9 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/DebugScript.h @@ -0,0 +1,47 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +/* + commands: + CreateObject(int model, float posx, float posy, float posz, float rotx, float roty, float rotz); + SetPlayerInterior(int id); + RemoveBuildingForPlayer(int model, float posx, float posy, float posz, float radius); + SetPlayerCameraPos(float posx, float posy, float posz); + AddStaticVehicle/CreateVehicle(int model, float posx, float posy, float posz, float rot, int clr1, int clr2); + SetPlayerCameraLookAt() - dummy + + example: + CreateObject(11933, 0, 0, 10, 0, 0, 0, 100) + one line can contain only one command +*/ + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +class CObjectPool; + +namespace DebugScript { + enum { LINE_BUFFER_LENGTH = 256 }; + + SAMPAPI_EXPORT SAMPAPI_VAR CObjectPool*& RefPrivateObjectPool(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned short& RefObjectCount(); + SAMPAPI_EXPORT SAMPAPI_VAR CVector& RefNewCameraPos(); + + SAMPAPI_EXPORT void Initialize(const char* szFile); // delete old object pool before calling + SAMPAPI_EXPORT void ProcessLine(const char* szLine); + SAMPAPI_EXPORT char* GetCommandParams(char* szLine); // (...) + SAMPAPI_EXPORT void CreateVehicle(const char* szParams); + SAMPAPI_EXPORT void CreateObject(const char* szParams); +} // namespace DebugScript + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/Exception.h b/include/sampapi/0.3.7-R5-1/Exception.h new file mode 100644 index 00000000..32f87124 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/Exception.h @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +namespace Exception { + enum { MAX_EXCEPTIONS = 9 }; + + SAMPAPI_EXPORT SAMPAPI_VAR int& RefCount(); + SAMPAPI_EXPORT SAMPAPI_VAR void*& RefContextRecord(); // PCONTEXT + SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayCrashDialogText(); // [16384] + + SAMPAPI_EXPORT BOOL Print(int nCode, void* pExceptionPointers, const char* szWarning); + SAMPAPI_EXPORT void SendCrashReport(); + SAMPAPI_EXPORT BOOL CrashDialogProc(void* hWnd, unsigned int uMsg, unsigned int wParam, long lParam); + SAMPAPI_EXPORT void ConstructCrashDialogText(BOOL bModules); + SAMPAPI_EXPORT long Handler(void* pExceptionPointers); +} // namespace Exception + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/GUI.h b/include/sampapi/0.3.7-R5-1/GUI.h new file mode 100644 index 00000000..404c6c9a --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/GUI.h @@ -0,0 +1,41 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +class CDXUTControl; +class CDXUTDialogResourceManager; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +namespace GUI { + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialogResourceManager*& RefResourceMgr(); + + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefGameUi(); + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefScoreboard(); + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefDialog(); + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefClassSelection(); + + SAMPAPI_EXPORT SAMPAPI_VAR IDirect3DSurface9*& RefCursor(); + SAMPAPI_EXPORT SAMPAPI_VAR IDirect3DDevice9*& RefDevice(); + + SAMPAPI_EXPORT void Initialize(); + + SAMPAPI_EXPORT void OnLostDevice(); + SAMPAPI_EXPORT void OnResetDevice(); + + SAMPAPI_EXPORT void GameUIEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); + SAMPAPI_EXPORT void ScoreboardEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); + SAMPAPI_EXPORT void DialogEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); + SAMPAPI_EXPORT void ClassSelectionEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); +} // namespace GUI + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/InputHandler.h b/include/sampapi/0.3.7-R5-1/InputHandler.h new file mode 100644 index 00000000..01b475b6 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/InputHandler.h @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V037R5_1 + +void SwitchWindowedMode(); + +namespace InputHandler { + enum { MAX_ANTICHEAT_DETECT_COUNT = 0xA }; + + SAMPAPI_EXPORT SAMPAPI_VAR void*& RefPrevWindowProc(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned int& RefAntiCheatDetectCount(); + + SAMPAPI_EXPORT int WindowProc(unsigned int uMsg, unsigned int wParam, long lParam); + SAMPAPI_EXPORT BOOL KeyPressHandler(unsigned int nKey); + SAMPAPI_EXPORT BOOL CharInputHandler(unsigned int nChar); + SAMPAPI_EXPORT BOOL Initialize(); +} // namespace InputHandler + +SAMPAPI_END diff --git a/include/sampapi/0.3.7-R5-1/KeyStuff.h b/include/sampapi/0.3.7-R5-1/KeyStuff.h new file mode 100644 index 00000000..f0843897 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/KeyStuff.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +class CPad; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +namespace KeyStuff { + SAMPAPI_EXPORT SAMPAPI_VAR CPad& RefLocalPlayerKeys(); + SAMPAPI_EXPORT SAMPAPI_VAR CPad* ArrayPlayerKeys(); + SAMPAPI_EXPORT SAMPAPI_VAR CPad*& RefInternalKeys(); + SAMPAPI_EXPORT SAMPAPI_VAR bool*& RefDriveByLeft(); + SAMPAPI_EXPORT SAMPAPI_VAR bool*& RefDriveByRight(); + SAMPAPI_EXPORT SAMPAPI_VAR bool& RefSavedDriveByLeft(); + SAMPAPI_EXPORT SAMPAPI_VAR bool& RefSavedDriveByRight(); + + SAMPAPI_EXPORT void Initialize(); + SAMPAPI_EXPORT void UpdateKeys(); + SAMPAPI_EXPORT void ApplyKeys(); + SAMPAPI_EXPORT void SetKeys(int nPlayer, const CPad* pKeys); + SAMPAPI_EXPORT void ApplyKeys(int nPlayer); + SAMPAPI_EXPORT CPad* GetInternalKeys(); + SAMPAPI_EXPORT CPad* GetKeys(); + SAMPAPI_EXPORT CPad* GetKeys(int nPlayer); + SAMPAPI_EXPORT void ResetKeys(int nPlayer); + SAMPAPI_EXPORT void ResetInternalKeys(); +} // namespace KeyStuff + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/RPCHandlers.h b/include/sampapi/0.3.7-R5-1/RPCHandlers.h new file mode 100644 index 00000000..4990b3ec --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/RPCHandlers.h @@ -0,0 +1,159 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +struct RPCParameters; + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +namespace RPCHandlers { + // RegisterRPCs1 + + void ScrSetPlayerSkillLevel(RPCParameters* pParams); + void ScrCreate3DTextLabel(RPCParameters* pParams); + void ScrDestroy3DTextLabel(RPCParameters* pParams); + void ScrChatBubble(RPCParameters* pParams); + void ScrShowDialog(RPCParameters* pParams); + void ScrSetCheckpoint(RPCParameters* pParams); + void ScrDisableCheckpoint(RPCParameters* pParams); + void ScrSetRaceCheckpoint(RPCParameters* pParams); + void ScrDisableRaceCheckpoint(RPCParameters* pParams); + void UpdateScoresPingsIps(RPCParameters* pParams); + void SrvNetStats(RPCParameters* pParams); + void ScrGamemodeRestart(RPCParameters* pParams); + void ConnectionRejected(RPCParameters* pParams); + void ScrClientMessage(RPCParameters* pParams); + void ScrSetWorldTime(RPCParameters* pParams); + void ScrCreatePickup(RPCParameters* pParams); + void ScrDestroyPickup(RPCParameters* pParams); + void ScrDestroyWeaponPickup(RPCParameters* pParams); + void ScmEvent(RPCParameters* pParams); + void ScrSetWeather(RPCParameters* pParams); + void ScrSetPlayerTime(RPCParameters* pParams); + void ScrToggleClock(RPCParameters* pParams); + void ScrSetIngameTimer(RPCParameters* pParams); + void ScrWorldPlayerAdd(RPCParameters* pParams); + void ScrWorldPlayerDeath(RPCParameters* pParams); + void ScrWorldPlayerRemove(RPCParameters* pParams); + void ScrWorldVehicleAdd(RPCParameters* pParams); + void ScrWorldVehicleRemove(RPCParameters* pParams); + void DamageVehicle(RPCParameters* pParams); + void ScrSetVehicleParamsEx(RPCParameters* pParams); + void EnterVehicle(RPCParameters* pParams); + void ExitVehicle(RPCParameters* pParams); + void ScrServerJoin(RPCParameters* pParams); + void ScrServerQuit(RPCParameters* pParams); + void ScrInitGame(RPCParameters* pParams); + void Chat(RPCParameters* pParams); + void RequestClass(RPCParameters* pParams); + void RequestSpawn(RPCParameters* pParams); + void EditAttachedObject(RPCParameters* pParams); + void EditObject(RPCParameters* pParams); + void EnterEditObject(RPCParameters* pParams); + void ScrCancelEdit(RPCParameters* pParams); + void ScrUpdateCameraTarget(RPCParameters* pParams); + void ClientCheck(RPCParameters* pParams); + void ScrCreateActor(RPCParameters* pParams); + void ScrDestroyActor(RPCParameters* pParams); + + // RegisterRPCs2 + + void ScrDisableVehicleCollisions(RPCParameters* pParams); + void ScrSetPlayerMapIcon(RPCParameters* pParams); + void ScrRemovePlayerMapIcon(RPCParameters* pParams); + void ScrSetPlayerAmmo(RPCParameters* pParams); + void ScrSetGravity(RPCParameters* pParams); + void ScrSetVehicleHealth(RPCParameters* pParams); + void ScrAttachTrailerToVehicle(RPCParameters* pParams); + void ScrDetachTrailerFromVehicle(RPCParameters* pParams); + void ScrCreateObject(RPCParameters* pParams); + void ScrSetObjectPosition(RPCParameters* pParams); + void ScrSetObjectRotation(RPCParameters* pParams); + void ScrDestroyObject(RPCParameters* pParams); + void ScrCreateExplosion(RPCParameters* pParams); + void ScrShowPlayerNametagForPlayer(RPCParameters* pParams); + void ScrMoveObject(RPCParameters* pParams); + void ScrStopObject(RPCParameters* pParams); + void ScrSetNumberPlate(RPCParameters* pParams); + void ScrTogglePlayerSpectating(RPCParameters* pParams); + void ScrPlayerSpectatePlayer(RPCParameters* pParams); + void ScrPlayerSpectateVehicle(RPCParameters* pParams); + void ScrMoveVehicleComponent(RPCParameters* pParams); + void ScrForceClassSelection(RPCParameters* pParams); + void ScrAttachObjectToPlayer(RPCParameters* pParams); + void ScrSetPlayerWantedLevel(RPCParameters* pParams); + void ScrShowTextDraw(RPCParameters* pParams); + void ScrHideTextDrawForPlayer(RPCParameters* pParams); + void ScrTextDrawSetString(RPCParameters* pParams); + void ScrGangZoneCreate(RPCParameters* pParams); + void ScrGangZoneDestroy(RPCParameters* pParams); + void ScrGangZoneFlash(RPCParameters* pParams); + void ScrGangZoneStopFlash(RPCParameters* pParams); + void ScrApplyAnimation(RPCParameters* pParams); + void ScrClearAnimations(RPCParameters* pParams); + void ScrSetPlayerSpecialAction(RPCParameters* pParams); + void ScrEnableStuntBonusForPlayer(RPCParameters* pParams); + void ScrSetPlayerFightingStyle(RPCParameters* pParams); + void ScrSetPlayerVelocity(RPCParameters* pParams); + void ScrSetVehicleVelocity(RPCParameters* pParams); + void ScrPlayCrimeReport(RPCParameters* pParams); + void ScrSetSpawnInfo(RPCParameters* pParams); + void ScrSetPlayerTeam(RPCParameters* pParams); + void ScrSetPlayerSkin(RPCParameters* pParams); + void ScrSetPlayerName(RPCParameters* pParams); + void ScrSetPlayerPosition(RPCParameters* pParams); + void ScrSetPlayerPositionFindZ(RPCParameters* pParams); + void ScrSetPlayerHealth(RPCParameters* pParams); + void ScrPutPlayerInVehicle(RPCParameters* pParams); + void ScrRemovePlayerFromVehicle(RPCParameters* pParams); + void ScrSetPlayerColor(RPCParameters* pParams); + void ScrDisplayGametext(RPCParameters* pParams); + void ScrSetPlayerInterior(RPCParameters* pParams); + void ScrSetPlayerCameraPosition(RPCParameters* pParams); + void ScrSetPlayerCameraLookAt(RPCParameters* pParams); + void ScrSetVehiclePosition(RPCParameters* pParams); + void ScrSetVehicleZAngle(RPCParameters* pParams); + void ScrSetVehicleParamsForPlayer(RPCParameters* pParams); + void ScrSetCameraBehindPlayer(RPCParameters* pParams); + void ScrTogglePlayerControllable(RPCParameters* pParams); + void ScrPlaySound(RPCParameters* pParams); + void ScrSetPlayerWorldBounds(RPCParameters* pParams); + void ScrGivePlayerMoney(RPCParameters* pParams); + void ScrSetPlayerFacingAngle(RPCParameters* pParams); + void ScrResetPlayerMoney(RPCParameters* pParams); + void ScrResetPlayerWeapons(RPCParameters* pParams); + void ScrGivePlayerWeapon(RPCParameters* pParams); + void ScrLinkVehicleToInterior(RPCParameters* pParams); + void ScrSetPlayerArmor(RPCParameters* pParams); + void ScrDeathMessage(RPCParameters* pParams); + void ScrSetPlayerShopName(RPCParameters* pParams); + void ScrSetPlayerDrunkLevel(RPCParameters* pParams); + void ScrSetPlayerArmedWeapon(RPCParameters* pParams); + void ScrSetPlayerAttachedObject(RPCParameters* pParams); + void ScrPlayAudioStream(RPCParameters* pParams); + void ScrStopAudioStream(RPCParameters* pParams); + void ScrRemoveBuildingForPlayer(RPCParameters* pParams); + void ScrAttachCameraToObject(RPCParameters* pParams); + void ScrInterpolateCamera(RPCParameters* pParams); + void ClickTextDraw(RPCParameters* pParams); + void ScrSetObjectMaterial(RPCParameters* pParams); + void ScrStopObjectCameraCollision(RPCParameters* pParams); + void ScrSetActorAnimation(RPCParameters* pParams); + void ScrSetActorRotation(RPCParameters* pParams); + void ScrSetActorPosition(RPCParameters* pParams); + void ScrSetActorHealth(RPCParameters* pParams); + void ScrInitMenu(RPCParameters* pParams); + void ScrShowMenu(RPCParameters* pParams); + void ScrHideMenu(RPCParameters* pParams); +} // namespace RPCHandlers + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/Scripting.h b/include/sampapi/0.3.7-R5-1/Scripting.h new file mode 100644 index 00000000..0729b882 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/Scripting.h @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +class CRunningScript; + +SAMPAPI_BEGIN_V037R5_1 + +namespace Scripting { + struct SAMPAPI_EXPORT OpcodeInfo { + unsigned short m_wOpCode; + char m_szParams[16]; // i - int, f - float, v - var, s - string, z - zero terminating + }; + + typedef int(__thiscall* ProcessOneCommandFn)(CRunningScript*); + + SAMPAPI_EXPORT SAMPAPI_VAR CRunningScript*& RefThread(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned char* ArrayBuffer(); // [256] + SAMPAPI_EXPORT SAMPAPI_VAR unsigned long& RefLastUsedOpcode(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned long** ArrayThreadLocals(); // [18] + SAMPAPI_EXPORT SAMPAPI_VAR BOOL& RefLocalDebug(); + SAMPAPI_EXPORT SAMPAPI_VAR ProcessOneCommandFn& RefProcessOneCommand(); + + SAMPAPI_EXPORT void Initialize(); + SAMPAPI_EXPORT int ExecBuffer(); + static SAMPAPI_EXPORT int(__cdecl* FunctionProcessCommand())(const OpcodeInfo*, ...); + template + int ProcessCommand(const OpcodeInfo* pOpcodeInfo, Args... args) { + return FunctionProcessCommand()(pOpcodeInfo, args...); + } +} // namespace Scripting + +SAMPAPI_END diff --git a/include/sampapi/0.3.7-R5-1/Settings.h b/include/sampapi/0.3.7-R5-1/Settings.h new file mode 100644 index 00000000..e90627a0 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/Settings.h @@ -0,0 +1,35 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +struct SAMPAPI_EXPORT Settings { + enum { SETTINGS_STRING_LEN = 256 }; + + BOOL m_bDebugMode; // -d + BOOL m_bOnlineGame; // -c + BOOL m_bWindowedMode; // unused + char m_szPass[SETTINGS_STRING_LEN + 1]; // -z + char m_szHost[SETTINGS_STRING_LEN + 1]; // -h + char m_szPort[SETTINGS_STRING_LEN + 1]; // -p + char m_szNick[SETTINGS_STRING_LEN + 1]; // -n + char m_szDebugScript[SETTINGS_STRING_LEN + 1]; // -l + + static void Initialize(); + static void GetFromCommandLine(const char* szLine, char* szBuffer); + static void GetFromQuotes(const char* szLine, char* szBuffer); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR Settings& RefSettings(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.7-R5-1/SpecialAction.h b/include/sampapi/0.3.7-R5-1/SpecialAction.h new file mode 100644 index 00000000..339f80b8 --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/SpecialAction.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V037R5_1 + +enum SpecialAction { + SPECIAL_ACTION_NONE, + SPECIAL_ACTION_DUCK, + SPECIAL_ACTION_USEJETPACK, + SPECIAL_ACTION_ENTER_VEHICLE, + SPECIAL_ACTION_EXIT_VEHICLE, + SPECIAL_ACTION_DANCE1, + SPECIAL_ACTION_DANCE2, + SPECIAL_ACTION_DANCE3, + SPECIAL_ACTION_DANCE4, + SPECIAL_ACTION_HANDSUP, + SPECIAL_ACTION_USECELLPHONE, + SPECIAL_ACTION_SITTING, + SPECIAL_ACTION_STOPUSECELLPHONE, + SPECIAL_ACTION_DRINK_BEER = 20, + SPECIAL_ACTION_SMOKE_CIGGY, + SPECIAL_ACTION_DRINK_WINE, + SPECIAL_ACTION_DRINK_SPRUNK, + SPECIAL_ACTION_CUFFED, + SPECIAL_ACTION_CARRY, + SPECIAL_ACTION_URINATING = 68 +}; + +SAMPAPI_END diff --git a/include/sampapi/0.3.7-R5-1/Synchronization.h b/include/sampapi/0.3.7-R5-1/Synchronization.h new file mode 100644 index 00000000..18581ddd --- /dev/null +++ b/include/sampapi/0.3.7-R5-1/Synchronization.h @@ -0,0 +1,177 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.7-R5-1/Animation.h" +#include "sampapi/0.3.7-R5-1/ControllerState.h" + +SAMPAPI_BEGIN_PACKED_V037R5_1 + +namespace Synchronization { + struct SAMPAPI_EXPORT OnfootData { + ControllerState m_controllerState; + CVector m_position; + float m_fQuaternion[4]; + unsigned char m_nHealth; + unsigned char m_nArmor; + unsigned char m_nCurrentWeapon; + unsigned char m_nSpecialAction; + CVector m_speed; + CVector m_surfingOffset; + ID m_nSurfingVehicleId; + Animation m_animation; + }; + + struct SAMPAPI_EXPORT IncarData { + ID m_nVehicle; + ControllerState m_controllerState; + float m_fQuaternion[4]; + CVector m_position; + CVector m_speed; + float m_fHealth; + unsigned char m_nDriverHealth; + unsigned char m_nDriverArmor; + unsigned char m_nCurrentWeapon; + bool m_bSirenEnabled; + bool m_bLandingGear; + ID m_nTrailerId; + union { + unsigned short m_aHydraThrustAngle[2]; + float m_fTrainSpeed; + }; + }; + + struct SAMPAPI_EXPORT AimData { + enum WeaponState { + WS_NO_BULLETS = 0, + WS_LAST_BULLET = 1, + WS_MORE_BULLETS = 2, + WS_RELOADING = 3, + }; + + unsigned char m_nCameraMode; + CVector m_aimf1; + CVector m_aimPos; + float m_fAimZ; + unsigned char m_nCameraExtZoom : 6; + unsigned char m_nWeaponState : 2; + char m_nAspectRatio; + }; + + struct SAMPAPI_EXPORT TrailerData { + ID m_nId; + CVector m_position; + float m_fQuaternion[4]; + CVector m_speed; + CVector m_turnSpeed; + }; + + struct SAMPAPI_EXPORT PassengerData { + ID m_nVehicleId; + unsigned char m_nSeatId; // flags + unsigned char m_nCurrentWeapon; + unsigned char m_nHealth; + unsigned char m_nArmor; + ControllerState m_controllerState; + CVector m_position; + }; + + struct SAMPAPI_EXPORT UnoccupiedData { + ID m_nVehicleId; + unsigned char m_nSeatId; + CVector m_roll; + CVector m_direction; + CVector m_position; + CVector m_speed; + CVector m_turnSpeed; + float m_fHealth; + }; + + struct SAMPAPI_EXPORT BulletData { + unsigned char m_nTargetType; + ID m_nTargetId; + CVector m_origin; + CVector m_target; + CVector m_center; + unsigned char m_nWeapon; + }; + + struct SAMPAPI_EXPORT SpectatorData { + ControllerState m_controllerState; + CVector m_position; + }; + + struct SAMPAPI_EXPORT StatsData { + int m_nMoney; + int m_nDrunkLevel; + }; + + inline char CompressAspectRatio(float v) { + return static_cast(v * 255.0f); + } + + inline float DecompressAspectRatio(char v) { + return v / 255.0f; + } + + inline unsigned char CompressCameraExtZoom(float v) { + return static_cast(v * 63.0f) & 63; + } + + inline float DecompressCameraExtZoom(unsigned char v) { + return (v & 63) / 63.0f; + } + + /* + a structure in this block has dynamic size + + struct SAMPAPI_EXPORT WeaponsData { + ID m_nAimedPlayer; + ID m_nAimedActor; + + struct { + char m_nSlot; + char m_nWeapon; + unsigned short m_nAmmo; + } m_aWeapons[n]; // 0 < n < 14 + }; + + struct SAMPAPI_EXPORT RconCommand { + unsigned long m_nTextLen; + char m_szText[m_nTextLen]; + }; + + struct SAMPAPI_EXPORT MarkersData { + bool m_bCreate; // create(1)/remove(0) + int m_nCount; + + struct { + ID m_nPlayer; + VectorCompressed m_vPos; + } m_aMarkers[m_nCount]; + }; + */ + +#if defined(__RAK_CLIENT_H) + template + void Send(T packet) { + RakNet::BitStream bs; + + bs.Write(T::ID); + bs.Write(packet); + + pNetGame->m_pRakClient->Send(&bs, HIGH_PRIORITY, RELIABLE, 0); + } +#endif +} // namespace Synchronization + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/AimStuff.h b/include/sampapi/0.3.DL-1/AimStuff.h new file mode 100644 index 00000000..2db4d3c9 --- /dev/null +++ b/include/sampapi/0.3.DL-1/AimStuff.h @@ -0,0 +1,55 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_V03DL_1 + +namespace AimStuff { + struct SAMPAPI_EXPORT Aim { + CVector front; + CVector source; + CVector sourceBeforeLookBehind; + CVector up; + }; + + SAMPAPI_EXPORT SAMPAPI_VAR float& RefLocalPlayerCameraExtZoom(); + SAMPAPI_EXPORT SAMPAPI_VAR float& RefLocalPlayerAspectRatio(); + SAMPAPI_EXPORT SAMPAPI_VAR float*& RefInternalCameraExtZoom(); + SAMPAPI_EXPORT SAMPAPI_VAR float*& RefInternalAspectRatio(); + SAMPAPI_EXPORT SAMPAPI_VAR float* ArrayCameraExtZoom(); + SAMPAPI_EXPORT SAMPAPI_VAR float* ArrayAspectRatio(); + SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayCameraMode(); + SAMPAPI_EXPORT SAMPAPI_VAR char*& RefInternalCameraMode(); + SAMPAPI_EXPORT SAMPAPI_VAR Aim& RefLocalPlayerAim(); + SAMPAPI_EXPORT SAMPAPI_VAR Aim* ArrayPlayerAim(); + SAMPAPI_EXPORT SAMPAPI_VAR Aim*& RefInternalAim(); + + SAMPAPI_EXPORT void UpdateCameraExtZoomAndAspectRatio(); + SAMPAPI_EXPORT void ApplyCameraExtZoomAndAspectRatio(); + SAMPAPI_EXPORT void SetCameraExtZoomAndAspectRatio(NUMBER nPlayer, float fCameraExtZoom, float fAspectRatio); + SAMPAPI_EXPORT float GetAspectRatio(); + SAMPAPI_EXPORT float GetCameraExtZoom(); + SAMPAPI_EXPORT void ApplyCameraExtZoomAndAspectRatio(NUMBER nPlayer); + SAMPAPI_EXPORT void SetCameraMode(char nMode, NUMBER nPlayer); + SAMPAPI_EXPORT char GetCameraMode(NUMBER nPlayer); + SAMPAPI_EXPORT char GetCameraMode(); + SAMPAPI_EXPORT void Initialize(); + SAMPAPI_EXPORT void UpdateAim(); + SAMPAPI_EXPORT void ApplyAim(); + SAMPAPI_EXPORT Aim* GetAim(); + SAMPAPI_EXPORT void SetAim(int nPlayer, const Aim* pAim); + SAMPAPI_EXPORT void ApplyAim(int nPlayer); + SAMPAPI_EXPORT Aim* GetAim(int nPlayer); +} // namespace AimStuff + +SAMPAPI_END diff --git a/include/sampapi/0.3.DL-1/Animation.h b/include/sampapi/0.3.DL-1/Animation.h new file mode 100644 index 00000000..4485e809 --- /dev/null +++ b/include/sampapi/0.3.DL-1/Animation.h @@ -0,0 +1,31 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT Animation { + union { + struct { + unsigned short m_nId : 16; + unsigned char m_nFramedelta : 8; + unsigned char m_nLoopA : 1; + unsigned char m_nLockX : 1; + unsigned char m_nLockY : 1; + unsigned char m_nLockF : 1; + unsigned char m_nTime : 2; + }; + int m_value; + }; +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CActor.h b/include/sampapi/0.3.DL-1/CActor.h new file mode 100644 index 00000000..81b7560c --- /dev/null +++ b/include/sampapi/0.3.DL-1/CActor.h @@ -0,0 +1,47 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CEntity.h" + +class CPed; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CActor : public CEntity { +public: + // void **lpVtbl = 0xD9EC8; + ::CPed* m_pGamePed; + GTAREF m_marker; + GTAREF m_arrow; + bool m_bNeedsToCreateMarker; + bool m_bInvulnerable; + + CActor(int nSkin, CVector vPos, float fRotation); + virtual ~CActor() = 0; + + void Destroy(); + void PerformAnimation(const char* szAnim, const char* szIFP, float fFramedelta, int bLockA, int bLockX, int bLockY, int bLockF, int nTime); + void SetRotation(float fValue); + void SetHealth(float fValue); + float GetHealth(); + void SetInvulnerable(bool bInv); + void SetArmour(float fValue); + float GetArmour(); + // state/status is a flags + void SetState(int nValue); + int GetState(); + BOOL IsDead(); + void SetStatus(int nValue); + int GetStatus(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CActorPool.h b/include/sampapi/0.3.DL-1/CActorPool.h new file mode 100644 index 00000000..4b68f38d --- /dev/null +++ b/include/sampapi/0.3.DL-1/CActorPool.h @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CActor.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT ActorInfo { + ID m_nId; + int m_nModel; + int pad_1; + CVector m_position; + float m_fRotation; + float m_fHealth; + bool m_bInvulnerable; +}; + +class SAMPAPI_EXPORT CActorPool { +public: + enum { MAX_ACTORS = 1000 }; + + int m_nLargestId; + CActor* m_pObject[MAX_ACTORS]; + BOOL m_bNotEmpty[MAX_ACTORS]; + ::CPed* m_pGameObject[MAX_ACTORS]; + int pad_2ee4[MAX_ACTORS]; + int pad_3e84[MAX_ACTORS]; + + CActorPool(); + ~CActorPool(); + + CActor* Get(ID nId); + BOOL DoesExist(ID nId); + void UpdateLargestId(); + BOOL Delete(ID nId); + BOOL Create(ActorInfo* pInfo); + ID Find(::CPed* pPed); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CAudio.h b/include/sampapi/0.3.DL-1/CAudio.h new file mode 100644 index 00000000..5721abe4 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CAudio.h @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CAudio { +public: + enum SoundId { + SOUND_OFF = 0, + SOUND_DISABLE_OUTDOOR_AMBIENCE_TRACK = 1, + }; + + BOOL m_bSoundLoaded; + bool m_bOutdoorAmbienceTrackDisabled; + + CAudio() { + m_bSoundLoaded = false; + m_bOutdoorAmbienceTrackDisabled = false; + } + + ~CAudio() { + Play(SOUND_OFF); + } + + int GetRadioStation(); + void StartRadio(int nStation); + void StopRadio(); + float GetRadioVolume(); + void StopOutdoorAmbienceTrack(); + void SetOutdoorAmbienceTrack(int nSound); + void Play(int nSound, CVector location = {}); + bool IsOutdoorAmbienceTrackDisabled(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CAudioStream.h b/include/sampapi/0.3.DL-1/CAudioStream.h new file mode 100644 index 00000000..d359f466 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CAudioStream.h @@ -0,0 +1,47 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CAudioStream { +public: + enum { AUDIOSTREAM_MAX_STRING = 256 }; + + bool m_bInitialized; + + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefStream(); + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefIsPlaying(); + static SAMPAPI_EXPORT SAMPAPI_VAR CVector& RefPosition(); + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefIs3d(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayIcyUrl(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayInfo(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayUrl(); + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefNeedsToDestroy(); + static SAMPAPI_EXPORT SAMPAPI_VAR float& RefRadius(); + static SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayIcyName(); + + static void ConstructInfo(); + static void SyncProc(int handle, int channel, int data, void* user); + static void Process(void* arglist); + + BOOL Reset(); + BOOL Stop(bool bWait); + BOOL Play(const char* szUrl, CVector position, float fRadius, bool bIs3d); + void ControlGameRadio(); + void DrawInfo(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CAudioStream*& RefAudioStream(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CCamera.h b/include/sampapi/0.3.DL-1/CCamera.h new file mode 100644 index 00000000..7290aae3 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CCamera.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/0.3.DL-1/CEntity.h" + +class CEntity; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CCamera { +public: + CEntity* m_pAttachedTo; + CMatrix* m_pMatrix; + + CCamera(); + ~CCamera(); + + void Fade(BOOL bin); + void GetMatrix(CMatrix* pMatrix); + void SetMatrix(CMatrix matrix); + void TakeControl(::CEntity* pTarget, short nModeToGoTo, short nTypeOfSwitch); + void SetMoveVector(CVector* pCamera, CVector* pPosition, int nTime, bool bSmoothTransmition); + void SetTrackVector(CVector* pPointAt, CVector* pTransverseTo, int nTime, bool bSmooth); + void Attach(CEntity* pOwner); + void SetToOwner(); + float GetDistanceToPoint(CVector* pPoint); + void Restore(); + void Set(CVector position, CVector rotation); + void PointAt(CVector point, int nSwitchStyle); + void Detach(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CChat.h b/include/sampapi/0.3.DL-1/CChat.h new file mode 100644 index 00000000..29225b68 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CChat.h @@ -0,0 +1,105 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CFonts.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CChat { +public: + enum EntryType { + ENTRY_TYPE_NONE = 0, + ENTRY_TYPE_CHAT = 1 << 1, + ENTRY_TYPE_INFO = 1 << 2, + ENTRY_TYPE_DEBUG = 1 << 3 + }; + enum DisplayMode { + DISPLAY_MODE_OFF, + DISPLAY_MODE_NOSHADOW, + DISPLAY_MODE_NORMAL + }; + enum { MAX_MESSAGES = 100 }; + + unsigned int m_nPageSize; + char* m_szLastMessage; + int m_nMode; + bool m_bTimestamps; + BOOL m_bDoesLogExist; + char m_szLogPath[261]; // MAX_PATH(+1) + CDXUTDialog* m_pGameUi; + CDXUTEditBox* m_pEditbox; + CDXUTScrollBar* m_pScrollbar; + D3DCOLOR m_textColor; // 0xFFFFFFFF + D3DCOLOR m_infoColor; // 0xFF88AA62 + D3DCOLOR m_debugColor; // 0xFFA9C4E4 + long m_nWindowBottom; + struct SAMPAPI_EXPORT ChatEntry { + __int32 m_timestamp; + char m_szPrefix[28]; + char m_szText[144]; + char unused[64]; + int m_nType; + D3DCOLOR m_textColor; + D3DCOLOR m_prefixColor; + }; + ChatEntry m_entry[MAX_MESSAGES]; + CFonts* m_pFontRenderer; + ID3DXSprite* m_pTextSprite; + ID3DXSprite* m_pSprite; + IDirect3DDevice9* m_pDevice; + BOOL m_bRenderToSurface; + ID3DXRenderToSurface* m_pRenderToSurface; + IDirect3DTexture9* m_pTexture; + IDirect3DSurface9* m_pSurface; +#ifdef _d3d9TYPES_H_ + D3DDISPLAYMODE m_displayMode; +#else + unsigned int m_displayMode[4]; +#endif + int pad_[2]; + BOOL m_bRedraw; + long m_nScrollbarPos; + long m_nCharHeight; // this is the height of the "Y" + long m_nTimestampWidth; + + CChat(IDirect3DDevice9* pDevice, CFonts* pFontRenderer, const char* pChatLogPath); + ~CChat(); + + int GetMode(); + void SwitchMode(); + void RecalcFontSize(); + void OnLostDevice(); + void UpdateScrollbar(); + void SetPageSize(int nValue); + void PageUp(); + void PageDown(); + void ScrollToBottom(); + void Scroll(int nDelta); + void FilterOutInvalidChars(char* szString); + void PushBack(); + void RenderEntry(const char* szText, CRect rect, D3DCOLOR color); + void Log(int nType, const char* szText, const char* szPrefix); + void ResetDialogControls(CDXUTDialog* pGameUi); + void Render(); + void AddEntry(int nType, const char* szText, const char* szPrefix, D3DCOLOR textColor, D3DCOLOR prefixColor); + void Draw(); + void RenderToSurface(); + void AddChatMessage(const char* szPrefix, D3DCOLOR prefixColor, const char* szText); + void AddMessage(D3DCOLOR color, const char* szText); + void OnResetDevice(); + + void Print(D3DCOLOR dwColor, const char* pFormat, ...); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CChat*& RefChat(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CChatBubble.h b/include/sampapi/0.3.DL-1/CChatBubble.h new file mode 100644 index 00000000..a251392a --- /dev/null +++ b/include/sampapi/0.3.DL-1/CChatBubble.h @@ -0,0 +1,36 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CChatBubble { +public: + struct SAMPAPI_EXPORT Player { + BOOL m_bExists; + char m_szText[256]; + int m_creationTick; + int m_lifeSpan; + D3DCOLOR m_color; + float m_fDrawDistance; + int m_nMaxLineLength; + } m_player[1004]; + + CChatBubble(); + + void Add(ID nPlayer, const char* szText, D3DCOLOR color, float fDrawDistance, int lifeSpan); + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CChatBubble*& RefChatBubble(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CConfig.h b/include/sampapi/0.3.DL-1/CConfig.h new file mode 100644 index 00000000..546f6ac8 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CConfig.h @@ -0,0 +1,67 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CConfig { +public: + enum { + MAX_ENTRIES = 512, + MAX_ENTRY_NAME = 40, + }; + enum ValueType { + VALUE_TYPE_NONE, + VALUE_TYPE_INT, + VALUE_TYPE_STRING, + VALUE_TYPE_FLOAT + }; + + struct SAMPAPI_EXPORT ConfigEntry { + char m_szName[MAX_ENTRY_NAME + 1]; + BOOL m_bReadOnly; // maybe + int m_nType; + int m_nValue; + float m_fValue; + char* m_szValue; + }; + + ConfigEntry m_entry[MAX_ENTRIES]; + BOOL m_bNotEmpty[MAX_ENTRIES]; // map + char m_szFilename[261]; + int m_nFirstFree; + + CConfig(const char* szFile); + ~CConfig(); + + void FindFirstFree(); + int GetIndex(const char* szEntry); + bool DoesExist(const char* szEntry); + int CreateEntry(const char* szName); + int GetIntValue(const char* szEntry); + const char* GetStringValue(const char* szEntry); + float GetFloatValue(const char* szEntry); + BOOL Free(const char* szEntry); + int GetValueType(const char* szEntry); + ConfigEntry* GetEntry(int nIndex); + int GetType(const char* szString); + BOOL Save(); + BOOL WriteIntValue(const char* szEntry, int nValue, BOOL bReadOnly = 0); + BOOL WriteStringValue(const char* szEntry, const char* szValue, BOOL bReadOnly = 0); + BOOL WriteFloatValue(const char* szEntry, float fValue, BOOL bReadOnly = 0); + void Write(const char* szEntry, char* szBuffer); + BOOL Load(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CConfig*& RefConfig(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CCustomModels.h b/include/sampapi/0.3.DL-1/CCustomModels.h new file mode 100644 index 00000000..654d0baa --- /dev/null +++ b/include/sampapi/0.3.DL-1/CCustomModels.h @@ -0,0 +1,47 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CCustomModelsPool.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CCustomModels { +public: + CCustomModelsPool* m_pModelsPool; + int m_nModelsCount; + bool m_bIsPathInit; + char* m_szPathName; + char field_D[257]; + char* m_szLocalPath; + char field_112[8027]; + + CCustomModels(IDirect3DDevice9* pDevice); + ~CCustomModels(); + + bool InitDirectory(); + bool DoesDffExist(unsigned int nDffIndex); + bool DoesTxdExist(unsigned int nTxdIndex); + bool DeleteDff(unsigned int nDffIndex); + bool DeleteTxd(unsigned int nTxdIndex); + bool DeleteTempFile(const char* szFileName); + bool LoadModel(unsigned int nStandartModelId, unsigned int nCustomModelId, unsigned int nDffIndex, unsigned int nTxdIndex); + CCustomModelInfo* GetModelInfo(unsigned int nId); + int GetCount(); + bool ResizePool(unsigned int nId); + bool DoesExist(unsigned int nId); + void PushBack(unsigned int nId, CCustomModelInfo* pModelInfo); + void SetModelInfo(unsigned int nId, CCustomModelInfo* pModelInfo); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CCustomModels*& RefCustomModels(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CCustomModelsPool.h b/include/sampapi/0.3.DL-1/CCustomModelsPool.h new file mode 100644 index 00000000..3215afbb --- /dev/null +++ b/include/sampapi/0.3.DL-1/CCustomModelsPool.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CCustomModelInfo { +public: + bool m_nIsDff; + bool m_nIsTxd; + unsigned short field_2; + char field_4; + char field_5; + char field_6; + char field_7; + unsigned short field_8; + unsigned short fiend_0A; + int nStandartModelId; + int nCustomModelId; + char field_14[50]; + int m_nDffModelIndex; + int m_nTxdModelIndex; +}; + +class SAMPAPI_EXPORT CCustomModelsPool { +public: + CCustomModelInfo* m_pObject[20000]; +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CDeathWindow.h b/include/sampapi/0.3.DL-1/CDeathWindow.h new file mode 100644 index 00000000..68ced82c --- /dev/null +++ b/include/sampapi/0.3.DL-1/CDeathWindow.h @@ -0,0 +1,59 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CDeathWindow { +public: + enum { MAX_DEATHMESSAGES = 5 }; + + BOOL m_bEnabled; + + struct SAMPAPI_EXPORT { + char m_szKiller[25]; + char m_szVictim[25]; + D3DCOLOR m_killerColor; + D3DCOLOR m_victimColor; + char m_nWeapon; + } m_entry[MAX_DEATHMESSAGES]; + + int m_nLongestNickWidth; + int m_position[2]; + ID3DXFont* m_pFont; + ID3DXFont* m_pWeaponFont1; + ID3DXFont* m_pWeaponFont2; + ID3DXSprite* m_pSprite; + IDirect3DDevice9* m_pDevice; + BOOL m_bAuxFontInited; + ID3DXFont* m_pAuxFont1; + ID3DXFont* m_pAuxFont2; + + CDeathWindow(IDirect3DDevice9* pDevice); + ~CDeathWindow(); + + void InitializeAuxFonts(); + void PushBack(); + void DrawText(const char* szText, CRect rect, D3DCOLOR color, int nFormat); + void DrawWeaponSprite(const char* szSpriteId, CRect rect, D3DCOLOR color); + void GetWeaponSpriteRectSize(void* pPoint); + const char* GetWeaponSpriteId(char nWeapon); + void ResetFonts(); + void Draw(); + void AddEntry(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon); + void AddMessage(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CDeathWindow*& RefDeathWindow(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CDialog.h b/include/sampapi/0.3.DL-1/CDialog.h new file mode 100644 index 00000000..11d939f6 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CDialog.h @@ -0,0 +1,57 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CDialog { +public: + enum DialogType { + DIALOG_MESSAGEBOX, + DIALOG_INPUT, + DIALOG_LIST, + DIALOG_PASSWORD, + DIALOG_TABLIST, + DIALOG_HEADERSLIST + }; + + IDirect3DDevice9* m_pDevice; + unsigned long m_position[2]; + unsigned long m_size[2]; + unsigned long m_buttonOffset[2]; + CDXUTDialog* m_pDialog; + CDXUTListBox* m_pListbox; + CDXUTIMEEditBox* m_pEditbox; + BOOL m_bIsActive; + int m_nType; + int m_nId; + char* m_szText; + int m_textSize[2]; + char m_szCaption[65]; + BOOL m_bServerside; + + CDialog(IDirect3DDevice9* pDevice); + + void GetScreenRect(CRect* pRect); + int GetTextScreenLength(const char* szString); + void Hide(); + void ResetDialogControls(CDXUTDialog* pDialog); + void Show(int nId, int nType, const char* szCaption, const char* szText, const char* szLeftButton, const char* szRightButton, BOOL bServerside); + void Close(char nProcessButton); + void Draw(); + void UpdateRects(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CDialog*& RefDialog(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CDownloadWindow.h b/include/sampapi/0.3.DL-1/CDownloadWindow.h new file mode 100644 index 00000000..741488dc --- /dev/null +++ b/include/sampapi/0.3.DL-1/CDownloadWindow.h @@ -0,0 +1,68 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" +#include "sampapi/0.3.DL-1/CDownloadedFilesPool.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CDownloadWindow { +public: + CDownloadedFilesPool* m_pFilesPool; + int m_nDownloadedFilesCount; + IDirect3DDevice9* m_pDevice; + unsigned int m_position[2]; + int m_nWindowWidth; + int m_nWindowHeight; + int field_1C; + int field_20; + int field_24; + CDXUTDialog* m_pDialog; + CDXUTListBox* m_pListbox; + int m_bIsWindowActive; + int m_nRowCount; + char m_szType[129]; + char m_szId[129]; + char m_szProcess[129]; + char m_szUnused[129]; + int m_nSpaceSizeForIdText; + int m_nSpaceSizeForProgressText; + int field_244; + int field_248; + int m_nDownloadedFilesCount_1; + int m_nFilesSum; + int field_254; + int field_258; + float m_fDownloadSpeed; + + CDownloadWindow(IDirect3DDevice9* pDevice); + ~CDownloadWindow(); + + void GetScreenRect(CRect* pRect); + void DoesExist(int nFileId); + void Show(); + void AddEntry(char nFileType, int nFileId, char nFileState, int nFileDownloaded, int nFileRemainDownload, int a7); + void Draw(); + void ResetDialogControl(CDXUTDialog* pDialog); + void FreePool(); + void PushBack(DownloadedFileInfo* pInfo); + void DeleteFile(unsigned int nId); + void ResizePool(unsigned int nId); + int GetFilesCount(); + DownloadedFileInfo* GetFileInfo(unsigned int nId); + + +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CDownloadWindow*& RefDownloadWindow(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CDownloadedFilesPool.h b/include/sampapi/0.3.DL-1/CDownloadedFilesPool.h new file mode 100644 index 00000000..300b56f6 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CDownloadedFilesPool.h @@ -0,0 +1,29 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT DownloadedFileInfo { + int m_nFileNumber; + char m_nFileType; + int m_szFileId; + char m_nFileState; + int m_nFileDownloaded; + int m_nFileRemainDownload; +}; + +struct SAMPAPI_EXPORT CDownloadedFilesPool { + DownloadedFileInfo *m_pObject[20000]; +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CEntity.h b/include/sampapi/0.3.DL-1/CEntity.h new file mode 100644 index 00000000..4c23f614 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CEntity.h @@ -0,0 +1,66 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CMatrix.h" + +class CEntity; +struct RwObject; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CEntity { +public: + // void **m_lpVtbl = 0xD9EBC; + char pad_4[60]; + ::CEntity* m_pGameEntity; + GTAREF m_handle; + + CEntity(); + + virtual ~CEntity() = 0; + virtual void Add() = 0; + virtual void Remove() = 0; + + void GetMatrix(CMatrix* pMatrix); + void SetMatrix(CMatrix matrix); + void GetSpeed(CVector* pVec); + void SetSpeed(CVector vec); + void GetTurnSpeed(CVector* pVec); + void SetTurnSpeed(CVector vec); + void ApplyTurnSpeed(); + float GetDistanceFromCentreOfMassToBaseOfModel(); + void GetBoundCentre(CVector* pVec); + void SetModelIndex(int nModel); + int GetModelIndex(); + void Teleport(CVector position); + float GetDistanceToLocalPlayer(); + float GetDistanceToCamera(); + float GetDistanceToPoint(CVector position); + BOOL DoesExist(); // does entity exist in the game world? + BOOL EnforceWorldBoundries(float fPX, float fZX, float fPY, float fNY); + BOOL HasExceededWorldBoundries(float fPX, float fZX, float fPY, float fNY); + void GetEulerInverted(float* x, float* y, float* z); + BOOL IsIgnored(); + BOOL IsStationary(); + BOOL GetCollisionFlag(); + void SetCollisionFlag(BOOL bEnable); + RwObject* GetRwObject(); + void DeleteRwObject(); + void UpdateRwFrame(); + float GetDistanceToLocalPlayerNoHeight(); + void SetCollisionProcessed(BOOL bProcessed); + void ApplyTurnForce(CVector direction, CVector velocity); + void SetFromEuler(CVector angles); + void SetClumpAlpha(int nValue); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CFont.h b/include/sampapi/0.3.DL-1/CFont.h new file mode 100644 index 00000000..143259b8 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CFont.h @@ -0,0 +1,89 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +/* + this class handles RGB-formatted tags in ANSI text + like a "{FFFFFF}Hello {FF5000}World!" +*/ + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +#if defined(__D3DX9CORE_H__) + +class SAMPAPI_EXPORT CFont : ID3DXFont { +public: + // void **m_lpVtbl = 0xEA3B8; + ID3DXFont* m_pFont; + + CFont(); + CFont(ID3DXFont* pFont); + + // IUnknown + STDMETHOD(QueryInterface) + (THIS_ REFIID iid, LPVOID* ppv) PURE; + STDMETHOD_(ULONG, AddRef) + (THIS) PURE; + STDMETHOD_(ULONG, Release) + (THIS) PURE; + + // ID3DXFont + STDMETHOD(GetDevice) + (THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; + STDMETHOD(GetDescA) + (THIS_ D3DXFONT_DESCA* pDesc) PURE; + STDMETHOD(GetDescW) + (THIS_ D3DXFONT_DESCW* pDesc) PURE; + STDMETHOD_(BOOL, GetTextMetricsA) + (THIS_ TEXTMETRICA* pTextMetrics) PURE; + STDMETHOD_(BOOL, GetTextMetricsW) + (THIS_ TEXTMETRICW* pTextMetrics) PURE; + + STDMETHOD_(HDC, GetDC) + (THIS) PURE; + STDMETHOD(GetGlyphData) + (THIS_ UINT Glyph, LPDIRECT3DTEXTURE9* ppTexture, RECT* pBlackBox, POINT* pCellInc) PURE; + + STDMETHOD(PreloadCharacters) + (THIS_ UINT First, UINT Last) PURE; + STDMETHOD(PreloadGlyphs) + (THIS_ UINT First, UINT Last) PURE; + STDMETHOD(PreloadTextA) + (THIS_ LPCSTR pString, INT Count) PURE; + STDMETHOD(PreloadTextW) + (THIS_ LPCWSTR pString, INT Count) PURE; + + STDMETHOD_(INT, DrawTextA) + (THIS_ LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; + STDMETHOD_(INT, DrawTextW) + (THIS_ LPD3DXSPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; + + STDMETHOD(OnLostDevice) + (THIS) PURE; + STDMETHOD(OnResetDevice) + (THIS) PURE; +}; + +#else + +class SAMPAPI_EXPORT CFont { +public: + void** m_lpVtbl; + ID3DXFont* m_pFont; + + CFont(); + CFont(ID3DXFont* pFont); +}; + +#endif + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CFonts.h b/include/sampapi/0.3.DL-1/CFonts.h new file mode 100644 index 00000000..e68b9a57 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CFonts.h @@ -0,0 +1,47 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +#undef DrawText + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class CFont; + +class SAMPAPI_EXPORT CFonts { +public: + CFont* m_pFont; + CFont* m_pLittleFont; + CFont* m_pShadow; + CFont* m_pLittleShadow; + CFont* m_pLicensePlateFont; + ID3DXSprite* m_pDefaultSprite; + IDirect3DDevice9* m_pDevice; + char* m_szTempBuffer; + + CFonts(IDirect3DDevice9* pDevice); + ~CFonts(); + + void OnLostDevice(); + void OnResetDevice(); + void GetTextScreenSize(void* pSize, const char* szText, int nFormat); + void GetLittleTextScreenSize(void* pSize, const char* szText, int nFormat); + void DrawText(ID3DXSprite* pSprite, const char* szText, CRect rect, D3DCOLOR color, BOOL bShadow); + void DrawLittleText(ID3DXSprite* pSprite, const char* szText, CRect rect, int nFormat, D3DCOLOR color, BOOL bShadow); + void DrawLicensePlateText(const char* szText, CRect rect, D3DCOLOR color); + void Reset(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CFonts*& RefFontRenderer(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CGame.h b/include/sampapi/0.3.DL-1/CGame.h new file mode 100644 index 00000000..f888adfd --- /dev/null +++ b/include/sampapi/0.3.DL-1/CGame.h @@ -0,0 +1,142 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CPed.h" +#include "sampapi/0.3.DL-1/CAudio.h" +#include "sampapi/0.3.DL-1/CCamera.h" +#include "sampapi/0.3.DL-1/CObject.h" + +class CWeaponInfo; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +enum CursorMode { + CURSOR_NONE, + CURSOR_LOCKKEYS_NOCURSOR, + CURSOR_LOCKCAMANDCONTROL, + CURSOR_LOCKCAM, + CURSOR_LOCKCAM_NOCURSOR +}; + +class SAMPAPI_EXPORT CGame { +public: + CAudio* m_pAudio; + CCamera* m_pCamera; + CPed* m_pPlayerPed; + + struct SAMPAPI_EXPORT { + CVector m_position; + CVector m_size; + BOOL m_bEnabled; + GTAREF m_handle; + } m_checkpoint; + + struct SAMPAPI_EXPORT { + CVector m_currentPosition; + CVector m_nextPosition; + float m_fSize; + char m_nType; + BOOL m_bEnabled; + GTAREF m_marker; + GTAREF m_handle; + } m_racingCheckpoint; + + int m_nCursorMode; + unsigned int m_nInputEnableWaitFrames; + BOOL m_bClockEnabled; + int field_61; + BOOL m_bHeadMove; + int m_nFrameLimiter; + char field_6d; + bool m_aKeepLoadedVehicleModels[212]; + + static SAMPAPI_EXPORT SAMPAPI_VAR char*& RefGameTextMessage(); // [256], temp buffer + static SAMPAPI_EXPORT SAMPAPI_VAR BOOL* ArrayUsedPlayerSlots(); // [SAMP_MAX_PLAYER_PED_SLOTS] + + CGame(); + + CPed* GetPlayerPed(); + float FindGroundZ(CVector point); + void SetCursorMode(int nMode, BOOL bImmediatelyHideCursor); + void InitGame(); + void StartGame(); + BOOL IsMenuVisible(); + BOOL IsStarted(); + void RequestModel(int nModel, int nLoadingStream = SAMPAPI_UNUSED); + void LoadRequestedModels(); + BOOL IsModelAvailable(int nModel); + void ReleaseModel(int nModel, bool bGameFunc = true); + void SetWorldTime(char nHour, char nMinute); + void GetWorldTime(char* nHour, char* nMinute); + void LetTimeGo(bool blet); + void SetWorldWeather(char nWeather); + void SetFrameLimiter(int nValue); + void SetMaxStats(); + void DisableTrainTraffic(); + void RefreshRenderer(float fX, float fY); + void RequestAnimation(const char* szFile); + BOOL IsAnimationLoaded(const char* szFile); + void ReleaseAnimation(const char* szFile); + void DisplayGameText(const char* szText, int nType, int nSize); + void DeleteRacingCheckpoint(); + GTAREF CreateMarker(int nIcon, CVector position, int nColor, int nType); + void DeleteMarker(GTAREF handle); + char GetCurrentInterior(); + void UpdateFarClippingPlane(); + void IncreasePlayerMoney(int nInc); + int GetPlayerMoney(); + const char* GetWeaponName(int nWeapon); + void CreatePickup(int nModel, int nType, CVector position, GTAREF* handle); + GTAREF CreateWeaponPickup(int nModel, int nAmmo, CVector position); + IDirect3DDevice9* GetDevice(); + void Restart(); + CWeaponInfo* GetWeaponInfo(int nWeapon, int nSkill); + void SetWorldGravity(float fValue); + void SetWantedLevel(char nLevel); + void SetNumberOfIntroTextLinesThisFrame(unsigned short nValue); + void DrawGangZone(float* pPos, char nColor); + void EnableZoneDisplaying(bool bEnable); + void EnableStuntBonus(bool bEnable); + void LoadScene(const char* szFile); + int GetUsedMemory(); + int GetStreamingMemory(); + void SetRequiredVehicleModels(unsigned char* pModelCount); + int GetTimer(); + void LoadAnimationsAndModels(); + void LoadCollisionFile(const char* szFile); + void LoadCullZone(const char* szLine); + BOOL UsingGamepad(); + void DisableAutoAiming(); + void EnableHUD(BOOL bEnable); + void SetCheckpoint(CVector* pPos, CVector* pSize); + void CreateRacingCheckpoint(); + void ProcessCheckpoints(); + void ResetMoney(); + void SetRacingCheckpoint(int nType, CVector* pCurrentPos, CVector* pNextPos, float fSize); + void EnableRadar(BOOL bEnable); + void* GetWindowHandle(); + CAudio* GetAudio(); + CCamera* GetCamera(); + BOOL DoesHeadMoves(); + void EnableClock(bool bEnable); + void Sleep(int elapsed, int fpsLimit); + CPed* CreatePed(int nModel, CVector position, float fRotation, int a6, int a7); + BOOL RemovePed(CPed* pPed); + CVehicle* CreateVehicle(int nModel, CVector position, float fRotation, BOOL bHasSiren); + CObject* CreateObject(int nModel, CVector position, CVector rotation, float fDrawDistance, char a11, char a12); + void ProcessInputEnabling(); + void ProcessFrameLimiter(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CGame*& RefGame(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CGangZonePool.h b/include/sampapi/0.3.DL-1/CGangZonePool.h new file mode 100644 index 00000000..e163200b --- /dev/null +++ b/include/sampapi/0.3.DL-1/CGangZonePool.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT GangZone { + struct SAMPAPI_EXPORT { + float left; + float bottom; + float right; + float top; + } m_rect; + D3DCOLOR m_color; + D3DCOLOR m_altColor; +}; + +class SAMPAPI_EXPORT CGangZonePool { +public: + enum { MAX_GANGZONES = 1024 }; + + GangZone* m_pObject[MAX_GANGZONES]; + BOOL m_bNotEmpty[MAX_GANGZONES]; + + CGangZonePool(); + ~CGangZonePool(); + + void Create(ID nId, float left, float top, float right, float bottom, D3DCOLOR color); + void StartFlashing(ID nId, D3DCOLOR color); + void StopFlashing(ID nId); + void Delete(ID nId); + void Draw(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CHelpDialog.h b/include/sampapi/0.3.DL-1/CHelpDialog.h new file mode 100644 index 00000000..b0d91818 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CHelpDialog.h @@ -0,0 +1,27 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CHelpDialog { +public: + IDirect3DDevice9* m_pDevice; + + CHelpDialog(IDirect3DDevice9* pDevice = SAMPAPI_UNUSED); + + void Show(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CHelpDialog*& RefHelpDialog(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CHttpClient.h b/include/sampapi/0.3.DL-1/CHttpClient.h new file mode 100644 index 00000000..a52a1d7a --- /dev/null +++ b/include/sampapi/0.3.DL-1/CHttpClient.h @@ -0,0 +1,81 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CHttpClient { +public: + enum { + RECEIVE_BUFFER_SIZE = 4096 + }; + + struct SAMPAPI_EXPORT Request { + enum RequestType { + GET = 1, + POST, + HEAD + }; + + unsigned short m_nPort; + int m_nType; + char* m_szHost; + char* m_szFile; + char* m_szData; + char* m_szReferer; + }; + + struct SAMPAPI_EXPORT Response { + enum ContentType { + CONTENT_UNKNOWN, + CONTENT_TEXT, + CONTENT_HTML + }; + + char* m_szHeader; + char* m_szResponse; + unsigned int m_nHeaderLen; + unsigned int m_nResponseLen; + unsigned int m_nResponseCode; + unsigned int m_nContentType; + }; + + enum ErrorCode { + ERROR_SUCCESS, + ERROR_BAD_HOST, + ERROR_NO_SOCKET, + ERROR_CANNOT_CONNECT, + ERROR_CANNOT_WRITE, + ERROR_TOO_BIG_CONTENT, + ERROR_INCORRECT_RESPONSE + }; + + int m_nSocket; + Request m_request; + Response m_response; + ErrorCode m_error; + + CHttpClient(); + ~CHttpClient(); + + bool GetHeaderValue(const char* szHeaderName, char* szBuffer, int nBufferLen); + void InitializeRequest(int nType, const char* szUrl, const char* szPostData, const char* szReferer); + void HandleEntity(); + bool Connect(const char* szHost, int nPort); + void Process(); + void Disconnect(); + ErrorCode ProcessUrl(int nType, const char* szUrl, const char* szPostData, const char* szReferer); + bool Send(const char* szBuffer); + int Receive(char* szBuffer, int nBufferLen); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CInput.h b/include/sampapi/0.3.DL-1/CInput.h new file mode 100644 index 00000000..e9345e1c --- /dev/null +++ b/include/sampapi/0.3.DL-1/CInput.h @@ -0,0 +1,59 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" +#include "sampapi/0.3.DL-1/Commands.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CInput { +public: + enum { + MAX_CLIENT_CMDS = 144, + MAX_CMD_LENGTH = 32, + }; + + IDirect3DDevice9* m_pDevice; + CDXUTDialog* m_pGameUi; + CDXUTEditBox* m_pEditbox; + CMDPROC m_pCommandProc[MAX_CLIENT_CMDS]; + char m_szCommandName[MAX_CLIENT_CMDS][MAX_CMD_LENGTH + 1]; + int m_nCommandCount; + BOOL m_bEnabled; + char m_szInput[129]; + char m_szRecallBufffer[10][129]; + char m_szCurrentBuffer[129]; + int m_nCurrentRecall; + int m_nTotalRecall; + CMDPROC m_pDefaultCommand; + + CInput(IDirect3DDevice9* pDevice); + + void GetRect(CRect* pRect); + void Open(); + void Close(); + void AddRecall(const char* szString); + void RecallUp(); + void RecallDown(); + void EnableCursor(); + CMDPROC GetCommandHandler(const char* szName); + void SetDefaultCommand(CMDPROC handler); + void AddCommand(const char* szName, CMDPROC handler); + BOOL MsgProc(int uMsg, int wParam, int lParam); + void ResetDialogControls(CDXUTDialog* pGameUi); + void Send(const char* szString); + void ProcessInput(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CInput*& RefInputBox(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CLabel.h b/include/sampapi/0.3.DL-1/CLabel.h new file mode 100644 index 00000000..c8993a73 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CLabel.h @@ -0,0 +1,35 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CLabel { +public: + IDirect3DDevice9* m_pDevice; + ID3DXSprite* m_pSprite; + + CLabel(IDirect3DDevice9* pDevice); + ~CLabel(); + + void OnLostDevice(); + void OnResetDevice(); + BOOL HasNoObstacles(CVector position); + void Begin(); + void End(); + void Draw(CVector* pPosition, const char* szText, D3DCOLOR color, BOOL bShadow, bool bNoObstacles); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CLabel*& RefLabel(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CLabelPool.h b/include/sampapi/0.3.DL-1/CLabelPool.h new file mode 100644 index 00000000..bfd05e8c --- /dev/null +++ b/include/sampapi/0.3.DL-1/CLabelPool.h @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT TextLabel { + char* m_pText; + D3DCOLOR m_color; + CVector m_position; + float m_fDrawDistance; + bool m_bBehindWalls; + ID m_nAttachedToPlayer; + ID m_nAttachedToVehicle; +}; + +class SAMPAPI_EXPORT CLabelPool { +public: + enum { MAX_TEXT_LABELS = 2048 }; + + TextLabel m_object[MAX_TEXT_LABELS]; + BOOL m_bNotEmpty[MAX_TEXT_LABELS]; + + CLabelPool(); + ~CLabelPool(); + + void Create(ID nId, const char* szText, D3DCOLOR color, CVector position, float fDrawDistance, bool bBehindWalls, ID nAttachedToPlayer, ID nAttachedToVehicle); + BOOL Delete(ID nId); + void Draw(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CLicensePlate.h b/include/sampapi/0.3.DL-1/CLicensePlate.h new file mode 100644 index 00000000..37c306a1 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CLicensePlate.h @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CLicensePlate { +public: + static constexpr auto DEFAULT_PLATE_FONT = "Arial"; + static constexpr auto DEFAULT_PLATE_TEXT = "XYZSR998"; + enum { + DEFAULT_PLATE_TEXT_COLOR = 0xEE444470, + DEFAULT_PLATE_BG_COLOR = 0xFFBEB6A8, + }; + + IDirect3DDevice9* m_pDevice; + ID3DXRenderToSurface* m_pRenderer; + IDirect3DTexture9* m_pTexture; + IDirect3DSurface9* m_pSurface; +#ifdef _d3d9TYPES_H_ + D3DDISPLAYMODE m_displayMode; +#else + unsigned int m_displayMode[4]; +#endif + IDirect3DTexture9* m_pDefaultPlate; + + CLicensePlate(IDirect3DDevice9* pDevice); + ~CLicensePlate(); + + void OnLostDevice(); + void OnResetDevice(); + IDirect3DTexture9* Create(const char* szText); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CLicensePlate*& RefLicensePlateManager(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CLocalPlayer.h b/include/sampapi/0.3.DL-1/CLocalPlayer.h new file mode 100644 index 00000000..98a5cafe --- /dev/null +++ b/include/sampapi/0.3.DL-1/CLocalPlayer.h @@ -0,0 +1,217 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CPed.h" +#include "sampapi/0.3.DL-1/Synchronization.h" +#include "sampapi/0.3.DL-1/CVehicle.h" +#include "sampapi/0.3.DL-1/Animation.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +enum SpectatingMode : unsigned char { + SPECTATING_MODE_VEHICLE = 3, + SPECTATING_MODE_PLAYER = 4, + SPECTATING_MODE_FIXED = 15, + SPECTATING_MODE_SIDE = 14 +}; + +enum SpectatingType : unsigned char { + SPEC_TYPE_NONE, + SPEC_TYPE_PLAYER, + SPEC_TYPE_VEHICLE +}; + +enum SurfingMode : unsigned int { + SURF_MODE_NONE, + SURF_MODE_UNFIXED, + SURF_MODE_FIXED +}; + +class SAMPAPI_EXPORT CLocalPlayer { +public: + CPed* m_pPed; + Synchronization::TrailerData m_trailerData; + Synchronization::OnfootData m_onfootData; + Synchronization::PassengerData m_passengerData; + Synchronization::IncarData m_incarData; + Synchronization::AimData m_aimData; + BOOL m_bIsActive; + BOOL m_bIsWasted; + ID m_nCurrentVehicle; + ID m_nLastVehicle; + Animation m_animation; + int field_104; + + struct SAMPAPI_EXPORT CameraTarget { + ID m_nObject; + ID m_nVehicle; + ID m_nPlayer; + ID m_nActor; + } m_cameraTarget; + + TICK m_lastCameraTargetUpdate; + + struct SAMPAPI_EXPORT { + CVector m_direction; + TICK m_lastUpdate; + TICK m_lastLook; + } m_head; + + TICK m_lastAnyUpdate; + BOOL m_bDoesSpectating; + NUMBER m_nTeam; + short field_131; + TICK m_lastUpdate; + TICK m_lastSpecUpdate; + TICK m_lastAimUpdate; + TICK m_lastStatsUpdate; + BOOL m_bClearedToSpawn; + TICK m_lastSelectionTick; + TICK m_initialSelectionTick; + + // used by RPC_SetSpawnInfo + struct SAMPAPI_EXPORT SpawnInfo { + NUMBER m_nTeam; + int m_nSkin; + int m_nCustomSkin; + char field_9; + CVector m_position; + float m_fRotation; + int m_aWeapon[3]; + int m_aAmmo[3]; + } m_spawnInfo; + + BOOL m_bHasSpawnInfo; + TICK m_lastWeaponsUpdate; + + struct SAMPAPI_EXPORT { + ID m_nAimedPlayer; + ID m_nAimedActor; + NUMBER m_nCurrentWeapon; + NUMBER m_aLastWeapon[13]; + int m_aLastWeaponAmmo[13]; + } m_weaponsData; + + BOOL m_bPassengerDriveBy; + char m_nCurrentInterior; + BOOL m_bInRCMode; + char m_szName[256]; + + struct SAMPAPI_EXPORT { + ID m_nEntityId; + TICK m_lastUpdate; + + union SAMPAPI_EXPORT { + CVehicle* m_pVehicle; + class CObject* m_pObject; + }; + + BOOL m_bStuck; + BOOL m_bIsActive; + CVector m_position; + int field_1E; + int m_nMode; + } m_surfing; + + struct SAMPAPI_EXPORT { + BOOL m_bEnableAfterDeath; + int m_nSelected; + BOOL m_bWaitingForSpawnRequestReply; + BOOL m_bIsActive; + } m_classSelection; + + TICK m_zoneDisplayingEnd; + + struct SAMPAPI_EXPORT { + char m_nMode; + char m_nType; + int m_nObject; // id + BOOL m_bProcessed; + } m_spectating; + + struct SAMPAPI_EXPORT { + ID m_nVehicleUpdating; + int m_nBumper; + int m_nDoor; + char m_bLight; + char m_bWheel; + } m_damage; + + static SAMPAPI_EXPORT SAMPAPI_VAR unsigned long& RefTimeElapsedFromFPressed(); + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefIncarSendrate(); // = NETMODE_INCAR_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefOnfootSendrate(); // = NETMODE_ONFOOT_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefFiringSendrate(); // = NETMODE_FIRING_SENDRATE; + static SAMPAPI_EXPORT SAMPAPI_VAR int& RefSendMultiplier(); // = NETMODE_SEND_MULTIPLIER; + static SAMPAPI_EXPORT SAMPAPI_VAR bool& RefDrawCameraTargetLabel(); + + static void SendSpawnRequest(); + + CLocalPlayer(); + + CPed* GetPed(); + void ResetData(); + void ProcessHead(); + void SetSpecialAction(char nId); + char GetSpecialAction(); + void UpdateSurfing(); + void SetSurfing(CVehicle* pVehicle, BOOL bStuck); + void ProcessSurfing(); + void EndSurfing(); + BOOL NeedsToUpdate(const void* pOld, const void* pNew, unsigned int nLen); + int GetIncarSendRate(); + int GetOnfootSendRate(); + int GetUnoccupiedSendRate(); + void SetSpawnInfo(const SpawnInfo* pInfo); + BOOL Spawn(); + void SetColor(D3DCOLOR color); + D3DCOLOR GetColorAsRGBA(); + D3DCOLOR GetColorAsARGB(); + void ProcessOnfootWorldBounds(); + void ProcessIncarWorldBounds(); + void RequestSpawn(); + void PrepareForClassSelection(); + void PrepareForClassSelection_Outcome(BOOL bOutcome); + void EnableSpectating(BOOL bEnable); + void SpectateForVehicle(ID nId); + void SpectateForPlayer(ID nId); + BOOL NeedsToSendOnfootData(short controllerState, short sLeftStickX, short sLeftStickY); + BOOL NeedsToSendIncarData(short controllerState, short sLeftStickX, short sLeftStickY); + bool DefineCameraTarget(CameraTarget* pInfo); + void UpdateCameraTarget(); + void DrawCameraTargetLabel(); + void SendUnoccupiedData(ID nVehicle, char arg4); + void SendOnfootData(); + void SendAimData(); + void SendTrailerData(ID nTrailer); + void SendPassengerData(); + void WastedNotification(); + void RequestClass(int nId); + void ChangeInterior(char nId); + void Chat(const char* szText); + void EnterVehicle(int nVehicle, BOOL bPassenger); + void ExitVehicle(int nVehicle); + void SendStats(); + void UpdateVehicleDamage(ID nVehicle); + void NextClass(); + void PrevClass(); + void ProcessClassSelection(); + void UpdateWeapons(); + void ProcessSpectating(); + void SendTakeDamage(int nId, float fDamage, int nWeapon, int nBodyPart); + void SendGiveDamage(int nId, float fDamage, int nWeapon, int nBodyPart); + bool ProcessUnoccupiedSync(ID nVehicle, CVehicle* pVehicle); + void EnterVehicleAsPassenger(); + void SendIncarData(); + void Process(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CMakeLists.txt b/include/sampapi/0.3.DL-1/CMakeLists.txt new file mode 100644 index 00000000..aa836328 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CMakeLists.txt @@ -0,0 +1,64 @@ +target_sources(sampapi + PRIVATE + AimStuff.h + Animation.h + CActor.h + CActorPool.h + CAudio.h + CAudioStream.h + CCamera.h + CChat.h + CConfig.h + CDeathWindow.h + CDialog.h + CEntity.h + CFonts.h + CGame.h + CGangZonePool.h + CHttpClient.h + CInput.h + CLabel.h + CLabelPool.h + CLicensePlate.h + CLocalPlayer.h + CMenu.h + CMenuPool.h + CNetGame.h + CNetStats.h + CObject.h + CObjectPool.h + CObjectSelection.h + Commands.h + ControllerState.h + CPed.h + CPickupPool.h + CPlayerInfo.h + CPlayerPool.h + CPlayerTags.h + CRemotePlayer.h + CScoreboard.h + CSpawnScreen.h + CTextDraw.h + CTextDrawPool.h + CTextDrawSelection.h + CVehicle.h + CVehiclePool.h + DebugScript.h + Exception.h + GUI.h + InputHandler.h + KeyStuff.h + Scripting.h + Settings.h + SpecialAction.h + Synchronization.h + CChatBubble.h + CHelpDialog.h + CObjectMaterialText.h + CSrvNetStats.h + CObjectEdit.h + CDownloadedFilesPool.h + CDownloadWindow.h + CCustomModelsPool.h + CCustomModels.h +) diff --git a/include/sampapi/0.3.DL-1/CMenu.h b/include/sampapi/0.3.DL-1/CMenu.h new file mode 100644 index 00000000..f01bae00 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CMenu.h @@ -0,0 +1,57 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CMenu { +public: + enum { + MAX_MENU_ITEMS = 12, + MAX_COLUMNS = 2, + MAX_MENU_LINE = 32, + }; + + struct SAMPAPI_EXPORT Interaction { + BOOL m_bMenu; + BOOL m_bRow[MAX_MENU_ITEMS]; + BOOL m_bPadding[8 - ((MAX_MENU_ITEMS + 1) % 8)]; + }; + + unsigned char m_nId; + char m_szTitle[MAX_MENU_LINE]; + char m_szItems[MAX_MENU_ITEMS][MAX_COLUMNS][MAX_MENU_LINE]; + char m_szHeader[MAX_COLUMNS][MAX_MENU_LINE]; + float m_fPosX; + float m_fPosY; + float m_fFirstColumnWidth; + float m_fSecondColumnWidth; + unsigned char m_nColumns; + Interaction m_interaction; + unsigned char m_nColumnCount[MAX_COLUMNS]; + GTAREF m_panel; + + CMenu(float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const Interaction* pInteraction); + CMenu() { + Hide(); + } + void AddItem(NUMBER nColumn, NUMBER nRow, const char* szText); + void SetColumnTitle(NUMBER nColumn, const char* szText); + void Hide(); + char* GetItem(NUMBER nColumn, NUMBER nRow); + char* GetTitle(); + char* MS(NUMBER nColumn, NUMBER nRow); + char GetActiveRow(); + void Show(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CMenuPool.h b/include/sampapi/0.3.DL-1/CMenuPool.h new file mode 100644 index 00000000..df0fa6e5 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CMenuPool.h @@ -0,0 +1,37 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CMenu.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CMenuPool { +public: + enum { MAX_MENUS = 128 }; + + CMenu* m_pObject[MAX_MENUS]; + BOOL m_bNotEmpty[MAX_MENUS]; + NUMBER m_nCurrent; + bool m_bCanceled; + + CMenuPool(); + ~CMenuPool(); + + CMenu* Create(NUMBER nId, float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const CMenu::Interaction* pInteraction); + BOOL Delete(NUMBER nId); + void Show(NUMBER nId); + void Hide(NUMBER nId); + char* GetTextPointer(const char* szName); + void Process(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CNetGame.h b/include/sampapi/0.3.DL-1/CNetGame.h new file mode 100644 index 00000000..096393a2 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CNetGame.h @@ -0,0 +1,172 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.DL-1/CPlayerPool.h" +#include "sampapi/0.3.DL-1/CVehiclePool.h" +#include "sampapi/0.3.DL-1/CPickupPool.h" +#include "sampapi/0.3.DL-1/CGangZonePool.h" +#include "sampapi/0.3.DL-1/CTextDrawPool.h" +#include "sampapi/0.3.DL-1/CMenuPool.h" +#include "sampapi/0.3.DL-1/CObjectPool.h" +#include "sampapi/0.3.DL-1/CActorPool.h" +#include "sampapi/0.3.DL-1/CLabelPool.h" + +struct Packet; +class RakClientInterface; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +enum MarkersMode { + MARKERS_MODE_OFF, + MARKERS_MODE_GLOBAL, + MARKERS_MODE_STREAMED +}; + +class SAMPAPI_EXPORT CNetGame { +public: + enum GameMode { + GAME_MODE_WAITCONNECT = 0x1, + GAME_MODE_CONNECTING = 0x2, + GAME_MODE_CONNECTED = 0x5, + GAME_MODE_WAITJOIN = 0x6, + GAME_MODE_RESTARTING = 0xB + }; + enum { + NETMODE_STATS_UPDATE_DELAY = 1000, + NETMODE_INCAR_SENDRATE = 30, // passenger/trailer/incar/unoccupied + NETMODE_ONFOOT_SENDRATE = 30, // onfoot/unoccupied + NETMODE_FIRING_SENDRATE = 30, + LANMODE_INCAR_SENDRATE = 15, + LANMODE_ONFOOT_SENDRATE = 15, + NETMODE_SEND_MULTIPLIER = 2, + NETMODE_AIM_UPDATE_DELAY = 500, + NETMODE_HEAD_UPDATE_DELAY = 1000, + NETMODE_TARGET_UPDATE_DELAY = 100, + NETMODE_PLAYERS_UPDATE_DELAY = 3000, + }; + + struct SAMPAPI_EXPORT Pools { + CMenuPool* m_pMenu; + CActorPool* m_pActor; + CPlayerPool* m_pPlayer; + CVehiclePool* m_pVehicle; + CPickupPool* m_pPickup; + CObjectPool* m_pObject; + CGangZonePool* m_pGangZone; + CLabelPool* m_pLabel; + CTextDrawPool* m_pTextDraw; + }; + + struct SAMPAPI_EXPORT Settings { + bool m_bUseCJWalk; + unsigned int m_nDeadDropsMoney; + float m_fWorldBoundaries[4]; + bool m_bAllowWeapons; + float m_fGravity; + bool m_bEnterExit; + BOOL m_bVehicleFriendlyFire; + bool m_bHoldTime; + bool m_bInstagib; + bool m_bZoneNames; + bool m_bFriendlyFire; + BOOL m_bClassesAvailable; + float m_fNameTagsDrawDist; + bool m_bManualVehicleEngineAndLight; + unsigned char m_nWorldTimeHour; + unsigned char m_nWorldTimeMinute; + unsigned char m_nWeather; + bool m_bNoNametagsBehindWalls; + int m_nPlayerMarkersMode; + float m_fChatRadius; + bool m_bNameTags; + bool m_bLtdChatRadius; + }; + + char pad_0[44]; + RakClientInterface* m_pRakClient; + char m_szHostAddress[257]; + char m_szHostname[257]; + bool m_bDisableCollision; + bool m_bUpdateCameraTarget; + bool m_bNametagStatus; + int m_nPort; + BOOL m_bLanMode; + GTAREF m_aMapIcons[100]; + int m_nGameState; + TICK m_lastConnectAttempt; + Settings* m_pSettings; + char pad_2[5]; + Pools* m_pPools; + + static SAMPAPI_EXPORT SAMPAPI_VAR TICK& RefLastPlayersUpdateRequest(); + + CNetGame(const char* szHostAddress, int nPort, const char* szNick, const char* szPass); + ~CNetGame(); + + CPickupPool* GetPickupPool(); + CMenuPool* GetMenuPool(); + void SetState(int nValue); + void InitializePools(); + void InitialNotification(); + void InitializeGameLogic(); + void Connect(); + void SpawnScreen(); + void Packet_RSAPublicKeyMismatch(Packet* pPacket); + void Packet_ConnectionBanned(Packet* pPacket); + void Packet_ConnectionRequestAcepted(Packet* pPacket); + void Packet_NoFreeIncomingConnections(Packet* pPacket); + void Packet_DisconnectionNotification(Packet* pPacket); + void Packet_InvalidPassword(Packet* pPacket); + void Packet_ConnectionAttemptFailed(Packet* pPacket); + void UpdatePlayers(); + void DeleteMarker(NUMBER nIndex); + void ResetPlayerPool(); + void ResetVehiclePool(); + void ResetTextDrawPool(); + void ResetObjectPool(); + void ResetGangZonePool(); + void ResetPickupPool(); + void ResetMenuPool(); + void ResetLabelPool(); + void ResetActorPool(); + void Packet_UnoccupiedSync(Packet* pPacket); + void Packet_BulletSync(Packet* pPacket); + void Packet_AimSync(Packet* pPacket); + void Packet_PassengerSync(Packet* pPacket); + void Packet_TrailerSync(Packet* pPacket); + void Packet_MarkersSync(Packet* pPacket); + void Packet_AuthKey(Packet* pPacket); + void ResetMarkers(); + void CreateMarker(NUMBER nIndex, CVector position, char nIcon, int nColor, int nType); + void ResetPools(); + void ShutdownForRestart(); + void Packet_PlayerSync(Packet* pPacket); + void Packet_VehicleSync(Packet* pPacket); + void Packet_ConnectionLost(Packet* pPacket); + void Packet_ConnectionSucceeded(Packet* pPacket); + void UpdateNetwork(); + void Process(); + void ProcessGameStuff(); + CPlayerPool* GetPlayerPool(); + CObjectPool* GetObjectPool(); + CActorPool* GetActorPool(); + int GetState(); + BOOL LanMode(); + CVehiclePool* GetVehiclePool(); + RakClientInterface* GetRakClient(); + __int64 GetCounter(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CNetGame*& RefNetGame(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CNetStats.h b/include/sampapi/0.3.DL-1/CNetStats.h new file mode 100644 index 00000000..da24412e --- /dev/null +++ b/include/sampapi/0.3.DL-1/CNetStats.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CNetStats { +public: + unsigned long m_dwLastTotalBytesSent; + unsigned long m_dwLastTotalBytesRecv; + unsigned long m_dwLastUpdateTick; + unsigned long m_dwBPSUpload; + unsigned long m_dwBPSDownload; + IDirect3DDevice9* m_pDevice; + + CNetStats(IDirect3DDevice9* pDevice); + + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CNetStats*& RefNetStats(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CObject.h b/include/sampapi/0.3.DL-1/CObject.h new file mode 100644 index 00000000..2e1d7cfc --- /dev/null +++ b/include/sampapi/0.3.DL-1/CObject.h @@ -0,0 +1,130 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CEntity.h" +#include "sampapi/CMatrix.h" +#include "sampapi/0.3.DL-1/CVehicle.h" + +class CSprite2d; +struct RwTexture; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CObject : public CEntity { +public: + // void **m_lpVtbl = 0xECD1C; + char pad_0[6]; + int m_nModel; + char pad_1; + bool m_bDontCollideWithCamera; + float m_fDrawDistance; + float field_58; + CVector m_position; + float m_fDistanceToCamera; + bool m_bDrawLast; + char pad_2[64]; + CVector m_rotation; + char pad_3[5]; + ID m_nAttachedToVehicle; + ID m_nAttachedToObject; + CVector m_attachOffset; + CVector m_attachRotation; + bool m_bSyncRotation; + CMatrix m_targetMatrix; + char pad_4[148]; + char m_bMoving; + float m_fSpeed; + char pad_5[99]; + + enum { + MAX_MATERIALS = 16 + }; + enum MaterialType { + MATERIAL_TYPE_NONE = 0, + MATERIAL_TYPE_TEXTURE = 1, + MATERIAL_TYPE_TEXT = 2 + }; + enum MaterialSize { + MATERIAL_SIZE_32X32 = 10, + MATERIAL_SIZE_64X32 = 20, + MATERIAL_SIZE_64X64 = 30, + MATERIAL_SIZE_128X32 = 40, + MATERIAL_SIZE_128X64 = 50, + MATERIAL_SIZE_128X128 = 60, + MATERIAL_SIZE_256X32 = 70, + MATERIAL_SIZE_256X64 = 80, + MATERIAL_SIZE_256X128 = 90, + MATERIAL_SIZE_256X256 = 100, + MATERIAL_SIZE_512X64 = 110, + MATERIAL_SIZE_512X128 = 120, + MATERIAL_SIZE_512X256 = 130, + MATERIAL_SIZE_512X512 = 140 + }; + + struct SAMPAPI_EXPORT ObjectMaterial { + union { + ::CSprite2d* m_pSprite[MAX_MATERIALS]; + ::RwTexture* m_pTextBackground[MAX_MATERIALS]; + }; + + D3DCOLOR m_color[MAX_MATERIALS]; + char pad_6[68]; + int m_nType[MAX_MATERIALS]; + BOOL m_bTextureWasCreated[MAX_MATERIALS]; + + struct SAMPAPI_EXPORT MaterialText { + char m_nMaterialIndex; + char pad_0[137]; + char m_nMaterialSize; + char m_szFont[65]; + char m_nFontSize; + bool m_bBold; + D3DCOLOR m_fontColor; + D3DCOLOR m_backgroundColor; + char m_align; + }; + MaterialText m_textInfo[MAX_MATERIALS]; + char* m_szText[MAX_MATERIALS]; + IDirect3DTexture9* m_pBackgroundTexture[MAX_MATERIALS]; + IDirect3DTexture9* m_pTexture[MAX_MATERIALS]; + }; + ObjectMaterial m_material; + + BOOL m_bHasCustomMaterial; + char pad_9[13]; + + CObject(int nModel, CVector position, CVector rotation, float fDrawDistance, int a10, char a11, char a12); + + virtual ~CObject() = 0; + virtual void Add() = 0; + virtual void Remove() = 0; + + float GetDistance(const CMatrix* pMatrix); + void Stop(); + void SetRotation(const CVector* pVector); + void SetAttachedToVehicle(ID nId, const CVector* pOffset, const CVector* pRotation); + void SetAttachedToObject(ID nId, const CVector* pOffset, const CVector* pRotation, char a5); + void AttachToVehicle(CVehicle* pVehicle); + void AttachToObject(CObject* pObject); + void Rotate(CVector vector); + BOOL AttachedToMovingEntity(); + void SetMaterial(int nModel, int nIndex, const char* szTxd, const char* szTexture, D3DCOLOR color); + void SetMaterialText(int nIndex, const char* szText, char nMaterialSize, const char* szFont, char nFontSize, bool bBold, D3DCOLOR fontColor, D3DCOLOR backgroundColor, char align); + bool GetMaterialSize(int nSize, int* x, int* y); + void Render(); + void Process(float fElapsedTime); + void ConstructMaterialText(); + void Draw(); + void ShutdownMaterialText(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CObjectEdit.h b/include/sampapi/0.3.DL-1/CObjectEdit.h new file mode 100644 index 00000000..74acbbdc --- /dev/null +++ b/include/sampapi/0.3.DL-1/CObjectEdit.h @@ -0,0 +1,101 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , kin4stat + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/CMatrix.h" +#include "sampapi/CRect.h" +#include "sampapi/CPoint.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +enum ObjectEditType { + OBJECT_EDIT_TYPE_NONE = 0x0, + OBJECT_EDIT_TYPE_ATTACHEDOBJECT = 0x2, + OBJECT_EDIT_TYPE_OBJECT = 0x1, +}; + +enum ObjectEditMode { + OBJECT_EDIT_MODE_POSITION = 0x0, + OBJECT_EDIT_MODE_ROTATION = 0x1, + OBJECT_EDIT_MODE_SCALE = 0x2, +}; + +enum ObjectEditProcessType { + OBJECT_EDIT_PROCESS_TYPE_XAXIS = 0x0, + OBJECT_EDIT_PROCESS_TYPE_YAXIS = 0x1, + OBJECT_EDIT_PROCESS_TYPE_ZAXIS = 0x2, + OBJECT_EDIT_PROCESS_TYPE_SETPOSITION = 0x3, + OBJECT_EDIT_PROCESS_TYPE_SETROTATION = 0x4, + OBJECT_EDIT_PROCESS_TYPE_SETSCALE = 0x5, + OBJECT_EDIT_PROCESS_TYPE_SAVE = 0xA, +}; + +class CObjectEdit { +public: + CPoint m_CharMaxSize; + CRect m_xAxisButtonRect; + CRect m_yAxisButtonRect; + CRect m_zAxisButtonRect; + CRect m_PositionButtonRect; + CRect m_RotationButtonRect; + CRect m_ScaleButtonRect; + CRect m_SaveButtonRect; + int m_nEditType; + int m_nEditMode; + BOOL m_bEnabled; + BOOL m_bRenderedThisFrame; + ID m_nEditObjectId; + unsigned int m_nAttachedObjectIndex; + BOOL m_bIsPlayerObject; + CVector m_vRotation; + unsigned int m_nLastSentNotificationTick; + bool m_bRenderScaleButton; + bool m_bEditingRightNow; + bool m_bTopXOfObjectIsOnLeftOfScreen; + bool m_bTopYOfObjectIsOnLeftOfScreen; + bool m_bTopZOfObjectIsOnLeftOfScreen; + CPoint m_EditStartPos; + CPoint m_CursorPosInGame; + BOOL m_bObjectXSizeYCoordDiffMoreThanX; + BOOL m_bObjectYSizeYCoordDiffMoreThanX; + BOOL m_bObjectZSizeYCoordDiffMoreThanX; + CMatrix m_entityMatrix; + IDirect3DDevice9* m_pDevice; + ID3DXLine* m_pLine; + ID3DXFont* m_pIconFontSmall; + ID3DXFont* m_pIconFontBig; + int m_nProcessType; + + CObjectEdit(IDirect3DDevice9* RefDevice); + float WorldToScreen(CVector* in, float (&out)[2]); + float WorldToScreen(CVector* in, float*); + int RenderAxes(CMatrix* a2, float linesize); + const char* GetRenderChar(BOOL for_big_font); + void TryChangeProcessType(); + void SetEditMode(ObjectEditMode mode); + void ResetMousePos(); + void EnterEditObject(ID object_id, BOOL player_object); + void SendEditEndNotification(int response); + void SendAttachedEditEndNotification(int response); + void Disable(BOOL result); + BOOL RenderControlsForObject(CMatrix* object_matrix, float linesize); + void ApplyChanges(ObjectEditProcessType type, float diff); + void ProcessMouseMove(); + BOOL MsgProc(int uMsg, int wParam, int lParam); + void Render(); + + static const char* GetMaxSizeChar(); +}; + +CObjectEdit*& RefObjectEdit(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CObjectMaterialText.h b/include/sampapi/0.3.DL-1/CObjectMaterialText.h new file mode 100644 index 00000000..df9ba566 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CObjectMaterialText.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CObjectMaterialText { +public: + IDirect3DDevice9* m_pDevice; + ID3DXSprite* m_pSprite; + ID3DXSprite* m_pSprite_0; // maybe unused + + CObjectMaterialText(IDirect3DDevice9* pDevice); + ~CObjectMaterialText(); + + void OnResetDevice(); + void OnLostDevice(); + IDirect3DTexture9* Create(const char* szText, const char* szFont, char nFontSize, int nBgSizeX, int nBgSizeY, D3DCOLOR fontColor, D3DCOLOR bgColor, bool bBold, char align); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectMaterialText*& RefObjectMaterialTextManager(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CObjectPool.h b/include/sampapi/0.3.DL-1/CObjectPool.h new file mode 100644 index 00000000..25eebdc7 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CObjectPool.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CObject.h" + +class CObject; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CObjectPool { +public: + enum { MAX_OBJECTS = 2100 }; + + int m_nLargestId; + BOOL m_bNotEmpty[MAX_OBJECTS]; + CObject* m_pObject[MAX_OBJECTS]; + + CObjectPool(); + ~CObjectPool(); + + void UpdateLargestId(); + int GetCount(); + BOOL Delete(ID nId); + BOOL Create(ID nId, int nModel, CVector position, CVector rotation, float fDrawDistance); + CObject* Find(::CObject* pGameObject); + int GetId(::CObject* pGameObject); + void Process(); + void ConstructMaterials(); + void ShutdownMaterials(); + void Draw(); + void DrawLast(); + CObject* Get(ID nId); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CObjectSelection.h b/include/sampapi/0.3.DL-1/CObjectSelection.h new file mode 100644 index 00000000..dafe6c62 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CObjectSelection.h @@ -0,0 +1,33 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CObjectSelection { +public: + BOOL m_bIsActive; + ID m_nHoveredObject; + + CObjectSelection(); + + ID DefineObject(); + void DrawLabels(); + void Enable(BOOL bEnable); + void Draw(); + void SendNotification(); + BOOL MsgProc(int uMsg, int wParam, int lParam); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CObjectSelection*& RefObjectSelection(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CPed.h b/include/sampapi/0.3.DL-1/CPed.h new file mode 100644 index 00000000..f20bfeeb --- /dev/null +++ b/include/sampapi/0.3.DL-1/CPed.h @@ -0,0 +1,187 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/AimStuff.h" +#include "sampapi/0.3.DL-1/CEntity.h" + +class CPed; +class CWeapon; +class CEntity; +class CVehicle; +class CWeaponInfo; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CPed : public CEntity { +public: + enum { MAX_ACCESSORIES = 10 }; + enum StuffType { + STUFF_TYPE_NONE, + STUFF_TYPE_BEER, + STUFF_TYPE_DYN_BEER, + STUFF_TYPE_PINT_GLASS, + STUFF_TYPE_CIGGI + }; + + struct SAMPAPI_EXPORT Accessory { + int m_nModel; + int m_nBone; + CVector m_offset; + CVector m_rotation; + CVector m_scale; + D3DCOLOR m_firstMaterialColor; + D3DCOLOR m_secondMaterialColor; + }; + + // void **m_lpVtbl = 0xED140; + BOOL m_bUsingCellphone; + + struct SAMPAPI_EXPORT { + BOOL m_bNotEmpty[MAX_ACCESSORIES]; + Accessory m_info[MAX_ACCESSORIES]; + class CObject* m_pObject[MAX_ACCESSORIES]; + } m_accessories; + + ::CPed* m_pGamePed; + unsigned int pad_2a8[2]; + unsigned char m_nPlayerNumber; + unsigned int pad_2b1[2]; + GTAREF m_parachuteObject; + GTAREF m_urinatingParticle; + + struct SAMPAPI_EXPORT { + int m_nType; + GTAREF m_object; + unsigned int m_nDrunkLevel; + } m_stuff; + + GTAREF m_arrow; + unsigned char field_2de; + BOOL m_bDoesDancing; + unsigned int m_nDanceStyle; + unsigned int m_nLastDanceMove; + unsigned char pad_2de[20]; + BOOL m_bDoesUrinating; + unsigned char pad[55]; + + CPed(); + CPed(int nPlayerNumber, int nModel, CVector position, float fRotation); + + virtual ~CPed() = 0; + + void ResetPointers(); + void SetInitialState(); + AimStuff::Aim* GetAim(); + void SetAim(const AimStuff::Aim* pAim); + char GetCurrentWeapon(); + GTAREF GetVehicleRef(); + void DeleteArrow(); + BOOL IsOnScreen(); + void SetImmunities(BOOL BP, BOOL FP, BOOL EP, BOOL CP, BOOL MP); + float GetHealth(); + void SetHealth(float fValue); + float GetArmour(); + void SetArmour(float fValue); + int GetFlags(); + void SetFlags(int nValue); + BOOL IsDead(); + char GetState(); + void SetState(char nValue); + float GetRotation(); + void ForceRotation(float fValue); + void SetRotation(float fValue); + BOOL IsPassenger(); + ::CVehicle* GetVehicle(); + void ClearWeapons(); + void SetArmedWeapon(int nWeapon, bool bGameFunc = true); + void RemoveWeaponWhenEnteringVehicle(); + ::CWeapon* GetCurrentWeaponSlot(); + BOOL CurrentWeaponHasAmmo(); + float GetDistanceToEntity(const CEntity* pEntity); + int GetVehicleSeatIndex(); + void PutIntoVehicle(GTAREF vehicle, int nSeat); + void EnterVehicle(GTAREF vehicle, BOOL bAsPassenger); + void ExitVehicle(); + void WarpFromVehicle(CVector putAt); + void SetSpawnInfo(const CVector* pPosition, float fRotation); + void SetControllable(BOOL bEnable); + char GetDeathInfo(ID* pKiller); + ::CEntity* GetFloor(); + ::CWeaponInfo* GetCurrentWeaponInfo(); + void HandsUp(); + BOOL DoesHandsUp(); + void HoldObject(int nModel); + void EnableJetpack(); + void DisableJetpack(); + BOOL HasJetpack(); + BOOL EnablePassengerDrivebyMode(); + void Extinguish(); + unsigned short GetCurrentWeaponAmmo(); + ::CWeapon* GetWeaponSlot(int nWeapon); + void SetWalkStyle(const char* szName); + void PerformAnimation(const char* szName, const char* szFile, float fFramedelta, int loopa, int nLockX, int nLockY, int nLockF, int nTime); + void LinkToInterior(char nId, BOOL bRefresh); + void DestroyParachute(); + BOOL OpenParachute(); // create + void ProcessParachuteEvent(const char* szName); + BOOL IsOnGround(); + void ResetDamageEntity(); + void RemoveWeaponModel(int nWeapon); + float GetAimZ(); + void SetAimZ(float fValue); + ::CEntity* GetContactEntity(); + ::CVehicle* GetContactVehicle(); + int GetStat(); + BOOL PerformingCustomAnimation(); + void StartDancing(int nStyle); + void StopDancing(); + BOOL DoesDancing(); + const char* GetAnimationForDance(int nMove); + void DropStuff(); + int GetStuff(); // type + BOOL ApplyStuff(); + void ProcessDrunk(); + int GetDrunkLevel(); + void SetDrunkLevel(int nValue); + void ApplyCommandTask(const char* szName, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11); + void DestroyCommandTask(); + void EnableCellphone(BOOL bEnable); + BOOL UsingCellphone(); + void SetFightingStyle(int nStyle); + void StartUrinating(); + void StopUrinating(); + BOOL DoesUrinating(); + const char* GetLoadedShoppingDataSubsection(); + void LoadShoppingDataSubsection(const char* szName); + ::CPed* GetAimedPed(); + void SetKeys(short controllerState, short sLeftStickX, short sLeftStickY); + short GetKeys(short* pLeftStickX, short* pLeftStickY); + void CreateArrow(int nColor); + void SetModelIndex(int nModel); + void Kill(); + void SetWeaponAmmo(unsigned char nWeapon, unsigned short nAmmo); + void ProcessDancing(); + void GiveStuff(int nType); + void Destroy(); + void SetCameraMode(char nMode); + void SetCameraExtZoomAndAspectRatio(float fExtZoom, float fAspectRatio); + BOOL HasAccessory(); + void DeleteAccessory(int nSlot); + BOOL GetAccessoryState(int nSlot); + void DeleteAllAccessories(); + void AddAccessory(int nSlot, const Accessory* pInfo); + CObject* GetAccessory(int nSlot); + char GetCameraMode(); + void GetBonePosition(unsigned int boneId, CVector* outPosition); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CPickupPool.h b/include/sampapi/0.3.DL-1/CPickupPool.h new file mode 100644 index 00000000..8b68f5f2 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CPickupPool.h @@ -0,0 +1,51 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT Pickup { + int m_nModel; + int m_nType; + CVector m_position; +}; + +struct SAMPAPI_EXPORT WeaponPickup { + bool m_bExists; + ID m_nExOwner; +}; + +class SAMPAPI_EXPORT CPickupPool { +public: + enum { MAX_PICKUPS = 4096 }; + + int m_nCount; + GTAREF m_handle[MAX_PICKUPS]; + int m_nId[MAX_PICKUPS]; + unsigned long m_nTimer[MAX_PICKUPS]; + WeaponPickup m_weapon[MAX_PICKUPS]; + Pickup m_object[MAX_PICKUPS]; + + CPickupPool(); + ~CPickupPool(); + + void Create(Pickup* pData, int nId); + void CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner); + void Delete(int nId); + void DeleteWeapon(ID nExOwner); + int GetIndex(int nId); + void SendNotification(int nId); + void Process(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CPlayerInfo.h b/include/sampapi/0.3.DL-1/CPlayerInfo.h new file mode 100644 index 00000000..db6dfdda --- /dev/null +++ b/include/sampapi/0.3.DL-1/CPlayerInfo.h @@ -0,0 +1,36 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CRemotePlayer.h" +#include + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CPlayerInfo { +public: + int m_nScore; + BOOL m_bIsNPC; + CRemotePlayer* m_pPlayer; + unsigned int m_nPing; +#ifndef _DEBUG +private: + unsigned int __align; + +public: +#endif + std::string m_szNick; + + CPlayerInfo(const char* szName, BOOL bIsNPC); + ~CPlayerInfo(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CPlayerPool.h b/include/sampapi/0.3.DL-1/CPlayerPool.h new file mode 100644 index 00000000..8fd54e34 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CPlayerPool.h @@ -0,0 +1,67 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CPlayerInfo.h" +#include "sampapi/0.3.DL-1/CLocalPlayer.h" +#include + +class CObject; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CPlayerPool { +public: + enum { MAX_PLAYERS = 1004 }; + + ID m_nLocalPlayerId; +#ifndef _DEBUG +private: + int __align; + +public: +#endif + std::string m_szLocalPlayerName; + CLocalPlayer* pLocalPlayer; + int m_nLargestId; + CPlayerInfo* m_pObject[MAX_PLAYERS]; + BOOL m_bNotEmpty[MAX_PLAYERS]; + BOOL m_bPrevCollisionFlag[MAX_PLAYERS]; + int m_nLocalPlayerPing; + int m_nLocalPlayerScore; + CPlayerPool(); + ~CPlayerPool(); + + void UpdateLargestId(); + void Process(); + ID Find(::CPed* pGamePed); + void Deactivate(); + void ForceCollision(); + void RestoreCollision(); + BOOL Delete(ID nId, int nReason = SAMPAPI_UNUSED); + BOOL Create(ID nId, const char* szName, BOOL bIsNPC); + CRemotePlayer* GetPlayer(ID nId); + const char* GetLocalPlayerName(); + BOOL IsDisconnected(ID nId); + BOOL IsConnected(ID nId); + void SetLocalPlayerName(const char* szName); + void SetAt(ID nId, CPlayerInfo* pObject); + int GetScore(ID nId); + int GetPing(ID nId); + const char* GetName(ID nId); + int GetLocalPlayerPing(); + int GetLocalPlayerScore(); + int GetCount(BOOL bIncludeNPC = 0); + CLocalPlayer* GetLocalPlayer(); + CObject* FindAccessory(::CObject* pGameObject); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CPlayerTags.h b/include/sampapi/0.3.DL-1/CPlayerTags.h new file mode 100644 index 00000000..ee7366dc --- /dev/null +++ b/include/sampapi/0.3.DL-1/CPlayerTags.h @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CPlayerTags { +public: + IDirect3DDevice9* m_pDevice; + IDirect3DStateBlock9* m_pStates; + ID3DXSprite* m_pSprite; + + CPlayerTags(IDirect3DDevice9* pDevice); + ~CPlayerTags(); + + void EndHealthBar(); + void BeginLabel(); + void EndLabel(); + void DrawLabel(CVector* pPosition, const char* szText, D3DCOLOR color, float fDistanceToCamera, bool bDrawStatus, int nStatus); + void DrawHealthBar(CVector* pPosition, float fHealth, float fArmour, float fDistanceToCamera); + void OnLostDevice(); + void OnResetDevice(); + void BeginHealthBar(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CPlayerTags*& RefPlayerTags(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CRemotePlayer.h b/include/sampapi/0.3.DL-1/CRemotePlayer.h new file mode 100644 index 00000000..16d0bea5 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CRemotePlayer.h @@ -0,0 +1,139 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.DL-1/CVehicle.h" +#include "sampapi/0.3.DL-1/Synchronization.h" +#include "sampapi/0.3.DL-1/CPed.h" +#include "sampapi/0.3.DL-1/Animation.h" +#include "sampapi/0.3.DL-1/SpecialAction.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CRemotePlayer { +public: + enum PlayerState { + PLAYER_STATE_NONE, + PLAYER_STATE_ONFOOT = 17, + PLAYER_STATE_DRIVER = 19, + PLAYER_STATE_PASSENGER = 18, + PLAYER_STATE_WASTED = 32, + PLAYER_STATE_SPAWNED = 33, + }; + enum UpdateType { + UPDATE_TYPE_NONE, + UPDATE_TYPE_ONFOOT = 16, + UPDATE_TYPE_INCAR = 17, + UPDATE_TYPE_PASSENGER = 18, + }; + enum PlayerStatus { PLAYER_STATUS_TIMEOUT = 2 }; + + ID m_nId; + ID m_nVehicleId; + CPed* m_pPed; + CVehicle* m_pVehicle; + int field_14; + BOOL m_bDrawLabels; + BOOL m_bHasJetpack; + unsigned char m_nSpecialAction; + unsigned char m_nTeam; + unsigned char m_nState; + unsigned char m_nSeatId; + int field_1C; + BOOL m_bPassengerDriveBy; + Synchronization::PassengerData m_passengerData; + Synchronization::OnfootData m_onfootData; + Synchronization::IncarData m_incarData; + Synchronization::TrailerData m_trailerData; + Synchronization::AimData m_aimData; + int pad_114[3]; + CVector m_onfootTargetPosition; + CVector m_onfootTargetSpeed; + CVector m_incarTargetPosition; + CVector m_incarTargetSpeed; + int pad_150[64]; + CVector m_positionDifference; + + struct SAMPAPI_EXPORT { + float real; + CVector imag; + } m_incarTargetRotation; + + float m_fReportedArmour; + float m_fReportedHealth; + int pad_1B4[3]; + Animation m_animation; + unsigned char m_nUpdateType; + TICK m_lastUpdate; + TICK m_lastTimestamp; + BOOL m_bPerformingCustomAnimation; + int m_nStatus; + + struct SAMPAPI_EXPORT { + CVector m_direction; + TICK m_lastUpdate; + TICK m_lastLook; + } m_head; + + BOOL m_bMarkerState; + + struct SAMPAPI_EXPORT { + int x, y, z; + } m_markerPosition; + + GTAREF m_marker; + + CRemotePlayer(); + ~CRemotePlayer(); + + void ProcessHead(); + void SetMarkerState(BOOL bState); + void SetMarkerPosition(int x, int y, int z); + BOOL SurfingOnVehicle(); + BOOL SurfingOnObject(); + void ProcessSurfing(); + void OnEnterVehicle(); + void OnExitVehicle(); + void ProcessSpecialAction(); + void UpdateOnfootSpeedAndPosition(); + void UpdateOnfootRotation(); + void SetOnfootTargetSpeedAndPosition(CVector* pPosition, CVector* pSpeed); + void UpdateIncarSpeedAndPosition(); + void UpdateIncarRotation(); + void SetIncarTargetSpeedAndPosition(CMatrix* pMatrix, CVector* pPosition, CVector* pSpeed); + void UpdateTrain(CMatrix* pMatrix, CVector* pSpeed, float fSpeed); + void Update(Synchronization::AimData* pData); + void Update(Synchronization::UnoccupiedData* pData); + void Update(Synchronization::TrailerData* pData); + void ResetData(); + float GetDistanceToPlayer(CRemotePlayer* pPlayer); + float GetDistanceToLocalPlayer(); + void SetColor(D3DCOLOR color); // rgba + D3DCOLOR GetColorAsRGBA(); + D3DCOLOR GetColorAsARGB(); + void EnterVehicle(ID nId, BOOL bPassenger); + void ExitVehicle(); + void ChangeState(char nOld, char nNew); + int GetStatus(); + void Update(Synchronization::BulletData* pData); + void Process(); + BOOL Spawn(/* unused */ int a2, int nModel, /* unused */ int a4, CVector* pPosition, float fRotation, D3DCOLOR color, char nFightingStyle); + void Update(Synchronization::OnfootData* pData, TICK timestamp); + void Update(Synchronization::IncarData* pData, TICK timestamp); + void Update(Synchronization::PassengerData* pData, TICK timestamp = SAMPAPI_UNUSED); + void Remove(); + void Kill(); + void Chat(const char* szText); + BOOL DoesExist(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CScoreboard.h b/include/sampapi/0.3.DL-1/CScoreboard.h new file mode 100644 index 00000000..175d83ff --- /dev/null +++ b/include/sampapi/0.3.DL-1/CScoreboard.h @@ -0,0 +1,45 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CRect.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CScoreboard { +public: + BOOL m_bIsEnabled; + int m_nPlayerCount; + float m_position[2]; + float m_fScalar; + float m_size[2]; + float pad[5]; + IDirect3DDevice9* m_pDevice; + CDXUTDialog* m_pDialog; + CDXUTListBox* m_pListBox; + int m_nCurrentOffset; + BOOL m_bIsSorted; + + CScoreboard(IDirect3DDevice9* pDevice); + + void Recalc(); + void GetRect(CRect* pRect); + void Close(bool bHideCursor); + void ResetDialogControls(CDXUTDialog* pDialog); + void SendNotification(); + void UpdateList(); + void Draw(); + void Enable(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CScoreboard*& RefScoreboard(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CSpawnScreen.h b/include/sampapi/0.3.DL-1/CSpawnScreen.h new file mode 100644 index 00000000..04abbefd --- /dev/null +++ b/include/sampapi/0.3.DL-1/CSpawnScreen.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CFonts.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CSpawnScreen { +public: + BOOL m_bEnabled; + char* m_szSpawnText; + CFonts* m_pFont; + IDirect3DDevice9* m_pDevice; + IDirect3DTexture9* m_pTexture; + IDirect3DStateBlock9* m_pStateBlockSaved; + IDirect3DStateBlock9* m_pStateBlockDraw; + void* m_pSprite; + + CSpawnScreen(IDirect3DDevice9* pDevice); + ~CSpawnScreen(); + + void SetText(const char* szString); + void OnResetDevice(); + void OnLostDevice(); + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CSpawnScreen*& RefSpawnScreen(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CSrvNetStats.h b/include/sampapi/0.3.DL-1/CSrvNetStats.h new file mode 100644 index 00000000..b0878d57 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CSrvNetStats.h @@ -0,0 +1,32 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CSrvNetStats { +public: + unsigned long m_dwLastTotalBytesSent; + unsigned long m_dwLastTotalBytesRecv; + unsigned long m_dwLastUpdateTick; + unsigned long m_dwBPSUpload; + unsigned long m_dwBPSDownload; + IDirect3DDevice9* m_pDevice; + + CSrvNetStats(IDirect3DDevice9* pDevice); + + void Draw(); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CSrvNetStats*& RefServerNetStatistics(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CTextDraw.h b/include/sampapi/0.3.DL-1/CTextDraw.h new file mode 100644 index 00000000..cf170f84 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CTextDraw.h @@ -0,0 +1,99 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CTextDraw { +public: + struct SAMPAPI_EXPORT Transmit { + union { + struct { + unsigned char m_bBox : 1; + unsigned char m_bLeft : 1; + unsigned char m_bRight : 1; + unsigned char m_bCenter : 1; + unsigned char m_bProportional : 1; + }; + unsigned char m_nFlags; + }; + float m_fLetterWidth; + float m_fLetterHeight; + D3DCOLOR m_letterColor; + float m_fBoxWidth; + float m_fBoxHeight; + D3DCOLOR m_boxColor; + unsigned char m_nShadow; + bool m_bOutline; + D3DCOLOR m_backgroundColor; + unsigned char m_nStyle; + unsigned char unknown; + float m_fX; + float m_fY; + unsigned short m_nModel; + CVector m_rotation; + float m_fZoom; + unsigned short m_aColor[2]; + }; + + struct SAMPAPI_EXPORT Data { + float m_fLetterWidth; + float m_fLetterHeight; + D3DCOLOR m_letterColor; + unsigned char unknown; + unsigned char m_bCenter; + unsigned char m_bBox; + float m_fBoxSizeX; + float m_fBoxSizeY; + D3DCOLOR m_boxColor; + unsigned char m_nProportional; + D3DCOLOR m_backgroundColor; + unsigned char m_nShadow; + unsigned char m_nOutline; + unsigned char m_bLeft; + unsigned char m_bRight; + int m_nStyle; + float m_fX; + float m_fY; + unsigned char pad_[8]; + unsigned long field_99B; + unsigned long field_99F; + unsigned long m_nIndex; + unsigned char field_9A7; + unsigned short m_nModel; + CVector m_rotation; + float m_fZoom; + unsigned short m_aColor[2]; + unsigned char field_9BE; + unsigned char field_9BF; + unsigned char field_9C0; + unsigned long field_9C1; + unsigned long field_9C5; + unsigned long field_9C9; + unsigned long field_9CD; + unsigned char field_9D1; + unsigned long field_9D2; + }; + + char m_szText[801]; + char m_szString[1602]; + Data m_data; + + CTextDraw(Transmit* pTransmit, const char* szText); + ~CTextDraw(); + + void SetText(const char* szText); + void Draw(); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CTextDrawPool.h b/include/sampapi/0.3.DL-1/CTextDrawPool.h new file mode 100644 index 00000000..c341caea --- /dev/null +++ b/include/sampapi/0.3.DL-1/CTextDrawPool.h @@ -0,0 +1,35 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CTextDraw.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CTextDrawPool { +public: + enum { + MAX_TEXTDRAWS = 2048, + MAX_LOCAL_TEXTDRAWS = 256, + }; + + BOOL m_bNotEmpty[MAX_TEXTDRAWS + MAX_LOCAL_TEXTDRAWS]; + CTextDraw* m_pObject[MAX_TEXTDRAWS + MAX_LOCAL_TEXTDRAWS]; + + CTextDrawPool(); + ~CTextDrawPool(); + + void Delete(ID nId); + void Draw(); + CTextDraw* Create(int nId, CTextDraw::Transmit* pData, const char* szText); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CTextDrawSelection.h b/include/sampapi/0.3.DL-1/CTextDrawSelection.h new file mode 100644 index 00000000..d03014f9 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CTextDrawSelection.h @@ -0,0 +1,44 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CTextDrawSelection { +public: + BOOL m_bIsActive; + D3DCOLOR m_hoveredColor; + ID m_nHoveredId; + + CTextDrawSelection() { + m_bIsActive = false; + m_hoveredColor = -1; + m_nHoveredId = -1; + } + + ~CTextDrawSelection() { + if (m_bIsActive) + ResetTextDraws(); + } + + void ResetTextDraws(); + void RawProcess(); + void Process(); + void Enable(D3DCOLOR hoveredColor); + void SendNotification(); + void Disable(); + BOOL MsgProc(int uMsg, int wParam, int lParam); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR CTextDrawSelection*& RefTextDrawSelection(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CVehicle.h b/include/sampapi/0.3.DL-1/CVehicle.h new file mode 100644 index 00000000..ab4a76c9 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CVehicle.h @@ -0,0 +1,114 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CEntity.h" +#include "sampapi/CVector.h" + +class CVehicle; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CVehicle : public CEntity { +public: + enum { MAX_LICENSE_PLATE_TEXT = 32 }; + + // void **m_lpVtbl = 0xDB1AC; + CVehicle* m_pTrailer; + ::CVehicle* m_pGameVehicle; + BOOL m_bEngineOn; + BOOL m_bIsLightsOn; + BOOL m_bIsInvulnerable; + int pad_5c; + BOOL m_bIsLocked; + bool m_bIsObjective; + BOOL m_bObjectiveBlipCreated; + TICK m_timeSinceLastDriven; + BOOL m_bHasBeenDriven; + int pad_71; + BOOL m_bEngineState; + unsigned char m_nPrimaryColor; + unsigned char m_nSecondaryColor; + BOOL m_bNeedsToUpdateColor; + BOOL m_bUnoccupiedSync; + BOOL m_bRemoteUnocSync; + BOOL m_bKeepModelLoaded; + BOOL m_bHasSiren; + IDirect3DTexture9* m_pLicensePlate; + char m_szLicensePlateText[MAX_LICENSE_PLATE_TEXT + 1]; + GTAREF m_marker; + + CVehicle(int nModel, CVector position, float fRotation, BOOL bKeepModelLoaded, BOOL bHasSiren); + + virtual ~CVehicle() = 0; + virtual void Add() = 0; + virtual void Remove() = 0; + + void ChangeInterior(int nId); + void ResetPointers(); + BOOL HasDriver(); + BOOL IsOccupied(); + void SetInvulnerable(BOOL bInv); + void SetLocked(BOOL block); + float GetHealth(); + void SetHealth(float fValue); + void SetColor(NUMBER nPrimary, NUMBER nSecondary); + void UpdateColor(); + int GetSubtype(); + BOOL IsSunk(); + BOOL IsWrecked(); + BOOL DriverIsPlayerPed(); + BOOL HasPlayerPed(); + BOOL IsTrainPart(); + BOOL HasTurret(); + void EnableSiren(bool bEnable); + BOOL SirenEnabled(); + void SetLandingGearState(BOOL bHide); + BOOL GetLandingGearState(); + void SetHydraThrusters(int nDirection); + int GetHydraThrusters(); + void ProcessMarkers(); + void Lock(BOOL bLock); + BOOL UpdateLastDrivenTime(); + float GetTrainSpeed(); + void SetTrainSpeed(float fValue); + void SetTires(char nState); + char GetTires(); + void UpdateDamage(int nPanels, int nDoors, char nLights); + int GetPanelsDamage(); + int GetDoorsDamage(); + char GetLightsDamage(); + void AttachTrailer(); + void DetachTrailer(); + void SetTrailer(CVehicle* pVehicle); + CVehicle* GetTrailer(); + CVehicle* GetTractor(); + BOOL IsTrailer(); + BOOL IsTowtruck(); + BOOL IsRC(); + void EnableLights(bool bEnable); + void RemovePassengers(); + BOOL AddComponent(unsigned short nId); + BOOL RemoveComponent(unsigned short nId); + void SetPaintjob(NUMBER nId); + BOOL DoesExist(); + void SetLicensePlateText(const char* szText); + void SetRotation(float fValue); + void ConstructLicensePlate(); + void ShutdownLicensePlate(); + BOOL HasSiren(); + char GetMaxPassengers(); + void SetWindowOpenFlag(NUMBER nDoorId); + void ClearWindowOpenFlag(NUMBER nDoorId); + void EnableEngine(BOOL bEnable); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/CVehiclePool.h b/include/sampapi/0.3.DL-1/CVehiclePool.h new file mode 100644 index 00000000..7d546477 --- /dev/null +++ b/include/sampapi/0.3.DL-1/CVehiclePool.h @@ -0,0 +1,86 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.DL-1/CVehicle.h" + +class CVehicle; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +class SAMPAPI_EXPORT CVehiclePool { +public: + enum { + MAX_VEHICLES = 2000, + WAITING_LIST_SIZE = 100, + }; + + struct SAMPAPI_EXPORT VehicleInfo { + ID m_nId; + int m_nType; + CVector m_position; + float m_fRotation; + NUMBER m_nPrimaryColor; + NUMBER m_nSecondaryColor; + float m_fHealth; + char m_nInterior; + int m_nDoorDamageStatus; + int m_nPanelDamageStatus; + char m_nLightDamageStatus; + bool m_bDoorsLocked; + bool m_bHasSiren; + }; + + int m_nCount; + + // vehicles that will be created after loading the model + struct SAMPAPI_EXPORT { + VehicleInfo m_entry[WAITING_LIST_SIZE]; + BOOL m_bNotEmpty[WAITING_LIST_SIZE]; + } m_waiting; + + CVehicle* m_pObject[MAX_VEHICLES]; + BOOL m_bNotEmpty[MAX_VEHICLES]; + ::CVehicle* m_pGameObject[MAX_VEHICLES]; + int pad_6ef4[MAX_VEHICLES]; + ID m_nLastUndrivenId[MAX_VEHICLES]; // a player who send unoccupied sync data + TICK m_lastUndrivenProcessTick[MAX_VEHICLES]; + BOOL m_bIsActive[MAX_VEHICLES]; + BOOL m_bIsDestroyed[MAX_VEHICLES]; + TICK m_tickWhenDestroyed[MAX_VEHICLES]; + CVector m_spawnedAt[MAX_VEHICLES]; + BOOL m_bNeedsToInitializeLicensePlates; + + CVehiclePool(); + ~CVehiclePool(); + + void UpdateCount(); + BOOL Delete(ID nId); + void ChangeInterior(ID nId, int nInteriorId); + void SetParams(ID nId, bool bIsObjective, bool bIsLocked); + ID Find(::CVehicle* pGameObject); + GTAREF GetRef(int nId); + GTAREF GetRef(::CVehicle* pGameObject); + ID GetNearest(); + ID GetNearest(CVector point); + void AddToWaitingList(const VehicleInfo* pInfo); + void ConstructLicensePlates(); + void ShutdownLicensePlates(); + BOOL Create(VehicleInfo* pInfo); + void SendDestroyNotification(ID nId); + void ProcessWaitingList(); + void Process(); + CVehicle* Get(ID nId); + BOOL DoesExist(ID nId); +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/Commands.h b/include/sampapi/0.3.DL-1/Commands.h new file mode 100644 index 00000000..4c2a7853 --- /dev/null +++ b/include/sampapi/0.3.DL-1/Commands.h @@ -0,0 +1,49 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V03DL_1 + +namespace Commands { + SAMPAPI_EXPORT void Default(const char*); + SAMPAPI_EXPORT void TestDeathWindow(const char*); + SAMPAPI_EXPORT void ToggleCameraTargetLabels(const char*); + SAMPAPI_EXPORT void SetChatPageSize(const char*); + SAMPAPI_EXPORT void SetChatFontSize(const char*); + SAMPAPI_EXPORT void DrawNameTagStatus(const char*); + SAMPAPI_EXPORT void DrawChatTimestamps(const char*); + SAMPAPI_EXPORT void ToggleAudioStreamMessages(const char*); + SAMPAPI_EXPORT void ToggleURLMessages(const char*); + SAMPAPI_EXPORT void PrintMemory(const char*); + SAMPAPI_EXPORT void SetFrameLimiter(const char*); + SAMPAPI_EXPORT void ToggleHeadMoves(const char*); + SAMPAPI_EXPORT void Quit(const char*); + SAMPAPI_EXPORT void CmpStat(const char*); //dummy + SAMPAPI_EXPORT void SavePosition(const char*); + SAMPAPI_EXPORT void SavePositionOnly(const char*); + SAMPAPI_EXPORT void PrintCurrentInterior(const char*); + SAMPAPI_EXPORT void ToggleObjectsLight(const char*); + SAMPAPI_EXPORT void ToggleDebugLabels(const char*); + SAMPAPI_EXPORT void SendRconCommand(const char*); + + namespace Debug { + SAMPAPI_EXPORT void SetPlayerSkin(const char*); + SAMPAPI_EXPORT void CreateVehicle(const char*); + SAMPAPI_EXPORT void EnableVehicleSelection(const char*); + SAMPAPI_EXPORT void SetWorldWeather(const char*); + SAMPAPI_EXPORT void SetWorldTime(const char*); + } // namespace Debug + + SAMPAPI_EXPORT void Setup(); +} // namespace Commands + +SAMPAPI_END diff --git a/include/sampapi/0.3.DL-1/ControllerState.h b/include/sampapi/0.3.DL-1/ControllerState.h new file mode 100644 index 00000000..ecc2b831 --- /dev/null +++ b/include/sampapi/0.3.DL-1/ControllerState.h @@ -0,0 +1,49 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT ControllerState { + short m_sLeftStickX; // move/steer left = -128, right = 128 + short m_sLeftStickY; // move back = 128, forwards = -128 + union { + struct { + unsigned char m_bLeftShoulder1 : 1; // fire weapon alt + unsigned char m_bShockButtonL : 1; // crouch + unsigned char m_bButtonCircle : 1; // fire weapon + unsigned char m_bButtonCross : 1; // sprint, accelerate + unsigned char m_bButtonTriangle : 1; // enter/exit vehicle + unsigned char m_bButtonSquare : 1; // jump, reverse + unsigned char m_bRightShoulder2 : 1; // look right (incar) + unsigned char m_bRightShoulder1 : 1; // hand brake, target + + unsigned char m_bLeftShoulder2 : 1; // look left + unsigned char m_bShockButtonR : 1; // look behind + unsigned char m_bPedWalk : 1; // walking + unsigned char m_bRightStickDown : 1; + unsigned char m_bRightStickUp : 1; + unsigned char m_bRightStickRight : 1; // num 4 + unsigned char m_bRightStickLeft : 1; // num 6 + // 16th bit is unused + }; + short m_value; + }; + + ControllerState() { + m_sLeftStickX = 0; + m_sLeftStickY = 0; + m_value = 0; + } +}; + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/DebugScript.h b/include/sampapi/0.3.DL-1/DebugScript.h new file mode 100644 index 00000000..6982633e --- /dev/null +++ b/include/sampapi/0.3.DL-1/DebugScript.h @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/0.3.DL-1/CObjectPool.h" + +/* + commands: + CreateObject(int model, float posx, float posy, float posz, float rotx, float, roty, float rotz); + SetPlayerInterior(int id); + RemoveBuildingForPlayer(int model, float posx, float posy, float, posz, float radius); + SetPlayerCameraPos(float posx, float posy, float posz); + AddStaticVehicle/CreateVehicle(int model, float posx, float posy, float posz, float rot, int clr1, int clr2); + SetPlayerCameraLookAt() - dummy + + example: + CreateObject(11933, 0, 0, 10, 0, 0, 0, 100) + + one line can contain only one command +*/ + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +namespace DebugScript { + enum { LINE_BUFFER_LENGTH = 256 }; + + SAMPAPI_EXPORT SAMPAPI_VAR CObjectPool*& RefPrivateObjectPool(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned short& RefObjectCount(); + SAMPAPI_EXPORT SAMPAPI_VAR CVector& RefNewCameraPos(); + + SAMPAPI_EXPORT void Initialize(const char* szFile); // delete old object pool before calling + SAMPAPI_EXPORT void ProcessLine(const char* szLine); + SAMPAPI_EXPORT char* GetCommandParams(char* szLine); // (...) + SAMPAPI_EXPORT void CreateVehicle(const char* szParams); + SAMPAPI_EXPORT void CreateObject(const char* szParams); +} // namespace DebugScript + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/Exception.h b/include/sampapi/0.3.DL-1/Exception.h new file mode 100644 index 00000000..2f844f68 --- /dev/null +++ b/include/sampapi/0.3.DL-1/Exception.h @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +namespace Exception { + enum { MAX_EXCEPTIONS = 9 }; + + SAMPAPI_EXPORT SAMPAPI_VAR int& RefCount(); + SAMPAPI_EXPORT SAMPAPI_VAR void*& RefContextRecord(); // PCONTEXT + SAMPAPI_EXPORT SAMPAPI_VAR char* ArrayCrashDialogText(); // [16384] + + SAMPAPI_EXPORT BOOL Print(int nCode, void* pExceptionPointers, const char* szWarning); + SAMPAPI_EXPORT void SendCrashReport(); + SAMPAPI_EXPORT BOOL CrashDialogProc(void* hWnd, unsigned int uMsg, unsigned int wParam, long lParam); + SAMPAPI_EXPORT void ConstructCrashDialogText(BOOL bModules); + SAMPAPI_EXPORT long Handler(void* pExceptionPointers); +} // namespace Exception + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/GUI.h b/include/sampapi/0.3.DL-1/GUI.h new file mode 100644 index 00000000..ac651d78 --- /dev/null +++ b/include/sampapi/0.3.DL-1/GUI.h @@ -0,0 +1,41 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +class CDXUTControl; +class CDXUTDialogResourceManager; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +namespace GUI { + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialogResourceManager*& RefResourceMgr(); + + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefGameUi(); + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefScoreboard(); + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefDialog(); + SAMPAPI_EXPORT SAMPAPI_VAR CDXUTDialog*& RefClassSelection(); + + SAMPAPI_EXPORT SAMPAPI_VAR IDirect3DSurface9*& RefCursor(); + SAMPAPI_EXPORT SAMPAPI_VAR IDirect3DDevice9*& RefDevice(); + + SAMPAPI_EXPORT void Initialize(); + + SAMPAPI_EXPORT void OnLostDevice(); + SAMPAPI_EXPORT void OnResetDevice(); + + SAMPAPI_EXPORT void GameUIEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); + SAMPAPI_EXPORT void ScoreboardEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); + SAMPAPI_EXPORT void DialogEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); + SAMPAPI_EXPORT void ClassSelectionEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext); +} // namespace GUI + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/InputHandler.h b/include/sampapi/0.3.DL-1/InputHandler.h new file mode 100644 index 00000000..2e04759a --- /dev/null +++ b/include/sampapi/0.3.DL-1/InputHandler.h @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V03DL_1 + +void SwitchWindowedMode(); + +namespace InputHandler { + enum { MAX_ANTICHEAT_DETECT_COUNT = 0xA }; + + SAMPAPI_EXPORT SAMPAPI_VAR void*& RefPrevWindowProc(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned int& RefAntiCheatDetectCount(); + + SAMPAPI_EXPORT int WindowProc(unsigned int uMsg, unsigned int wParam, long lParam); + SAMPAPI_EXPORT BOOL KeyPressHandler(unsigned int nKey); + SAMPAPI_EXPORT BOOL CharInputHandler(unsigned int nChar); + SAMPAPI_EXPORT BOOL Initialize(); +} // namespace InputHandler + +SAMPAPI_END diff --git a/include/sampapi/0.3.DL-1/KeyStuff.h b/include/sampapi/0.3.DL-1/KeyStuff.h new file mode 100644 index 00000000..a0a7e255 --- /dev/null +++ b/include/sampapi/0.3.DL-1/KeyStuff.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +class CPad; + +SAMPAPI_BEGIN_V03DL_1 + +namespace KeyStuff { + SAMPAPI_EXPORT SAMPAPI_VAR CPad& RefLocalPlayerKeys(); + SAMPAPI_EXPORT SAMPAPI_VAR CPad* ArrayPlayerKeys(); + SAMPAPI_EXPORT SAMPAPI_VAR CPad*& RefInternalKeys(); + SAMPAPI_EXPORT SAMPAPI_VAR bool*& RefDriveByLeft(); + SAMPAPI_EXPORT SAMPAPI_VAR bool*& RefDriveByRight(); + SAMPAPI_EXPORT SAMPAPI_VAR bool& RefSavedDriveByLeft(); + SAMPAPI_EXPORT SAMPAPI_VAR bool& RefSavedDriveByRight(); + + SAMPAPI_EXPORT void Initialize(); + SAMPAPI_EXPORT void UpdateKeys(); + SAMPAPI_EXPORT void ApplyKeys(); + SAMPAPI_EXPORT void SetKeys(int nPlayer, const CPad* pKeys); + SAMPAPI_EXPORT void ApplyKeys(int nPlayer); + SAMPAPI_EXPORT CPad* GetInternalKeys(); + SAMPAPI_EXPORT CPad* GetKeys(); + SAMPAPI_EXPORT CPad* GetKeys(int nPlayer); + SAMPAPI_EXPORT void ResetKeys(int nPlayer); + SAMPAPI_EXPORT void ResetInternalKeys(); +} // namespace KeyStuff + +SAMPAPI_END diff --git a/include/sampapi/0.3.DL-1/RPCHandlers.h b/include/sampapi/0.3.DL-1/RPCHandlers.h new file mode 100644 index 00000000..03d7c007 --- /dev/null +++ b/include/sampapi/0.3.DL-1/RPCHandlers.h @@ -0,0 +1,159 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +struct RPCParameters; + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +namespace RPCHandlers { + // RegisterRPCs1 + + void ScrSetPlayerSkillLevel(RPCParameters* pParams); + void ScrCreate3DTextLabel(RPCParameters* pParams); + void ScrDestroy3DTextLabel(RPCParameters* pParams); + void ScrChatBubble(RPCParameters* pParams); + void ScrShowDialog(RPCParameters* pParams); + void ScrSetCheckpoint(RPCParameters* pParams); + void ScrDisableCheckpoint(RPCParameters* pParams); + void ScrSetRaceCheckpoint(RPCParameters* pParams); + void ScrDisableRaceCheckpoint(RPCParameters* pParams); + void UpdateScoresPingsIps(RPCParameters* pParams); + void SrvNetStats(RPCParameters* pParams); + void ScrGamemodeRestart(RPCParameters* pParams); + void ConnectionRejected(RPCParameters* pParams); + void ScrClientMessage(RPCParameters* pParams); + void ScrSetWorldTime(RPCParameters* pParams); + void ScrCreatePickup(RPCParameters* pParams); + void ScrDestroyPickup(RPCParameters* pParams); + void ScrDestroyWeaponPickup(RPCParameters* pParams); + void ScmEvent(RPCParameters* pParams); + void ScrSetWeather(RPCParameters* pParams); + void ScrSetPlayerTime(RPCParameters* pParams); + void ScrToggleClock(RPCParameters* pParams); + void ScrSetIngameTimer(RPCParameters* pParams); + void ScrWorldPlayerAdd(RPCParameters* pParams); + void ScrWorldPlayerDeath(RPCParameters* pParams); + void ScrWorldPlayerRemove(RPCParameters* pParams); + void ScrWorldVehicleAdd(RPCParameters* pParams); + void ScrWorldVehicleRemove(RPCParameters* pParams); + void DamageVehicle(RPCParameters* pParams); + void ScrSetVehicleParamsEx(RPCParameters* pParams); + void EnterVehicle(RPCParameters* pParams); + void ExitVehicle(RPCParameters* pParams); + void ScrServerJoin(RPCParameters* pParams); + void ScrServerQuit(RPCParameters* pParams); + void ScrInitGame(RPCParameters* pParams); + void Chat(RPCParameters* pParams); + void RequestClass(RPCParameters* pParams); + void RequestSpawn(RPCParameters* pParams); + void EditAttachedObject(RPCParameters* pParams); + void EditObject(RPCParameters* pParams); + void EnterEditObject(RPCParameters* pParams); + void ScrCancelEdit(RPCParameters* pParams); + void ScrUpdateCameraTarget(RPCParameters* pParams); + void ClientCheck(RPCParameters* pParams); + void ScrCreateActor(RPCParameters* pParams); + void ScrDestroyActor(RPCParameters* pParams); + + // RegisterRPCs2 + + void ScrDisableVehicleCollisions(RPCParameters* pParams); + void ScrSetPlayerMapIcon(RPCParameters* pParams); + void ScrRemovePlayerMapIcon(RPCParameters* pParams); + void ScrSetPlayerAmmo(RPCParameters* pParams); + void ScrSetGravity(RPCParameters* pParams); + void ScrSetVehicleHealth(RPCParameters* pParams); + void ScrAttachTrailerToVehicle(RPCParameters* pParams); + void ScrDetachTrailerFromVehicle(RPCParameters* pParams); + void ScrCreateObject(RPCParameters* pParams); + void ScrSetObjectPosition(RPCParameters* pParams); + void ScrSetObjectRotation(RPCParameters* pParams); + void ScrDestroyObject(RPCParameters* pParams); + void ScrCreateExplosion(RPCParameters* pParams); + void ScrShowPlayerNametagForPlayer(RPCParameters* pParams); + void ScrMoveObject(RPCParameters* pParams); + void ScrStopObject(RPCParameters* pParams); + void ScrSetNumberPlate(RPCParameters* pParams); + void ScrTogglePlayerSpectating(RPCParameters* pParams); + void ScrPlayerSpectatePlayer(RPCParameters* pParams); + void ScrPlayerSpectateVehicle(RPCParameters* pParams); + void ScrMoveVehicleComponent(RPCParameters* pParams); + void ScrForceClassSelection(RPCParameters* pParams); + void ScrAttachObjectToPlayer(RPCParameters* pParams); + void ScrSetPlayerWantedLevel(RPCParameters* pParams); + void ScrShowTextDraw(RPCParameters* pParams); + void ScrHideTextDrawForPlayer(RPCParameters* pParams); + void ScrTextDrawSetString(RPCParameters* pParams); + void ScrGangZoneCreate(RPCParameters* pParams); + void ScrGangZoneDestroy(RPCParameters* pParams); + void ScrGangZoneFlash(RPCParameters* pParams); + void ScrGangZoneStopFlash(RPCParameters* pParams); + void ScrApplyAnimation(RPCParameters* pParams); + void ScrClearAnimations(RPCParameters* pParams); + void ScrSetPlayerSpecialAction(RPCParameters* pParams); + void ScrEnableStuntBonusForPlayer(RPCParameters* pParams); + void ScrSetPlayerFightingStyle(RPCParameters* pParams); + void ScrSetPlayerVelocity(RPCParameters* pParams); + void ScrSetVehicleVelocity(RPCParameters* pParams); + void ScrPlayCrimeReport(RPCParameters* pParams); + void ScrSetSpawnInfo(RPCParameters* pParams); + void ScrSetPlayerTeam(RPCParameters* pParams); + void ScrSetPlayerSkin(RPCParameters* pParams); + void ScrSetPlayerName(RPCParameters* pParams); + void ScrSetPlayerPosition(RPCParameters* pParams); + void ScrSetPlayerPositionFindZ(RPCParameters* pParams); + void ScrSetPlayerHealth(RPCParameters* pParams); + void ScrPutPlayerInVehicle(RPCParameters* pParams); + void ScrRemovePlayerFromVehicle(RPCParameters* pParams); + void ScrSetPlayerColor(RPCParameters* pParams); + void ScrDisplayGametext(RPCParameters* pParams); + void ScrSetPlayerInterior(RPCParameters* pParams); + void ScrSetPlayerCameraPosition(RPCParameters* pParams); + void ScrSetPlayerCameraLookAt(RPCParameters* pParams); + void ScrSetVehiclePosition(RPCParameters* pParams); + void ScrSetVehicleZAngle(RPCParameters* pParams); + void ScrSetVehicleParamsForPlayer(RPCParameters* pParams); + void ScrSetCameraBehindPlayer(RPCParameters* pParams); + void ScrTogglePlayerControllable(RPCParameters* pParams); + void ScrPlaySound(RPCParameters* pParams); + void ScrSetPlayerWorldBounds(RPCParameters* pParams); + void ScrGivePlayerMoney(RPCParameters* pParams); + void ScrSetPlayerFacingAngle(RPCParameters* pParams); + void ScrResetPlayerMoney(RPCParameters* pParams); + void ScrResetPlayerWeapons(RPCParameters* pParams); + void ScrGivePlayerWeapon(RPCParameters* pParams); + void ScrLinkVehicleToInterior(RPCParameters* pParams); + void ScrSetPlayerArmor(RPCParameters* pParams); + void ScrDeathMessage(RPCParameters* pParams); + void ScrSetPlayerShopName(RPCParameters* pParams); + void ScrSetPlayerDrunkLevel(RPCParameters* pParams); + void ScrSetPlayerArmedWeapon(RPCParameters* pParams); + void ScrSetPlayerAttachedObject(RPCParameters* pParams); + void ScrPlayAudioStream(RPCParameters* pParams); + void ScrStopAudioStream(RPCParameters* pParams); + void ScrRemoveBuildingForPlayer(RPCParameters* pParams); + void ScrAttachCameraToObject(RPCParameters* pParams); + void ScrInterpolateCamera(RPCParameters* pParams); + void ClickTextDraw(RPCParameters* pParams); + void ScrSetObjectMaterial(RPCParameters* pParams); + void ScrStopObjectCameraCollision(RPCParameters* pParams); + void ScrSetActorAnimation(RPCParameters* pParams); + void ScrSetActorRotation(RPCParameters* pParams); + void ScrSetActorPosition(RPCParameters* pParams); + void ScrSetActorHealth(RPCParameters* pParams); + void ScrInitMenu(RPCParameters* pParams); + void ScrShowMenu(RPCParameters* pParams); + void ScrHideMenu(RPCParameters* pParams); +} // namespace RPCHandlers + +SAMPAPI_END_PACKED \ No newline at end of file diff --git a/include/sampapi/0.3.DL-1/Scripting.h b/include/sampapi/0.3.DL-1/Scripting.h new file mode 100644 index 00000000..54299a68 --- /dev/null +++ b/include/sampapi/0.3.DL-1/Scripting.h @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +class CRunningScript; + +SAMPAPI_BEGIN_V03DL_1 + +namespace Scripting { + struct SAMPAPI_EXPORT OpcodeInfo { + unsigned short m_wOpCode; + char m_szParams[16]; // i - int, f - float, v - var, s - string, z - zero terminating + }; + + typedef int(__thiscall* ProcessOneCommandFn)(CRunningScript*); + + SAMPAPI_EXPORT SAMPAPI_VAR CRunningScript*& RefThread(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned char* ArrayBuffer(); // [256] + SAMPAPI_EXPORT SAMPAPI_VAR unsigned long& RefLastUsedOpcode(); + SAMPAPI_EXPORT SAMPAPI_VAR unsigned long** ArrayThreadLocals(); // [18] + SAMPAPI_EXPORT SAMPAPI_VAR BOOL& RefLocalDebug(); + SAMPAPI_EXPORT SAMPAPI_VAR ProcessOneCommandFn& RefProcessOneCommand(); + + SAMPAPI_EXPORT void Initialize(); + SAMPAPI_EXPORT int ExecBuffer(); + static SAMPAPI_EXPORT int(__cdecl* FunctionProcessCommand())(const OpcodeInfo*, ...); + template + int ProcessCommand(const OpcodeInfo* pOpcodeInfo, Args... args) { + return FunctionProcessCommand()(pOpcodeInfo, args...); + } +} // namespace Scripting + +SAMPAPI_END diff --git a/include/sampapi/0.3.DL-1/Settings.h b/include/sampapi/0.3.DL-1/Settings.h new file mode 100644 index 00000000..5f04d045 --- /dev/null +++ b/include/sampapi/0.3.DL-1/Settings.h @@ -0,0 +1,35 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +struct SAMPAPI_EXPORT Settings { + enum { SETTINGS_STRING_LEN = 256 }; + + BOOL m_bDebugMode; // -d + BOOL m_bOnlineGame; // -c + BOOL m_bWindowedMode; // unused + char m_szPass[SETTINGS_STRING_LEN + 1]; // -z + char m_szHost[SETTINGS_STRING_LEN + 1]; // -h + char m_szPort[SETTINGS_STRING_LEN + 1]; // -p + char m_szNick[SETTINGS_STRING_LEN + 1]; // -n + char m_szDebugScript[SETTINGS_STRING_LEN + 1]; // -l + + static void Initialize(); + static void GetFromCommandLine(const char* szLine, char* szString); + static void GetFromQuotes(const char* szLine, char* szString); +}; + +SAMPAPI_EXPORT SAMPAPI_VAR Settings& RefSettings(); + +SAMPAPI_END_PACKED diff --git a/include/sampapi/0.3.DL-1/SpecialAction.h b/include/sampapi/0.3.DL-1/SpecialAction.h new file mode 100644 index 00000000..cbf4669a --- /dev/null +++ b/include/sampapi/0.3.DL-1/SpecialAction.h @@ -0,0 +1,39 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_V03DL_1 + +enum SpecialAction { + SPECIAL_ACTION_NONE, + SPECIAL_ACTION_DUCK, + SPECIAL_ACTION_USEJETPACK, + SPECIAL_ACTION_ENTER_VEHICLE, + SPECIAL_ACTION_EXIT_VEHICLE, + SPECIAL_ACTION_DANCE1, + SPECIAL_ACTION_DANCE2, + SPECIAL_ACTION_DANCE3, + SPECIAL_ACTION_DANCE4, + SPECIAL_ACTION_HANDSUP, + SPECIAL_ACTION_USECELLPHONE, + SPECIAL_ACTION_SITTING, + SPECIAL_ACTION_STOPUSECELLPHONE, + SPECIAL_ACTION_DRINK_BEER = 20, + SPECIAL_ACTION_SMOKE_CIGGY, + SPECIAL_ACTION_DRINK_WINE, + SPECIAL_ACTION_DRINK_SPRUNK, + SPECIAL_ACTION_CUFFED, + SPECIAL_ACTION_CARRY, + SPECIAL_ACTION_URINATING = 68 +}; + +SAMPAPI_END diff --git a/include/sampapi/0.3.DL-1/Synchronization.h b/include/sampapi/0.3.DL-1/Synchronization.h new file mode 100644 index 00000000..90c3b4e8 --- /dev/null +++ b/include/sampapi/0.3.DL-1/Synchronization.h @@ -0,0 +1,173 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" +#include "sampapi/CVector.h" +#include "sampapi/0.3.DL-1/Animation.h" +#include "sampapi/0.3.DL-1/ControllerState.h" + +SAMPAPI_BEGIN_PACKED_V03DL_1 + +namespace Synchronization { + struct SAMPAPI_EXPORT OnfootData { + ControllerState m_controllerState; + CVector m_position; + float m_fQuaternion[4]; + unsigned char m_nHealth; + unsigned char m_nArmor; + unsigned char m_nCurrentWeapon; + unsigned char m_nSpecialAction; + CVector m_speed; + CVector m_surfingOffset; + ID m_nSurfingVehicleId; + Animation m_animation; + }; + + struct SAMPAPI_EXPORT IncarData { + ID m_nVehicle; + ControllerState m_controllerState; + float m_fQuaternion[4]; + CVector m_position; + CVector m_speed; + float m_fHealth; + unsigned char m_nDriverHealth; + unsigned char m_nDriverArmor; + unsigned char m_nCurrentWeapon; + bool m_bSirenEnabled; + bool m_bLandingGear; + ID m_nTrailerId; + union { + unsigned short m_aHydraThrustAngle[2]; + float m_fTrainSpeed; + }; + }; + + struct SAMPAPI_EXPORT AimData { + enum WeaponState { + WS_NO_BULLETS = 0, + WS_LAST_BULLET = 1, + WS_MORE_BULLETS = 2, + WS_RELOADING = 3, + }; + + unsigned char m_nCameraMode; + CVector m_aimf1; + CVector m_aimPos; + float m_fAimZ; + unsigned char m_nCameraExtZoom : 6; + unsigned char m_nWeaponState : 2; + char m_nAspectRatio; + }; + + struct SAMPAPI_EXPORT TrailerData { + ID m_nId; + CVector m_position; + float m_fQuaternion[4]; + CVector m_speed; + CVector m_turnSpeed; + }; + + struct SAMPAPI_EXPORT PassengerData { + ID m_nVehicleId; + unsigned char m_nSeatId; // flags + unsigned char m_nCurrentWeapon; + unsigned char m_nHealth; + unsigned char m_nArmor; + ControllerState m_controllerState; + CVector m_position; + }; + + struct SAMPAPI_EXPORT UnoccupiedData { + ID m_nVehicleId; + unsigned char m_nSeatId; + CVector m_roll; + CVector m_direction; + CVector m_position; + CVector m_speed; + CVector m_turnSpeed; + float m_fHealth; + }; + + struct SAMPAPI_EXPORT BulletData { + unsigned char m_nTargetType; + ID m_nTargetId; + CVector m_origin; + CVector m_target; + CVector m_center; + unsigned char m_nWeapon; + }; + + struct SAMPAPI_EXPORT SpectatorData { + ControllerState m_controllerState; + CVector m_position; + }; + + struct SAMPAPI_EXPORT StatsData { + int m_nMoney; + int m_nDrunkLevel; + }; + + inline char CompressAspectRatio(float v) { + return static_cast(v * 255.0f); + } + + inline float DecompressAspectRatio(char v) { + return v / 255.0f; + } + + inline unsigned char CompressCameraExtZoom(float v) { + return static_cast(v * 63.0f) & 63; + } + + inline float DecompressCameraExtZoom(unsigned char v) { + return (v & 63) / 63.0f; + } + + /* + a structure in this block has dynamic size + + struct SAMPAPI_EXPORT WeaponsData { + ID m_nAimedPlayer; + ID m_nAimedActor; + struct { + char m_nSlot; + char m_nWeapon; + unsigned short m_nAmmo; + } m_aWeapons[n]; // 0 < n < 14 + }; + struct SAMPAPI_EXPORT RconCommand { + unsigned long m_nTextLen; + char m_szText[m_nTextLen]; + }; + struct SAMPAPI_EXPORT MarkersData { + bool m_bCreate; // create(1)/remove(0) + int m_nCount; + struct { + ID m_nPlayer; + VectorCompressed m_vPos; + } m_aMarkers[m_nCount]; + }; + */ + +#if defined(__RAK_CLIENT_H) + template + void Send(T packet) { + RakNet::BitStream bs; + + bs.Write(T::ID); + bs.Write(packet); + + pNetGame->m_pRakClient->Send(&bs, HIGH_PRIORITY, RELIABLE, 0); + } +#endif +} // namespace Synchronization + +SAMPAPI_END_PACKED diff --git a/include/sampapi/AimStuff.h b/include/sampapi/AimStuff.h index 08edad3c..108ec7a0 100644 --- a/include/sampapi/AimStuff.h +++ b/include/sampapi/AimStuff.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/AimStuff.h" #include "sampapi/0.3.7-R3-1/AimStuff.h" +#include "sampapi/0.3.7-R5-1/AimStuff.h" +#include "sampapi/0.3.DL-1/AimStuff.h" diff --git a/include/sampapi/Animation.h b/include/sampapi/Animation.h index 08237809..02831805 100644 --- a/include/sampapi/Animation.h +++ b/include/sampapi/Animation.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/Animation.h" #include "sampapi/0.3.7-R3-1/Animation.h" +#include "sampapi/0.3.7-R5-1/Animation.h" +#include "sampapi/0.3.DL-1/Animation.h" diff --git a/include/sampapi/CActor.h b/include/sampapi/CActor.h index 5f1ca796..6f97d64d 100644 --- a/include/sampapi/CActor.h +++ b/include/sampapi/CActor.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CActor.h" #include "sampapi/0.3.7-R3-1/CActor.h" +#include "sampapi/0.3.7-R5-1/CActor.h" +#include "sampapi/0.3.DL-1/CActor.h" diff --git a/include/sampapi/CActorPool.h b/include/sampapi/CActorPool.h index ee978485..f16cbb7f 100644 --- a/include/sampapi/CActorPool.h +++ b/include/sampapi/CActorPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CActorPool.h" #include "sampapi/0.3.7-R3-1/CActorPool.h" +#include "sampapi/0.3.7-R5-1/CActorPool.h" +#include "sampapi/0.3.DL-1/CActorPool.h" diff --git a/include/sampapi/CAudio.h b/include/sampapi/CAudio.h index 1faa8786..58eff1e8 100644 --- a/include/sampapi/CAudio.h +++ b/include/sampapi/CAudio.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CAudio.h" #include "sampapi/0.3.7-R3-1/CAudio.h" +#include "sampapi/0.3.7-R5-1/CAudio.h" +#include "sampapi/0.3.DL-1/CAudio.h" diff --git a/include/sampapi/CAudioStream.h b/include/sampapi/CAudioStream.h index 6fb5b64c..e4d637e4 100644 --- a/include/sampapi/CAudioStream.h +++ b/include/sampapi/CAudioStream.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CAudioStream.h" #include "sampapi/0.3.7-R3-1/CAudioStream.h" +#include "sampapi/0.3.7-R5-1/CAudioStream.h" +#include "sampapi/0.3.DL-1/CAudioStream.h" diff --git a/include/sampapi/CCamera.h b/include/sampapi/CCamera.h index 14a05dd2..a377dd42 100644 --- a/include/sampapi/CCamera.h +++ b/include/sampapi/CCamera.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CCamera.h" #include "sampapi/0.3.7-R3-1/CCamera.h" +#include "sampapi/0.3.7-R5-1/CCamera.h" +#include "sampapi/0.3.DL-1/CCamera.h" diff --git a/include/sampapi/CChat.h b/include/sampapi/CChat.h index 777842c2..a440fba3 100644 --- a/include/sampapi/CChat.h +++ b/include/sampapi/CChat.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CChat.h" #include "sampapi/0.3.7-R3-1/CChat.h" +#include "sampapi/0.3.7-R5-1/CChat.h" +#include "sampapi/0.3.DL-1/CChat.h" diff --git a/include/sampapi/CChatBubble.h b/include/sampapi/CChatBubble.h index 3bf2beb7..0727450e 100644 --- a/include/sampapi/CChatBubble.h +++ b/include/sampapi/CChatBubble.h @@ -1,2 +1,5 @@ #pragma once +#include "sampapi/0.3.7-R1/CChatBubble.h" #include "sampapi/0.3.7-R3-1/CChatBubble.h" +#include "sampapi/0.3.7-R5-1/CChatBubble.h" +#include "sampapi/0.3.DL-1/CChatBubble.h" diff --git a/include/sampapi/CConfig.h b/include/sampapi/CConfig.h index 053a57a4..c45a2efb 100644 --- a/include/sampapi/CConfig.h +++ b/include/sampapi/CConfig.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CConfig.h" #include "sampapi/0.3.7-R3-1/CConfig.h" +#include "sampapi/0.3.7-R5-1/CConfig.h" +#include "sampapi/0.3.DL-1/CConfig.h" diff --git a/include/sampapi/CCustomModels.h b/include/sampapi/CCustomModels.h new file mode 100644 index 00000000..e2470055 --- /dev/null +++ b/include/sampapi/CCustomModels.h @@ -0,0 +1,2 @@ +#pragma once +#include "sampapi/0.3.DL-1/CCustomModels.h" \ No newline at end of file diff --git a/include/sampapi/CCustomModelsPool.h b/include/sampapi/CCustomModelsPool.h new file mode 100644 index 00000000..ca36543d --- /dev/null +++ b/include/sampapi/CCustomModelsPool.h @@ -0,0 +1,2 @@ +#pragma once +#include "sampapi/0.3.DL-1/CCustomModelsPool.h" \ No newline at end of file diff --git a/include/sampapi/CDeathWindow.h b/include/sampapi/CDeathWindow.h index eb29a329..afc62842 100644 --- a/include/sampapi/CDeathWindow.h +++ b/include/sampapi/CDeathWindow.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CDeathWindow.h" #include "sampapi/0.3.7-R3-1/CDeathWindow.h" +#include "sampapi/0.3.7-R5-1/CDeathWindow.h" +#include "sampapi/0.3.DL-1/CDeathWindow.h" diff --git a/include/sampapi/CDialog.h b/include/sampapi/CDialog.h index da08ffc0..6b504939 100644 --- a/include/sampapi/CDialog.h +++ b/include/sampapi/CDialog.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CDialog.h" #include "sampapi/0.3.7-R3-1/CDialog.h" +#include "sampapi/0.3.7-R5-1/CDialog.h" +#include "sampapi/0.3.DL-1/CDialog.h" diff --git a/include/sampapi/CDownloadWindow.h b/include/sampapi/CDownloadWindow.h new file mode 100644 index 00000000..f24fad4a --- /dev/null +++ b/include/sampapi/CDownloadWindow.h @@ -0,0 +1,2 @@ +#pragma once +#include "sampapi/0.3.DL-1/CDownloadWindow.h" diff --git a/include/sampapi/CDownloadedFilesPool.h b/include/sampapi/CDownloadedFilesPool.h new file mode 100644 index 00000000..ac922be3 --- /dev/null +++ b/include/sampapi/CDownloadedFilesPool.h @@ -0,0 +1,2 @@ +#pragma once +#include "sampapi/0.3.DL-1/CDownloadedFilesPool.h" diff --git a/include/sampapi/CEntity.h b/include/sampapi/CEntity.h index 057d0034..e3740f79 100644 --- a/include/sampapi/CEntity.h +++ b/include/sampapi/CEntity.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CEntity.h" #include "sampapi/0.3.7-R3-1/CEntity.h" +#include "sampapi/0.3.7-R5-1/CEntity.h" +#include "sampapi/0.3.DL-1/CEntity.h" diff --git a/include/sampapi/CFont.h b/include/sampapi/CFont.h index ac64cdbc..7ea53621 100644 --- a/include/sampapi/CFont.h +++ b/include/sampapi/CFont.h @@ -1,2 +1,4 @@ #pragma once #include "sampapi/0.3.7-R3-1/CFont.h" +#include "sampapi/0.3.7-R5-1/CFont.h" +#include "sampapi/0.3.DL-1/CFont.h" diff --git a/include/sampapi/CFonts.h b/include/sampapi/CFonts.h index c1b07bb2..920df3ed 100644 --- a/include/sampapi/CFonts.h +++ b/include/sampapi/CFonts.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CFonts.h" #include "sampapi/0.3.7-R3-1/CFonts.h" +#include "sampapi/0.3.7-R5-1/CFonts.h" +#include "sampapi/0.3.DL-1/CFonts.h" diff --git a/include/sampapi/CGame.h b/include/sampapi/CGame.h index 231b157f..8e974473 100644 --- a/include/sampapi/CGame.h +++ b/include/sampapi/CGame.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CGame.h" #include "sampapi/0.3.7-R3-1/CGame.h" +#include "sampapi/0.3.7-R5-1/CGame.h" +#include "sampapi/0.3.DL-1/CGame.h" diff --git a/include/sampapi/CGangZonePool.h b/include/sampapi/CGangZonePool.h index 664a576e..73552086 100644 --- a/include/sampapi/CGangZonePool.h +++ b/include/sampapi/CGangZonePool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CGangZonePool.h" #include "sampapi/0.3.7-R3-1/CGangZonePool.h" +#include "sampapi/0.3.7-R5-1/CGangZonePool.h" +#include "sampapi/0.3.DL-1/CGangZonePool.h" diff --git a/include/sampapi/CHelpDialog.h b/include/sampapi/CHelpDialog.h index 208e457c..a9fa2205 100644 --- a/include/sampapi/CHelpDialog.h +++ b/include/sampapi/CHelpDialog.h @@ -1,2 +1,5 @@ #pragma once +#include "sampapi/0.3.7-R1/CHelpDialog.h" #include "sampapi/0.3.7-R3-1/CHelpDialog.h" +#include "sampapi/0.3.7-R5-1/CHelpDialog.h" +#include "sampapi/0.3.DL-1/CHelpDialog.h" diff --git a/include/sampapi/CHttpClient.h b/include/sampapi/CHttpClient.h index c0dd401c..d2b83831 100644 --- a/include/sampapi/CHttpClient.h +++ b/include/sampapi/CHttpClient.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CHttpClient.h" #include "sampapi/0.3.7-R3-1/CHttpClient.h" +#include "sampapi/0.3.7-R5-1/CHttpClient.h" +#include "sampapi/0.3.DL-1/CHttpClient.h" diff --git a/include/sampapi/CInput.h b/include/sampapi/CInput.h index 7df69301..0bdb31c6 100644 --- a/include/sampapi/CInput.h +++ b/include/sampapi/CInput.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CInput.h" #include "sampapi/0.3.7-R3-1/CInput.h" +#include "sampapi/0.3.7-R5-1/CInput.h" +#include "sampapi/0.3.DL-1/CInput.h" diff --git a/include/sampapi/CLabel.h b/include/sampapi/CLabel.h index 9eeb8c57..c936a402 100644 --- a/include/sampapi/CLabel.h +++ b/include/sampapi/CLabel.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CLabel.h" #include "sampapi/0.3.7-R3-1/CLabel.h" +#include "sampapi/0.3.7-R5-1/CLabel.h" +#include "sampapi/0.3.DL-1/CLabel.h" diff --git a/include/sampapi/CLabelPool.h b/include/sampapi/CLabelPool.h index ea0fc884..841d8297 100644 --- a/include/sampapi/CLabelPool.h +++ b/include/sampapi/CLabelPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CLabelPool.h" #include "sampapi/0.3.7-R3-1/CLabelPool.h" +#include "sampapi/0.3.7-R5-1/CLabelPool.h" +#include "sampapi/0.3.DL-1/CLabelPool.h" diff --git a/include/sampapi/CLicensePlate.h b/include/sampapi/CLicensePlate.h index c332e216..583dcd90 100644 --- a/include/sampapi/CLicensePlate.h +++ b/include/sampapi/CLicensePlate.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CLicensePlate.h" #include "sampapi/0.3.7-R3-1/CLicensePlate.h" +#include "sampapi/0.3.7-R5-1/CLicensePlate.h" +#include "sampapi/0.3.DL-1/CLicensePlate.h" diff --git a/include/sampapi/CLocalPlayer.h b/include/sampapi/CLocalPlayer.h index 0f47a962..30a57063 100644 --- a/include/sampapi/CLocalPlayer.h +++ b/include/sampapi/CLocalPlayer.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CLocalPlayer.h" #include "sampapi/0.3.7-R3-1/CLocalPlayer.h" +#include "sampapi/0.3.7-R5-1/CLocalPlayer.h" +#include "sampapi/0.3.DL-1/CLocalPlayer.h" diff --git a/include/sampapi/CMakeLists.txt b/include/sampapi/CMakeLists.txt index e8dc61b9..3959f952 100644 --- a/include/sampapi/CMakeLists.txt +++ b/include/sampapi/CMakeLists.txt @@ -1,10 +1,13 @@ add_subdirectory(0.3.7-R1) add_subdirectory(0.3.7-R3-1) +add_subdirectory(0.3.7-R5-1) +add_subdirectory(0.3.DL-1) target_sources(sampapi PRIVATE sampapi.h CMatrix.h CRect.h - CVector.h + CVector.h + CPoint.h ) diff --git a/include/sampapi/CMenu.h b/include/sampapi/CMenu.h index 533b88cc..bafa1fd3 100644 --- a/include/sampapi/CMenu.h +++ b/include/sampapi/CMenu.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CMenu.h" #include "sampapi/0.3.7-R3-1/CMenu.h" +#include "sampapi/0.3.7-R5-1/CMenu.h" +#include "sampapi/0.3.DL-1/CMenu.h" diff --git a/include/sampapi/CMenuPool.h b/include/sampapi/CMenuPool.h index 665eb191..4d63567f 100644 --- a/include/sampapi/CMenuPool.h +++ b/include/sampapi/CMenuPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CMenuPool.h" #include "sampapi/0.3.7-R3-1/CMenuPool.h" +#include "sampapi/0.3.7-R5-1/CMenuPool.h" +#include "sampapi/0.3.DL-1/CMenuPool.h" diff --git a/include/sampapi/CNetGame.h b/include/sampapi/CNetGame.h index 5f61fe35..af3e4f11 100644 --- a/include/sampapi/CNetGame.h +++ b/include/sampapi/CNetGame.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CNetGame.h" #include "sampapi/0.3.7-R3-1/CNetGame.h" +#include "sampapi/0.3.7-R5-1/CNetGame.h" +#include "sampapi/0.3.DL-1/CNetGame.h" diff --git a/include/sampapi/CNetStats.h b/include/sampapi/CNetStats.h index 96339490..a94b5813 100644 --- a/include/sampapi/CNetStats.h +++ b/include/sampapi/CNetStats.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CNetStats.h" #include "sampapi/0.3.7-R3-1/CNetStats.h" +#include "sampapi/0.3.7-R5-1/CNetStats.h" +#include "sampapi/0.3.DL-1/CNetStats.h" diff --git a/include/sampapi/CObject.h b/include/sampapi/CObject.h index 52066804..794d999e 100644 --- a/include/sampapi/CObject.h +++ b/include/sampapi/CObject.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CObject.h" #include "sampapi/0.3.7-R3-1/CObject.h" +#include "sampapi/0.3.7-R5-1/CObject.h" +#include "sampapi/0.3.DL-1/CObject.h" diff --git a/include/sampapi/CObjectEdit.h b/include/sampapi/CObjectEdit.h new file mode 100644 index 00000000..4f4023ff --- /dev/null +++ b/include/sampapi/CObjectEdit.h @@ -0,0 +1,5 @@ +#pragma once +#include "sampapi/0.3.7-R1/CObjectEdit.h" +#include "sampapi/0.3.7-R3-1/CObjectEdit.h" +#include "sampapi/0.3.7-R5-1/CObjectEdit.h" +#include "sampapi/0.3.DL-1/CObjectEdit.h" diff --git a/include/sampapi/CObjectMaterialText.h b/include/sampapi/CObjectMaterialText.h index 39c04467..663467f8 100644 --- a/include/sampapi/CObjectMaterialText.h +++ b/include/sampapi/CObjectMaterialText.h @@ -1,2 +1,5 @@ #pragma once +#include "sampapi/0.3.7-R1/CObjectMaterialText.h" #include "sampapi/0.3.7-R3-1/CObjectMaterialText.h" +#include "sampapi/0.3.7-R5-1/CObjectMaterialText.h" +#include "sampapi/0.3.DL-1/CObjectMaterialText.h" diff --git a/include/sampapi/CObjectPool.h b/include/sampapi/CObjectPool.h index 149d0a60..5bc92a9d 100644 --- a/include/sampapi/CObjectPool.h +++ b/include/sampapi/CObjectPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CObjectPool.h" #include "sampapi/0.3.7-R3-1/CObjectPool.h" +#include "sampapi/0.3.7-R5-1/CObjectPool.h" +#include "sampapi/0.3.DL-1/CObjectPool.h" diff --git a/include/sampapi/CObjectSelection.h b/include/sampapi/CObjectSelection.h index 35bb62a0..a1a289be 100644 --- a/include/sampapi/CObjectSelection.h +++ b/include/sampapi/CObjectSelection.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CObjectSelection.h" #include "sampapi/0.3.7-R3-1/CObjectSelection.h" +#include "sampapi/0.3.7-R5-1/CObjectSelection.h" +#include "sampapi/0.3.DL-1/CObjectSelection.h" diff --git a/include/sampapi/CPed.h b/include/sampapi/CPed.h index 4aa908dc..126d97cc 100644 --- a/include/sampapi/CPed.h +++ b/include/sampapi/CPed.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CPed.h" #include "sampapi/0.3.7-R3-1/CPed.h" +#include "sampapi/0.3.7-R5-1/CPed.h" +#include "sampapi/0.3.DL-1/CPed.h" diff --git a/include/sampapi/CPickupPool.h b/include/sampapi/CPickupPool.h index 65b0e62e..b9d7fde2 100644 --- a/include/sampapi/CPickupPool.h +++ b/include/sampapi/CPickupPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CPickupPool.h" #include "sampapi/0.3.7-R3-1/CPickupPool.h" +#include "sampapi/0.3.7-R5-1/CPickupPool.h" +#include "sampapi/0.3.DL-1/CPickupPool.h" diff --git a/include/sampapi/CPlayerInfo.h b/include/sampapi/CPlayerInfo.h index ed336c54..517667f7 100644 --- a/include/sampapi/CPlayerInfo.h +++ b/include/sampapi/CPlayerInfo.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CPlayerInfo.h" #include "sampapi/0.3.7-R3-1/CPlayerInfo.h" +#include "sampapi/0.3.7-R5-1/CPlayerInfo.h" +#include "sampapi/0.3.DL-1/CPlayerInfo.h" diff --git a/include/sampapi/CPlayerPool.h b/include/sampapi/CPlayerPool.h index b8b240e0..15e2825a 100644 --- a/include/sampapi/CPlayerPool.h +++ b/include/sampapi/CPlayerPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CPlayerPool.h" #include "sampapi/0.3.7-R3-1/CPlayerPool.h" +#include "sampapi/0.3.7-R5-1/CPlayerPool.h" +#include "sampapi/0.3.DL-1/CPlayerPool.h" diff --git a/include/sampapi/CPlayerTags.h b/include/sampapi/CPlayerTags.h index 7203abd9..00a98801 100644 --- a/include/sampapi/CPlayerTags.h +++ b/include/sampapi/CPlayerTags.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CPlayerTags.h" #include "sampapi/0.3.7-R3-1/CPlayerTags.h" +#include "sampapi/0.3.7-R5-1/CPlayerTags.h" +#include "sampapi/0.3.DL-1/CPlayerTags.h" diff --git a/include/sampapi/CPoint.h b/include/sampapi/CPoint.h new file mode 100644 index 00000000..67e3116f --- /dev/null +++ b/include/sampapi/CPoint.h @@ -0,0 +1,24 @@ +/* + This is a SAMP API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#pragma once + +#include "sampapi/sampapi.h" + +SAMPAPI_BEGIN_COMMON + +class SAMPAPI_EXPORT CPoint { +public: + long x, y; + + CPoint(); + CPoint(long x, long y); +}; + +SAMPAPI_END_COMMON diff --git a/include/sampapi/CRemotePlayer.h b/include/sampapi/CRemotePlayer.h index beee69f4..5e815261 100644 --- a/include/sampapi/CRemotePlayer.h +++ b/include/sampapi/CRemotePlayer.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CRemotePlayer.h" #include "sampapi/0.3.7-R3-1/CRemotePlayer.h" +#include "sampapi/0.3.7-R5-1/CRemotePlayer.h" +#include "sampapi/0.3.DL-1/CRemotePlayer.h" diff --git a/include/sampapi/CScoreboard.h b/include/sampapi/CScoreboard.h index c4d452a9..01a9a91e 100644 --- a/include/sampapi/CScoreboard.h +++ b/include/sampapi/CScoreboard.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CScoreboard.h" #include "sampapi/0.3.7-R3-1/CScoreboard.h" +#include "sampapi/0.3.7-R5-1/CScoreboard.h" +#include "sampapi/0.3.DL-1/CScoreboard.h" diff --git a/include/sampapi/CSpawnScreen.h b/include/sampapi/CSpawnScreen.h index eb76f5f9..01044ca2 100644 --- a/include/sampapi/CSpawnScreen.h +++ b/include/sampapi/CSpawnScreen.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CSpawnScreen.h" #include "sampapi/0.3.7-R3-1/CSpawnScreen.h" +#include "sampapi/0.3.7-R5-1/CSpawnScreen.h" +#include "sampapi/0.3.DL-1/CSpawnScreen.h" diff --git a/include/sampapi/CSrvNetStats.h b/include/sampapi/CSrvNetStats.h index 1de276a3..b600f0f7 100644 --- a/include/sampapi/CSrvNetStats.h +++ b/include/sampapi/CSrvNetStats.h @@ -1,2 +1,5 @@ #pragma once +#include "sampapi/0.3.7-R1/CSrvNetStats.h" #include "sampapi/0.3.7-R3-1/CSrvNetStats.h" +#include "sampapi/0.3.7-R5-1/CSrvNetStats.h" +#include "sampapi/0.3.DL-1/CSrvNetStats.h" diff --git a/include/sampapi/CTextDraw.h b/include/sampapi/CTextDraw.h index 42c73c13..6d3f21f7 100644 --- a/include/sampapi/CTextDraw.h +++ b/include/sampapi/CTextDraw.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CTextDraw.h" #include "sampapi/0.3.7-R3-1/CTextDraw.h" +#include "sampapi/0.3.7-R5-1/CTextDraw.h" +#include "sampapi/0.3.DL-1/CTextDraw.h" \ No newline at end of file diff --git a/include/sampapi/CTextDrawPool.h b/include/sampapi/CTextDrawPool.h index 0b4046bc..f3e99db2 100644 --- a/include/sampapi/CTextDrawPool.h +++ b/include/sampapi/CTextDrawPool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CTextDrawPool.h" #include "sampapi/0.3.7-R3-1/CTextDrawPool.h" +#include "sampapi/0.3.7-R5-1/CTextDrawPool.h" +#include "sampapi/0.3.DL-1/CTextDrawPool.h" diff --git a/include/sampapi/CTextDrawSelection.h b/include/sampapi/CTextDrawSelection.h index e35166d9..ab079ffd 100644 --- a/include/sampapi/CTextDrawSelection.h +++ b/include/sampapi/CTextDrawSelection.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CTextDrawSelection.h" #include "sampapi/0.3.7-R3-1/CTextDrawSelection.h" +#include "sampapi/0.3.7-R5-1/CTextDrawSelection.h" +#include "sampapi/0.3.DL-1/CTextDrawSelection.h" diff --git a/include/sampapi/CVehicle.h b/include/sampapi/CVehicle.h index 0f9ba0c3..30e54634 100644 --- a/include/sampapi/CVehicle.h +++ b/include/sampapi/CVehicle.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CVehicle.h" #include "sampapi/0.3.7-R3-1/CVehicle.h" +#include "sampapi/0.3.7-R5-1/CVehicle.h" +#include "sampapi/0.3.DL-1/CVehicle.h" diff --git a/include/sampapi/CVehiclePool.h b/include/sampapi/CVehiclePool.h index 75118524..fd0ae022 100644 --- a/include/sampapi/CVehiclePool.h +++ b/include/sampapi/CVehiclePool.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/CVehiclePool.h" #include "sampapi/0.3.7-R3-1/CVehiclePool.h" +#include "sampapi/0.3.7-R5-1/CVehiclePool.h" +#include "sampapi/0.3.DL-1/CVehicle.h" diff --git a/include/sampapi/Commands.h b/include/sampapi/Commands.h index 875a4326..287eacf1 100644 --- a/include/sampapi/Commands.h +++ b/include/sampapi/Commands.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/Commands.h" #include "sampapi/0.3.7-R3-1/Commands.h" +#include "sampapi/0.3.7-R5-1/Commands.h" +#include "sampapi/0.3.DL-1/Commands.h" diff --git a/include/sampapi/ControllerState.h b/include/sampapi/ControllerState.h index 44668ac3..2e751a9a 100644 --- a/include/sampapi/ControllerState.h +++ b/include/sampapi/ControllerState.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/ControllerState.h" #include "sampapi/0.3.7-R3-1/ControllerState.h" +#include "sampapi/0.3.7-R5-1/ControllerState.h" +#include "sampapi/0.3.DL-1/ControllerState.h" diff --git a/include/sampapi/DebugScript.h b/include/sampapi/DebugScript.h index dcb4829b..32012bec 100644 --- a/include/sampapi/DebugScript.h +++ b/include/sampapi/DebugScript.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/DebugScript.h" #include "sampapi/0.3.7-R3-1/DebugScript.h" +#include "sampapi/0.3.7-R5-1/DebugScript.h" +#include "sampapi/0.3.DL-1/DebugScript.h" diff --git a/include/sampapi/Exception.h b/include/sampapi/Exception.h index d7a20fc3..ef20b627 100644 --- a/include/sampapi/Exception.h +++ b/include/sampapi/Exception.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/Exception.h" #include "sampapi/0.3.7-R3-1/Exception.h" +#include "sampapi/0.3.7-R5-1/Exception.h" +#include "sampapi/0.3.DL-1/Exception.h" diff --git a/include/sampapi/GUI.h b/include/sampapi/GUI.h index f08bc2b1..81f5ca87 100644 --- a/include/sampapi/GUI.h +++ b/include/sampapi/GUI.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/GUI.h" #include "sampapi/0.3.7-R3-1/GUI.h" +#include "sampapi/0.3.7-R5-1/GUI.h" +#include "sampapi/0.3.DL-1/GUI.h" diff --git a/include/sampapi/InputHandler.h b/include/sampapi/InputHandler.h index 8b4cfa7b..75cdcf0c 100644 --- a/include/sampapi/InputHandler.h +++ b/include/sampapi/InputHandler.h @@ -1,2 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/InputHandler.h" +#include "sampapi/0.3.7-R3-1/InputHandler.h" +#include "sampapi/0.3.7-R5-1/InputHandler.h" +#include "sampapi/0.3.DL-1/InputHandler.h" diff --git a/include/sampapi/KeyStuff.h b/include/sampapi/KeyStuff.h index 7bc2277a..cfae3c23 100644 --- a/include/sampapi/KeyStuff.h +++ b/include/sampapi/KeyStuff.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/KeyStuff.h" #include "sampapi/0.3.7-R3-1/KeyStuff.h" +#include "sampapi/0.3.7-R5-1/KeyStuff.h" +#include "sampapi/0.3.DL-1/KeyStuff.h" diff --git a/include/sampapi/RPCHandlers.h b/include/sampapi/RPCHandlers.h new file mode 100644 index 00000000..560d22fd --- /dev/null +++ b/include/sampapi/RPCHandlers.h @@ -0,0 +1,4 @@ +#pragma once +#include "sampapi/0.3.7-R3-1/RPCHandlers.h" +#include "sampapi/0.3.7-R5-1/RPCHandlers.h" +#include "sampapi/0.3.DL-1/RPCHandlers.h" diff --git a/include/sampapi/Scripting.h b/include/sampapi/Scripting.h index 9edd3444..bb3d7cdb 100644 --- a/include/sampapi/Scripting.h +++ b/include/sampapi/Scripting.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/Scripting.h" #include "sampapi/0.3.7-R3-1/Scripting.h" +#include "sampapi/0.3.7-R5-1/Scripting.h" +#include "sampapi/0.3.DL-1/Scripting.h" diff --git a/include/sampapi/Settings.h b/include/sampapi/Settings.h index 35d1328c..d08fb8ff 100644 --- a/include/sampapi/Settings.h +++ b/include/sampapi/Settings.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/Settings.h" #include "sampapi/0.3.7-R3-1/Settings.h" +#include "sampapi/0.3.7-R5-1/Settings.h" +#include "sampapi/0.3.DL-1/Settings.h" diff --git a/include/sampapi/SpecialAction.h b/include/sampapi/SpecialAction.h index 7db6e8e7..9a849d2c 100644 --- a/include/sampapi/SpecialAction.h +++ b/include/sampapi/SpecialAction.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/SpecialAction.h" #include "sampapi/0.3.7-R3-1/SpecialAction.h" +#include "sampapi/0.3.7-R5-1/SpecialAction.h" +#include "sampapi/0.3.DL-1/SpecialAction.h" diff --git a/include/sampapi/Synchronization.h b/include/sampapi/Synchronization.h index 1f5973da..8d0e6d2d 100644 --- a/include/sampapi/Synchronization.h +++ b/include/sampapi/Synchronization.h @@ -1,3 +1,5 @@ #pragma once #include "sampapi/0.3.7-R1/Synchronization.h" #include "sampapi/0.3.7-R3-1/Synchronization.h" +#include "sampapi/0.3.7-R5-1/Synchronization.h" +#include "sampapi/0.3.DL-1/Synchronization.h" diff --git a/include/sampapi/sampapi.h b/include/sampapi/sampapi.h index ad3471e1..95ce67e7 100644 --- a/include/sampapi/sampapi.h +++ b/include/sampapi/sampapi.h @@ -1,9 +1,9 @@ /* This is a SAMP API project file. Developer: LUCHARE - + See more here https://github.com/LUCHARE/SAMP-API - + Copyright (c) 2018 BlastHack Team . All rights reserved. */ @@ -12,10 +12,15 @@ #ifndef SAMPAPI_EXPORT #define SAMPAPI_EXPORT #endif -#define SAMPAPI_VERSION 1 +#define SAMPAPI_VERSION 2 #define SAMPAPI_NAMESPACE sampapi -#define SAMPAPI_PACK_PUSH __pragma(pack(push, 1)) -#define SAMPAPI_PACK_POP __pragma(pack(pop)) +#ifdef _MSC_VER +#define SAMPAPI_PRAGMA(x) __pragma(x) +#else +#define SAMPAPI_PRAGMA(x) _Pragma(#x) +#endif +#define SAMPAPI_PACK_PUSH SAMPAPI_PRAGMA(pack(push, 1)) +#define SAMPAPI_PACK_POP SAMPAPI_PRAGMA(pack(pop)) #define SAMPAPI_NAMESPACE_BEGIN(ns) \ namespace SAMPAPI_NAMESPACE { \ namespace ns { @@ -40,9 +45,16 @@ #define SAMPAPI_BEGIN_V037R3_1 SAMPAPI_NAMESPACE_BEGIN(v037r3) #define SAMPAPI_BEGIN_PACKED_V037R3_1 SAMPAPI_NAMESPACE_BEGIN_PACKED(v037r3) +#define SAMPAPI_BEGIN_V037R5_1 SAMPAPI_NAMESPACE_BEGIN(v037r5) +#define SAMPAPI_BEGIN_PACKED_V037R5_1 SAMPAPI_NAMESPACE_BEGIN_PACKED(v037r5) + +#define SAMPAPI_BEGIN_V03DL_1 SAMPAPI_NAMESPACE_BEGIN(v03dl) +#define SAMPAPI_BEGIN_PACKED_V03DL_1 SAMPAPI_NAMESPACE_BEGIN_PACKED(v03dl) + struct ID3DXFont; struct ID3DXSprite; struct ID3DXRenderToSurface; +struct ID3DXLine; struct IDirect3DSurface9; struct IDirect3DTexture9; diff --git a/sampapi.sln b/sampapi.sln deleted file mode 100644 index 0bb70c57..00000000 --- a/sampapi.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29806.167 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sampapi", "sampapi.vcxproj", "{A5CCA13E-440F-4CE4-9F7B-09DDDA09C329}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A5CCA13E-440F-4CE4-9F7B-09DDDA09C329}.Debug|x86.ActiveCfg = Debug|Win32 - {A5CCA13E-440F-4CE4-9F7B-09DDDA09C329}.Debug|x86.Build.0 = Debug|Win32 - {A5CCA13E-440F-4CE4-9F7B-09DDDA09C329}.Release|x86.ActiveCfg = Release|Win32 - {A5CCA13E-440F-4CE4-9F7B-09DDDA09C329}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {1D7B647E-9350-4FD4-AF3C-DC7973051EBD} - EndGlobalSection -EndGlobal diff --git a/sampapi.vcxproj b/sampapi.vcxproj deleted file mode 100644 index d084aa65..00000000 --- a/sampapi.vcxproj +++ /dev/null @@ -1,327 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16.0 - {A5CCA13E-440F-4CE4-9F7B-09DDDA09C329} - Win32Proj - sampapi - 7.0 - - - - StaticLibrary - true - v141_xp - MultiByte - - - StaticLibrary - false - v141_xp - true - MultiByte - - - - - - - - - - - - - - - true - $(ProjectDir)build\bin\$(Configuration)\ - $(ProjectDir)build\obj\$(Configuration)\ - sampapi - - - false - $(ProjectDir)build\bin\$(Configuration)\ - $(ProjectDir)build\obj\$(Configuration)\ - sampapi - - - - NotUsing - Level3 - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - false - - - $(IntDir)%(RelativeDir) - MultiThreadedDebug - false - src;include;%(AdditionalIncludeDirectories) - - - Windows - true - - - - - NotUsing - Level3 - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - $(IntDir)%(RelativeDir) - MultiThreaded - false - AnySuitable - true - src;include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/sampapi.vcxproj.filters b/sampapi.vcxproj.filters deleted file mode 100644 index dc103b53..00000000 --- a/sampapi.vcxproj.filters +++ /dev/null @@ -1,702 +0,0 @@ - - - - - {fb3aa089-651e-444e-ae3f-a03a6de4b742} - - - {89a35b68-4c33-4585-ba62-899e7be24959} - - - {ef0c4038-a9e6-438f-86a4-a1400593a691} - - - {25e2755e-5259-40b8-8399-522f5e3ad3b2} - - - {126122f0-2e3f-4246-945d-a32bae926801} - - - {3fd8c993-1132-4e5b-9bc6-275d5ca0ce3c} - - - {cf3a989b-a7c0-437c-aadc-aa41f9ebf88f} - - - {cbaa490a-127d-498b-bca6-b27df8704824} - - - {3c183618-d2ea-47f6-a16b-99ed076bf9c2} - - - {f9669eee-d059-4f16-ba20-d85bb3c77acc} - - - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\0.3.7-R3-1 - - - src\sampapi\common - - - src\sampapi\common - - - src\sampapi\common - - - - - include\sampapi\common - - - include\sampapi\common - - - include\sampapi\common - - - include\sampapi\common - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R3-1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - include\sampapi\0.3.7-R1 - - - \ No newline at end of file diff --git a/src/sampapi/0.3.7-R1/CChat.cpp b/src/sampapi/0.3.7-R1/CChat.cpp index 958431b0..e38b21ff 100644 --- a/src/sampapi/0.3.7-R1/CChat.cpp +++ b/src/sampapi/0.3.7-R1/CChat.cpp @@ -17,6 +17,10 @@ SAMPAPI_VAR CChat*& RefChat() { return *(CChat**)GetAddress(0x21A0E4); } +int CChat::GetMode() { + return ((int(__thiscall*)(CChat*))GetAddress(0x5D7A0))(this); +} + CChat::CChat(IDirect3DDevice9* pDevice, CFonts* pFontRenderer, const char* pChatLogPath) { ((void(__thiscall*)(CChat*, IDirect3DDevice9*, CFonts*, const char*))GetAddress(0x647B0))(this, pDevice, pFontRenderer, pChatLogPath); } @@ -81,6 +85,10 @@ void CChat::Draw() { ((void(__thiscall*)(CChat*))GetAddress(0x64230))(this); } +void CChat::RenderToSurface() { + ((void(__thiscall*)(CChat*))GetAddress(0x64300))(this); +} + void CChat::AddChatMessage(const char* pNick, D3DCOLOR dwNickColor, const char* pText) { ((void(__thiscall*)(CChat*, const char*, D3DCOLOR, const char*))GetAddress(0x64450))(this, pNick, dwNickColor, pText); } @@ -93,6 +101,10 @@ void CChat::ScrollToBottom() { ((void(__thiscall*)(CChat*))GetAddress(0x637C0))(this); } +void CChat::Scroll(int nDelta) { + ((void(__thiscall*)(CChat*, int))GetAddress(0x637F0))(this, nDelta); +} + void CChat::FilterOutInvalidChars(char* szText) { ((void(__thiscall*)(CChat*, char*))GetAddress(0x63850))(this, szText); } diff --git a/src/sampapi/0.3.7-R1/CChatBubble.cpp b/src/sampapi/0.3.7-R1/CChatBubble.cpp new file mode 100644 index 00000000..69f89a45 --- /dev/null +++ b/src/sampapi/0.3.7-R1/CChatBubble.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R1/CChatBubble.h" + +SAMPAPI_BEGIN_V037R1 + +SAMPAPI_VAR CChatBubble*& RefChatBubble() { + return *(CChatBubble**)GetAddress(0x21A0DC); +} + +CChatBubble::CChatBubble() { + ((void(__thiscall*)(CChatBubble*))GetAddress(0x63220))(this); +} + +void CChatBubble::Add(ID nPlayer, const char* szText, D3DCOLOR color, float fDrawDistance, int lifeSpan) { + ((void(__thiscall*)(CChatBubble*, ID, const char*, D3DCOLOR, float, int))GetAddress(0x63250))(this, nPlayer, szText, color, fDrawDistance, lifeSpan); +} + +void CChatBubble::Draw() { + ((void(__thiscall*)(CChatBubble*))GetAddress(0x63310))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R1/CGame.cpp b/src/sampapi/0.3.7-R1/CGame.cpp index 47240cfd..0066bfdd 100644 --- a/src/sampapi/0.3.7-R1/CGame.cpp +++ b/src/sampapi/0.3.7-R1/CGame.cpp @@ -19,8 +19,8 @@ SAMPAPI_VAR char*& CGame::RefGameTextMessage() { return *(char**)GetAddress(0x13BEFC); } -SAMPAPI_VAR bool* CGame::ArrayUsedPlayerSlots() { - return (bool*)GetAddress(0x13BF08); +SAMPAPI_VAR BOOL* CGame::ArrayUsedPlayerSlots() { + return (BOOL*)GetAddress(0x13BF08); } BOOL CGame::DoesHeadMoves() { diff --git a/src/sampapi/0.3.7-R1/CHelpDialog.cpp b/src/sampapi/0.3.7-R1/CHelpDialog.cpp new file mode 100644 index 00000000..232fe97c --- /dev/null +++ b/src/sampapi/0.3.7-R1/CHelpDialog.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R1/CHelpDialog.h" + +SAMPAPI_BEGIN_V037R1 + +SAMPAPI_VAR CHelpDialog*& RefHelpDialog() { + return *(CHelpDialog**)GetAddress(0x21A0D8); +} + +CHelpDialog::CHelpDialog(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CHelpDialog*, IDirect3DDevice9*))GetAddress(0x67440))(this, pDevice); +} + +void CHelpDialog::Show() { + ((void(__thiscall*)(CHelpDialog*))GetAddress(0x67450))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R1/CMakeLists.txt b/src/sampapi/0.3.7-R1/CMakeLists.txt index 15b8bf7b..ee885217 100644 --- a/src/sampapi/0.3.7-R1/CMakeLists.txt +++ b/src/sampapi/0.3.7-R1/CMakeLists.txt @@ -51,4 +51,9 @@ target_sources(sampapi Scripting.cpp Settings.cpp VehicleSelection.cpp + CChatBubble.cpp + CHelpDialog.cpp + CObjectMaterialText.cpp + CSrvNetStats.cpp + CObjectEdit.cpp ) diff --git a/src/sampapi/0.3.7-R1/CNetGame.cpp b/src/sampapi/0.3.7-R1/CNetGame.cpp index 4a1c5ad3..07edc433 100644 --- a/src/sampapi/0.3.7-R1/CNetGame.cpp +++ b/src/sampapi/0.3.7-R1/CNetGame.cpp @@ -1,7 +1,7 @@ /* This is a SAMP (0.3.7-R1) API project file. Developer: LUCHARE - + See more here https://github.com/LUCHARE/SAMP-API Copyright (c) 2018 BlastHack Team . All rights reserved. @@ -139,6 +139,14 @@ CPlayerPool* CNetGame::GetPlayerPool() { return ((CPlayerPool * (__thiscall*)(CNetGame*)) GetAddress(0x1160))(this); } +CObjectPool* CNetGame::GetObjectPool() { + return ((CObjectPool * (__thiscall*)(CNetGame*)) GetAddress(0x2E00))(this); +} + +CActorPool* CNetGame::GetActorPool() { + return ((CActorPool * (__thiscall*)(CNetGame*)) GetAddress(0x2E10))(this); +} + CVehiclePool* CNetGame::GetVehiclePool() { return ((CVehiclePool * (__thiscall*)(CNetGame*)) GetAddress(0x1170))(this); } @@ -155,6 +163,14 @@ void CNetGame::SetState(int nState) { ((void(__thiscall*)(CNetGame*, int))GetAddress(0x8150))(this, nState); } +int CNetGame::GetState() { + return ((int(__thiscall*)(CNetGame*))GetAddress(0x2E20))(this); +} + +BOOL CNetGame::LanMode() { + return ((BOOL(__thiscall*)(CNetGame*))GetAddress(0x2E30))(this); +} + void CNetGame::ProcessGameStuff() { ((void(__thiscall*)(CNetGame*))GetAddress(0x8680))(this); } @@ -187,6 +203,14 @@ void CNetGame::InitializePools() { ((void(__thiscall*)(CNetGame*))GetAddress(0x8160))(this); } +void CNetGame::InitialNotification() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8380))(this); +} + +RakClientInterface* CNetGame::GetRakClient() { + return ((RakClientInterface * (__thiscall*)(CNetGame*)) GetAddress(0x1A40))(this); +} + __int64 CNetGame::GetCounter() { return ((__int64(__thiscall*)(CNetGame*))GetAddress(0x8500))(this); } diff --git a/src/sampapi/0.3.7-R1/CObjectEdit.cpp b/src/sampapi/0.3.7-R1/CObjectEdit.cpp new file mode 100644 index 00000000..56b9cf52 --- /dev/null +++ b/src/sampapi/0.3.7-R1/CObjectEdit.cpp @@ -0,0 +1,90 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R1/CObjectEdit.h" + +SAMPAPI_BEGIN_V037R1 + +SAMPAPI_VAR CObjectEdit*& RefObjectEdit() { + return *(CObjectEdit**)GetAddress(0x21A0C4); +} + +CObjectEdit::CObjectEdit(IDirect3DDevice9* RefDevice) { + ((CObjectEdit*(__thiscall*)(CObjectEdit*, IDirect3DDevice9*))GetAddress(0x6D580))(this, RefDevice); +} + +float CObjectEdit::WorldToScreen(CVector* in, float (&out)[2]) { + return ((float(__thiscall*)(CObjectEdit*, CVector*, float*))GetAddress(0x6D640))(this, in, out); +} + +float CObjectEdit::WorldToScreen(CVector* in, float* out) { + return ((float(__thiscall*)(CObjectEdit*, CVector*, float*))GetAddress(0x6D640))(this, in, out); +} + +int CObjectEdit::RenderAxes(CMatrix* a2, float linesize) { + return ((int(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x6D740))(this, a2, linesize); +} + +const char* CObjectEdit::GetRenderChar(BOOL for_big_font) { + return ((const char*(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x6D9C0))(this, for_big_font); +} + +void CObjectEdit::TryChangeProcessType() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x6DAC0))(this); +} + +void CObjectEdit::SetEditMode(ObjectEditMode mode) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditMode))GetAddress(0x6DC10))(this, mode); +} + +void CObjectEdit::ResetMousePos() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x6DDE0))(this); +} + +void CObjectEdit::EnterEditObject(ID object_id, BOOL player_object) { + ((void(__thiscall*)(CObjectEdit*, ID, BOOL))GetAddress(0x6DE40))(this, object_id, player_object); +} + +void CObjectEdit::SendEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x6E2D0))(this, response); +} + +void CObjectEdit::SendAttachedEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x6E4E0))(this, response); +} + +void CObjectEdit::Disable(BOOL result) { + ((void(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x6E5E0))(this, result); +} + +BOOL CObjectEdit::RenderControlsForObject(CMatrix* object_matrix, float linesize) { + return ((BOOL(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x6E650))(this, object_matrix, linesize); +} + +void CObjectEdit::ApplyChanges(ObjectEditProcessType type, float diff) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditProcessType, float))GetAddress(0x6EE80))(this, type, diff); +} + +void CObjectEdit::ProcessMouseMove() { + ((float(__thiscall*)(CObjectEdit*))GetAddress(0x6EEA0))(this); +} + +BOOL CObjectEdit::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CObjectEdit*, int, int, int))GetAddress(0x6EF70))(this, uMsg, wParam, lParam); +} + +void CObjectEdit::Render() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x6F1A0))(this); +} + +const char* CObjectEdit::GetMaxSizeChar() { + return ((const char*(__cdecl*)())GetAddress(0x6D9B0))(); +} + +SAMPAPI_END \ No newline at end of file diff --git a/src/sampapi/0.3.7-R1/CObjectMaterialText.cpp b/src/sampapi/0.3.7-R1/CObjectMaterialText.cpp new file mode 100644 index 00000000..0015f7a7 --- /dev/null +++ b/src/sampapi/0.3.7-R1/CObjectMaterialText.cpp @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R1/CObjectMaterialText.h" + +SAMPAPI_BEGIN_V037R1 + +SAMPAPI_VAR CObjectMaterialText*& RefObjectMaterialTextManager() { + return *(CObjectMaterialText**)GetAddress(0x21A104); +} + +CObjectMaterialText::CObjectMaterialText(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CObjectMaterialText*, IDirect3DDevice9*))GetAddress(0x6C2A0))(this, pDevice); +} + +CObjectMaterialText::~CObjectMaterialText() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x6C2C0))(this); +} + +void CObjectMaterialText::OnLostDevice() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x6C250))(this); +} + +void CObjectMaterialText::OnResetDevice() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x6C280))(this); +} + +IDirect3DTexture9* CObjectMaterialText::Create(const char* szText, const char* szFont, char nFontSize, int nBgSizeX, int nBgSizeY, D3DCOLOR fontColor, D3DCOLOR bgColor, bool bBold, char align) { + return ((IDirect3DTexture9 * (__thiscall*)(CObjectMaterialText*, const char*, const char*, char, int, int, D3DCOLOR, D3DCOLOR, bool, char)) GetAddress(0x6C2D0))(this, szText, szFont, nFontSize, nBgSizeX, nBgSizeY, fontColor, bgColor, bBold, align); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R1/CObjectPool.cpp b/src/sampapi/0.3.7-R1/CObjectPool.cpp index 454cd861..0323ab61 100644 --- a/src/sampapi/0.3.7-R1/CObjectPool.cpp +++ b/src/sampapi/0.3.7-R1/CObjectPool.cpp @@ -67,4 +67,8 @@ void CObjectPool::DrawLast() { ((void(__thiscall*)(CObjectPool*))GetAddress(0xF720))(this); } +CObject* CObjectPool::Get(ID nId) { + return ((CObject*(__thiscall*)(CObjectPool*, ID))GetAddress(0x2DD0))(this, nId); +} + SAMPAPI_END diff --git a/src/sampapi/0.3.7-R1/CPed.cpp b/src/sampapi/0.3.7-R1/CPed.cpp index 1c00b8bd..df317cdf 100644 --- a/src/sampapi/0.3.7-R1/CPed.cpp +++ b/src/sampapi/0.3.7-R1/CPed.cpp @@ -338,6 +338,10 @@ CWeapon* CPed::GetCurrentWeaponSlot() { return ((CWeapon * (__thiscall*)(CPed*)) GetAddress(0xA6A00))(this); } +void CPed::SetCameraExtZoomAndAspectRatio(float fExtZoom, float fAspectRatio) { + ((void(__thiscall*)(CPed*, float, float))GetAddress(0x10E60))(this, fExtZoom, fAspectRatio); +} + BOOL CPed::HasAccessory() { return ((BOOL(__thiscall*)(CPed*))GetAddress(0xA96D0))(this); } diff --git a/src/sampapi/0.3.7-R1/CPickupPool.cpp b/src/sampapi/0.3.7-R1/CPickupPool.cpp index 8a9e9dc6..5111c11d 100644 --- a/src/sampapi/0.3.7-R1/CPickupPool.cpp +++ b/src/sampapi/0.3.7-R1/CPickupPool.cpp @@ -19,8 +19,8 @@ CPickupPool::~CPickupPool() { ((void(__thiscall*)(CPickupPool*))GetAddress(0xFF60))(this); } -void CPickupPool::Create(Pickup* pPickup, ID nId) { - ((void(__thiscall*)(CPickupPool*, Pickup*, ID))GetAddress(0xFDC0))(this, pPickup, nId); +void CPickupPool::Create(Pickup* pPickup, int nId) { + ((void(__thiscall*)(CPickupPool*, Pickup*, int))GetAddress(0xFDC0))(this, pPickup, nId); } void CPickupPool::CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner) { diff --git a/src/sampapi/0.3.7-R1/CPlayerPool.cpp b/src/sampapi/0.3.7-R1/CPlayerPool.cpp index b6d3387c..a9f4cec3 100644 --- a/src/sampapi/0.3.7-R1/CPlayerPool.cpp +++ b/src/sampapi/0.3.7-R1/CPlayerPool.cpp @@ -43,6 +43,14 @@ const char* CPlayerPool::GetName(ID nId) { return ((const char*(__thiscall*)(CPlayerPool*, ID))GetAddress(0x13CE0))(this, nId); } +int CPlayerPool::GetLocalPlayerPing() { + return ((int(__thiscall*)(CPlayerPool*))GetAddress(0x6A200))(this); +} + +int CPlayerPool::GetLocalPlayerScore() { + return ((int(__thiscall*)(CPlayerPool*))GetAddress(0x6A1F0))(this); +} + ID CPlayerPool::Find(::CPed* pPed) { return ((ID(__thiscall*)(CPlayerPool*, ::CPed*))GetAddress(0x10420))(this, pPed); } diff --git a/src/sampapi/0.3.7-R1/CScoreboard.cpp b/src/sampapi/0.3.7-R1/CScoreboard.cpp index cc0caf22..5fce7efa 100644 --- a/src/sampapi/0.3.7-R1/CScoreboard.cpp +++ b/src/sampapi/0.3.7-R1/CScoreboard.cpp @@ -28,7 +28,7 @@ void CScoreboard::ResetDialogControls(CDXUTDialog* pDialog) { } void CScoreboard::Enable() { - ((void(__thiscall*)(CScoreboard*))GetAddress(0x6A3D0))(this); + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6AD30))(this); } void CScoreboard::Close(bool bHideCursor) { diff --git a/src/sampapi/0.3.7-R1/CSrvNetStats.cpp b/src/sampapi/0.3.7-R1/CSrvNetStats.cpp new file mode 100644 index 00000000..3d62c4c6 --- /dev/null +++ b/src/sampapi/0.3.7-R1/CSrvNetStats.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.7-R1) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R1/CSrvNetStats.h" + +SAMPAPI_BEGIN_V037R1 + +SAMPAPI_VAR CSrvNetStats*& RefServerNetStatistics() { + return *(CSrvNetStats**)GetAddress(0x21A0D4); +} + +CSrvNetStats::CSrvNetStats(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CSrvNetStats*, IDirect3DDevice9*))GetAddress(0x6CC40))(this, pDevice); +} + +void CSrvNetStats::Draw() { + ((void(__thiscall*)(CSrvNetStats*))GetAddress(0x6CC80))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R1/CTextDrawSelection.cpp b/src/sampapi/0.3.7-R1/CTextDrawSelection.cpp index 486603cb..322079b9 100644 --- a/src/sampapi/0.3.7-R1/CTextDrawSelection.cpp +++ b/src/sampapi/0.3.7-R1/CTextDrawSelection.cpp @@ -11,7 +11,7 @@ SAMPAPI_BEGIN_V037R1 -SAMPAPI_VAR CTextDrawSelection*& RefTextdrawSelection() { +SAMPAPI_VAR CTextDrawSelection*& RefTextDrawSelection() { return *(CTextDrawSelection**)GetAddress(0x21A0CC); } diff --git a/src/sampapi/0.3.7-R1/InputHandler.cpp b/src/sampapi/0.3.7-R1/InputHandler.cpp index 2c372f8a..b7192c79 100644 --- a/src/sampapi/0.3.7-R1/InputHandler.cpp +++ b/src/sampapi/0.3.7-R1/InputHandler.cpp @@ -15,6 +15,10 @@ SAMPAPI_VAR void*& InputHandler::RefPrevWindowProc() { return *(void**)GetAddress(0x119CB8); } +SAMPAPI_VAR unsigned int& InputHandler::RefAntiCheatDetectCount() { + return *(unsigned int*)GetAddress(0x21A130); +} + int InputHandler::WindowProc(unsigned int uMsg, unsigned int wParam, long lParam) { return ((int(__stdcall*)(unsigned int, unsigned int, long))GetAddress(0x5DB40))(uMsg, wParam, lParam); } diff --git a/src/sampapi/0.3.7-R1/Scripting.cpp b/src/sampapi/0.3.7-R1/Scripting.cpp index b2a374eb..8d108d04 100644 --- a/src/sampapi/0.3.7-R1/Scripting.cpp +++ b/src/sampapi/0.3.7-R1/Scripting.cpp @@ -27,6 +27,10 @@ SAMPAPI_VAR unsigned long** Scripting::ArrayThreadLocals() { return (unsigned long**)GetAddress(0x215F00); } +SAMPAPI_VAR BOOL& Scripting::RefLocalDebug() { + return *(BOOL*)GetAddress(0x216050); +} + SAMPAPI_VAR Scripting::ProcessOneCommandFn& Scripting::RefProcessOneCommand() { return *(Scripting::ProcessOneCommandFn*)GetAddress(0x1023C4); } diff --git a/src/sampapi/0.3.7-R3-1/CGame.cpp b/src/sampapi/0.3.7-R3-1/CGame.cpp index 2fd9f725..e502ae5b 100644 --- a/src/sampapi/0.3.7-R3-1/CGame.cpp +++ b/src/sampapi/0.3.7-R3-1/CGame.cpp @@ -15,8 +15,8 @@ SAMPAPI_VAR char*& CGame::RefGameTextMessage() { return *(char**)GetAddress(0x150084); } -SAMPAPI_VAR bool* CGame::ArrayUsedPlayerSlots() { - return (bool*)GetAddress(0x150090); +SAMPAPI_VAR BOOL* CGame::ArrayUsedPlayerSlots() { + return (BOOL*)GetAddress(0x150090); } SAMPAPI_VAR CGame*& RefGame() { diff --git a/src/sampapi/0.3.7-R3-1/CLocalPlayer.cpp b/src/sampapi/0.3.7-R3-1/CLocalPlayer.cpp index bb5b8b73..742cfe5a 100644 --- a/src/sampapi/0.3.7-R3-1/CLocalPlayer.cpp +++ b/src/sampapi/0.3.7-R3-1/CLocalPlayer.cpp @@ -11,6 +11,22 @@ SAMPAPI_BEGIN_V037R3_1 +SAMPAPI_VAR int& CLocalPlayer::RefIncarSendrate() { + return *(int*)GetAddress(0xFE0AC); +} + +SAMPAPI_VAR int& CLocalPlayer::RefOnfootSendrate() { + return *(int*)GetAddress(0xFE0A8); +} + +SAMPAPI_VAR int& CLocalPlayer::RefFiringSendrate() { + return *(int*)GetAddress(0xFE0B0); +} + +SAMPAPI_VAR int& CLocalPlayer::RefSendMultiplier() { + return *(int*)GetAddress(0xFE0B4); +} + CLocalPlayer::CLocalPlayer() { ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4A80))(this); } diff --git a/src/sampapi/0.3.7-R3-1/CMakeLists.txt b/src/sampapi/0.3.7-R3-1/CMakeLists.txt index d1708657..38200f8b 100644 --- a/src/sampapi/0.3.7-R3-1/CMakeLists.txt +++ b/src/sampapi/0.3.7-R3-1/CMakeLists.txt @@ -52,4 +52,7 @@ target_sources(sampapi KeyStuff.cpp Scripting.cpp Settings.cpp + InputHandler.cpp + CObjectEdit.cpp + RPCHandlers.cpp ) diff --git a/src/sampapi/0.3.7-R3-1/CObjectEdit.cpp b/src/sampapi/0.3.7-R3-1/CObjectEdit.cpp new file mode 100644 index 00000000..4f09765d --- /dev/null +++ b/src/sampapi/0.3.7-R3-1/CObjectEdit.cpp @@ -0,0 +1,86 @@ +/* + This is a SAMP (0.3.7-R3) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R3-1/CObjectEdit.h" + +SAMPAPI_BEGIN_V037R3_1 + +SAMPAPI_VAR CObjectEdit*& RefObjectEdit() { + return *(CObjectEdit**)GetAddress(0x26E8A8); +} + +CObjectEdit::CObjectEdit(IDirect3DDevice9* RefDevice) { + ((CObjectEdit*(__thiscall*)(CObjectEdit*, IDirect3DDevice9*))GetAddress(0x71470))(this, RefDevice); +} + +float CObjectEdit::WorldToScreen(CVector* in, float* out) { + return ((float(__thiscall*)(CObjectEdit*, CVector*, float*))GetAddress(0x71530))(this, in, out); +} + +int CObjectEdit::RenderAxes(CMatrix* a2, float linesize) { + return ((int(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x71630))(this, a2, linesize); +} + +const char* CObjectEdit::GetRenderChar(BOOL for_big_font) { + return ((const char*(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x718B0))(this, for_big_font); +} + +void CObjectEdit::TryChangeProcessType() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x719B0))(this); +} + +void CObjectEdit::SetEditMode(ObjectEditMode mode) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditMode))GetAddress(0x71B00))(this, mode); +} + +void CObjectEdit::ResetMousePos() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x71CD0))(this); +} + +void CObjectEdit::EnterEditObject(ID object_id, BOOL player_object) { + ((void(__thiscall*)(CObjectEdit*, ID, BOOL))GetAddress(0x71D30))(this, object_id, player_object); +} + +void CObjectEdit::SendEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x721C0))(this, response); +} + +void CObjectEdit::SendAttachedEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x723D0))(this, response); +} + +void CObjectEdit::Disable(BOOL result) { + ((void(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x724D0))(this, result); +} + +BOOL CObjectEdit::RenderControlsForObject(CMatrix* object_matrix, float linesize) { + return ((BOOL(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x72540))(this, object_matrix, linesize); +} + +void CObjectEdit::ApplyChanges(ObjectEditProcessType type, float diff) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditProcessType, float))GetAddress(0x72D70))(this, type, diff); +} + +void CObjectEdit::ProcessMouseMove() { + ((float(__thiscall*)(CObjectEdit*))GetAddress(0x72D90))(this); +} + +BOOL CObjectEdit::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CObjectEdit*, int, int, int))GetAddress(0x72E60))(this, uMsg, wParam, lParam); +} + +void CObjectEdit::Render() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x73090))(this); +} + +const char* CObjectEdit::GetMaxSizeChar() { + return ((const char*(__cdecl*)())GetAddress(0x718A0))(); +} + +SAMPAPI_END \ No newline at end of file diff --git a/src/sampapi/0.3.7-R3-1/CPed.cpp b/src/sampapi/0.3.7-R3-1/CPed.cpp index 10a72c04..7ed3e2f9 100644 --- a/src/sampapi/0.3.7-R3-1/CPed.cpp +++ b/src/sampapi/0.3.7-R3-1/CPed.cpp @@ -16,7 +16,7 @@ CPed::CPed() { } CPed::CPed(int nPlayerNumber, int nModel, CVector position, float fRotation) { - ((void(__thiscall*)(CPed*, int, int, CVector, float))GetAddress(0xAB1E0))(this, nPlayerNumber, nModel, position, fRotation); + ((void(__thiscall*)(CPed*, int, int, CVector, float))GetAddress(0xB0450))(this, nPlayerNumber, nModel, position, fRotation); } CPed::~CPed() { diff --git a/src/sampapi/0.3.7-R3-1/CPickupPool.cpp b/src/sampapi/0.3.7-R3-1/CPickupPool.cpp index f323a284..aa5449bb 100644 --- a/src/sampapi/0.3.7-R3-1/CPickupPool.cpp +++ b/src/sampapi/0.3.7-R3-1/CPickupPool.cpp @@ -19,8 +19,8 @@ CPickupPool::~CPickupPool() { ((void(__thiscall*)(CPickupPool*))GetAddress(0x130C0))(this); } -void CPickupPool::Create(Pickup* pData, ID nId) { - ((void(__thiscall*)(CPickupPool*, Pickup*, ID))GetAddress(0x12F20))(this, pData, nId); +void CPickupPool::Create(Pickup* pData, int nId) { + ((void(__thiscall*)(CPickupPool*, Pickup*, int))GetAddress(0x12F20))(this, pData, nId); } void CPickupPool::CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner) { diff --git a/src/sampapi/0.3.7-R3-1/InputHandler.cpp b/src/sampapi/0.3.7-R3-1/InputHandler.cpp new file mode 100644 index 00000000..1a58f14a --- /dev/null +++ b/src/sampapi/0.3.7-R3-1/InputHandler.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.7-R3) API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R3-1/InputHandler.h" + +SAMPAPI_BEGIN_V037R3_1 + +SAMPAPI_VAR void*& InputHandler::RefPrevWindowProc() { + return *(void**)GetAddress(0x12DD38); +} + +SAMPAPI_VAR unsigned int& InputHandler::RefAntiCheatDetectCount() { + return *(unsigned int*)GetAddress(0x26E918); +} + +int InputHandler::WindowProc(unsigned int uMsg, unsigned int wParam, long lParam) { + return ((int(__stdcall*)(unsigned int, unsigned int, long))GetAddress(0x60EE0))(uMsg, wParam, lParam); +} + +BOOL InputHandler::KeyPressHandler(unsigned int nKey) { + return ((BOOL(__cdecl*)(unsigned int))GetAddress(0x60BF0))(nKey); +} + +BOOL InputHandler::CharInputHandler(unsigned int nChar) { + return ((BOOL(__cdecl*)(unsigned int))GetAddress(0x60E20))(nChar); +} + +BOOL InputHandler::Initialize() { + return ((BOOL(__cdecl*)())GetAddress(0x61750))(); +} + +void SwitchWindowedMode() { + ((void(__cdecl*)())GetAddress(0x60BA0))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R3-1/RPCHandlers.cpp b/src/sampapi/0.3.7-R3-1/RPCHandlers.cpp new file mode 100644 index 00000000..0f04b4c0 --- /dev/null +++ b/src/sampapi/0.3.7-R3-1/RPCHandlers.cpp @@ -0,0 +1,546 @@ +/* + This is a SAMP (0.3.7-R3) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R3-1/RPCHandlers.h" + +SAMPAPI_BEGIN_V037R3_1 + +void RPCHandlers::ScrSetPlayerSkillLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF2A0))(pParams); +} + +void RPCHandlers::ScrCreate3DTextLabel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF3D0))(pParams); +} + +void RPCHandlers::ScrDestroy3DTextLabel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF580))(pParams); +} + +void RPCHandlers::ScrChatBubble(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF640))(pParams); +} + +void RPCHandlers::ScrShowDialog(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF7B0))(pParams); +} + +void RPCHandlers::ScrSetCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFE20))(pParams); +} + +void RPCHandlers::ScrDisableCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE260))(pParams); +} + +void RPCHandlers::ScrSetRaceCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFF30))(pParams); +} + +void RPCHandlers::ScrDisableRaceCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE270))(pParams); +} + +void RPCHandlers::UpdateScoresPingsIps(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10090))(pParams); +} + +void RPCHandlers::SrvNetStats(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE280))(pParams); +} + +void RPCHandlers::ScrGamemodeRestart(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE310))(pParams); +} + +void RPCHandlers::ConnectionRejected(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10200))(pParams); +} + +void RPCHandlers::ScrClientMessage(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEC50))(pParams); +} + +void RPCHandlers::ScrSetWorldTime(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEBB0))(pParams); +} + +void RPCHandlers::ScrCreatePickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xED40))(pParams); +} + +void RPCHandlers::ScrDestroyPickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEE00))(pParams); +} + +void RPCHandlers::ScrDestroyWeaponPickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEEA0))(pParams); +} + +void RPCHandlers::ScmEvent(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEF40))(pParams); +} + +void RPCHandlers::ScrSetWeather(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF030))(pParams); +} + +void RPCHandlers::ScrSetPlayerTime(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF0E0))(pParams); +} + +void RPCHandlers::ScrToggleClock(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF1C0))(pParams); +} + +void RPCHandlers::ScrSetIngameTimer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFBE0))(pParams); +} + +void RPCHandlers::ScrWorldPlayerAdd(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x107D0))(pParams); +} + +void RPCHandlers::ScrWorldPlayerDeath(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10A00))(pParams); +} + +void RPCHandlers::ScrWorldPlayerRemove(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10AC0))(pParams); +} + +void RPCHandlers::ScrWorldVehicleAdd(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE330))(pParams); +} + +void RPCHandlers::ScrWorldVehicleRemove(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10B90))(pParams); +} + +void RPCHandlers::DamageVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10E70))(pParams); +} + +void RPCHandlers::ScrSetVehicleParamsEx(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10FA0))(pParams); +} + +void RPCHandlers::EnterVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11280))(pParams); +} + +void RPCHandlers::ExitVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x113A0))(pParams); +} + +void RPCHandlers::ScrServerJoin(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF9A0))(pParams); +} + +void RPCHandlers::ScrServerQuit(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFB20))(pParams); +} + +void RPCHandlers::ScrInitGame(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10320))(pParams); +} + +void RPCHandlers::Chat(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11FA0))(pParams); +} + +void RPCHandlers::RequestClass(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFC80))(pParams); +} + +void RPCHandlers::RequestSpawn(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFD50))(pParams); +} + +void RPCHandlers::EditAttachedObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11490))(pParams); +} + +void RPCHandlers::EditObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11550))(pParams); +} + +void RPCHandlers::EnterEditObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE570))(pParams); +} + +void RPCHandlers::ScrCancelEdit(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE630))(pParams); +} + +void RPCHandlers::ScrUpdateCameraTarget(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE6E0))(pParams); +} + +void RPCHandlers::ClientCheck(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11710))(pParams); +} + +void RPCHandlers::ScrCreateActor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE770))(pParams); +} + +void RPCHandlers::ScrDestroyActor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11AB0))(pParams); +} + +void RPCHandlers::ScrDisableVehicleCollisions(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17700))(pParams); +} + +void RPCHandlers::ScrSetPlayerMapIcon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A0A0))(pParams); +} + +void RPCHandlers::ScrRemovePlayerMapIcon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A1C0))(pParams); +} + +void RPCHandlers::ScrSetPlayerAmmo(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A520))(pParams); +} + +void RPCHandlers::ScrSetGravity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A5E0))(pParams); +} + +void RPCHandlers::ScrSetVehicleHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A680))(pParams); +} + +void RPCHandlers::ScrAttachTrailerToVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A760))(pParams); +} + +void RPCHandlers::ScrDetachTrailerFromVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A8A0))(pParams); +} + +void RPCHandlers::ScrCreateObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AC50))(pParams); +} + +void RPCHandlers::ScrSetObjectPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B320))(pParams); +} + +void RPCHandlers::ScrSetObjectRotation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B430))(pParams); +} + +void RPCHandlers::ScrDestroyObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B530))(pParams); +} + +void RPCHandlers::ScrCreateExplosion(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B620))(pParams); +} + +void RPCHandlers::ScrShowPlayerNametagForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B730))(pParams); +} + +void RPCHandlers::ScrMoveObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B810))(pParams); +} + +void RPCHandlers::ScrStopObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B9C0))(pParams); +} + +void RPCHandlers::ScrSetNumberPlate(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BB40))(pParams); +} + +void RPCHandlers::ScrTogglePlayerSpectating(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BC60))(pParams); +} + +void RPCHandlers::ScrPlayerSpectatePlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BD10))(pParams); +} + +void RPCHandlers::ScrPlayerSpectateVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BDF0))(pParams); +} + +void RPCHandlers::ScrMoveVehicleComponent(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BED0))(pParams); +} + +void RPCHandlers::ScrForceClassSelection(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17A00))(pParams); +} + +void RPCHandlers::ScrAttachObjectToPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BFB0))(pParams); +} + +void RPCHandlers::ScrInitMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C170))(pParams); +} + +void RPCHandlers::ScrShowMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C430))(pParams); +} + +void RPCHandlers::ScrHideMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C4E0))(pParams); +} + +void RPCHandlers::ScrSetPlayerWantedLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C590))(pParams); +} + +void RPCHandlers::ScrShowTextDraw(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C630))(pParams); +} + +void RPCHandlers::ScrHideTextDrawForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C760))(pParams); +} + +void RPCHandlers::ScrTextDrawSetString(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C810))(pParams); +} + +void RPCHandlers::ScrGangZoneCreate(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C920))(pParams); +} + +void RPCHandlers::ScrGangZoneDestroy(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CA40))(pParams); +} + +void RPCHandlers::ScrGangZoneFlash(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CAF0))(pParams); +} + +void RPCHandlers::ScrGangZoneStopFlash(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CBB0))(pParams); +} + +void RPCHandlers::ScrApplyAnimation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A260))(pParams); +} + +void RPCHandlers::ScrClearAnimations(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17EB0))(pParams); +} + +void RPCHandlers::ScrSetPlayerSpecialAction(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17FC0))(pParams); +} + +void RPCHandlers::ScrEnableStuntBonusForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17670))(pParams); +} + +void RPCHandlers::ScrSetPlayerFightingStyle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18070))(pParams); +} + +void RPCHandlers::ScrSetPlayerVelocity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18170))(pParams); +} + +void RPCHandlers::ScrSetVehicleVelocity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18270))(pParams); +} + +void RPCHandlers::ScrPlayCrimeReport(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18960))(pParams); +} + +void RPCHandlers::ScrSetSpawnInfo(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17870))(pParams); +} + +void RPCHandlers::ScrSetPlayerTeam(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19020))(pParams); +} + +void RPCHandlers::ScrSetPlayerSkin(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18AA0))(pParams); +} + +void RPCHandlers::ScrSetPlayerName(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D880))(pParams); +} + +void RPCHandlers::ScrSetPlayerPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18C30))(pParams); +} + +void RPCHandlers::ScrSetPlayerPositionFindZ(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18D50))(pParams); +} + +void RPCHandlers::ScrSetPlayerHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18E60))(pParams); +} + +void RPCHandlers::ScrPutPlayerInVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18F10))(pParams); +} + +void RPCHandlers::ScrRemovePlayerFromVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17920))(pParams); +} + +void RPCHandlers::ScrSetPlayerColor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19110))(pParams); +} + +void RPCHandlers::ScrDisplayGametext(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19200))(pParams); +} + +void RPCHandlers::ScrSetPlayerInterior(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19310))(pParams); +} + +void RPCHandlers::ScrSetPlayerCameraPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x193B0))(pParams); +} + +void RPCHandlers::ScrSetPlayerCameraLookAt(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19480))(pParams); +} + +void RPCHandlers::ScrSetVehiclePosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19580))(pParams); +} + +void RPCHandlers::ScrSetVehicleZAngle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19690))(pParams); +} + +void RPCHandlers::ScrSetVehicleParamsForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19770))(pParams); +} + +void RPCHandlers::ScrSetCameraBehindPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x179B0))(pParams); +} + +void RPCHandlers::ScrTogglePlayerControllable(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19BA0))(pParams); +} + +void RPCHandlers::ScrPlaySound(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19C40))(pParams); +} + +void RPCHandlers::ScrSetPlayerWorldBounds(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19D20))(pParams); +} + +void RPCHandlers::ScrGivePlayerMoney(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19E10))(pParams); +} + +void RPCHandlers::ScrSetPlayerFacingAngle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19EB0))(pParams); +} + +void RPCHandlers::ScrResetPlayerMoney(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x179C0))(pParams); +} + +void RPCHandlers::ScrResetPlayerWeapons(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x179D0))(pParams); +} + +void RPCHandlers::ScrGivePlayerWeapon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19F50))(pParams); +} + +void RPCHandlers::ScrLinkVehicleToInterior(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19840))(pParams); +} + +void RPCHandlers::ScrSetPlayerArmor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A470))(pParams); +} + +void RPCHandlers::ScrDeathMessage(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D610))(pParams); +} + +void RPCHandlers::ScrSetPlayerShopName(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17770))(pParams); +} + +void RPCHandlers::ScrSetPlayerDrunkLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x186D0))(pParams); +} + +void RPCHandlers::ScrSetPlayerArmedWeapon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18770))(pParams); +} + +void RPCHandlers::ScrSetPlayerAttachedObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18820))(pParams); +} + +void RPCHandlers::ScrPlayAudioStream(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CC60))(pParams); +} + +void RPCHandlers::ScrStopAudioStream(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17A20))(pParams); +} + +void RPCHandlers::ScrRemoveBuildingForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CDD0))(pParams); +} + +void RPCHandlers::ScrAttachCameraToObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19900))(pParams); +} + +void RPCHandlers::ScrInterpolateCamera(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19A00))(pParams); +} + +void RPCHandlers::ClickTextDraw(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CEF0))(pParams); +} + +void RPCHandlers::ScrSetObjectMaterial(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AFB0))(pParams); +} + +void RPCHandlers::ScrStopObjectCameraCollision(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BA80))(pParams); +} + +void RPCHandlers::ScrSetActorAnimation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CFF0))(pParams); +} + +void RPCHandlers::ScrSetActorRotation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D290))(pParams); +} + +void RPCHandlers::ScrSetActorPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D370))(pParams); +} + +void RPCHandlers::ScrSetActorHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D480))(pParams); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/AimStuff.cpp b/src/sampapi/0.3.7-R5-1/AimStuff.cpp new file mode 100644 index 00000000..4683cbb4 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/AimStuff.cpp @@ -0,0 +1,122 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/AimStuff.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR float& AimStuff::RefLocalPlayerCameraExtZoom() { + return *(float*)GetAddress(0x143FD0); +} + +SAMPAPI_VAR float& AimStuff::RefLocalPlayerAspectRatio() { + return *(float*)GetAddress(0x146B88); +} + +SAMPAPI_VAR float*& AimStuff::RefInternalCameraExtZoom() { + return *(float**)GetAddress(0x1039D4); +} + +SAMPAPI_VAR float*& AimStuff::RefInternalAspectRatio() { + return *(float**)GetAddress(0x1039D0); +} + +SAMPAPI_VAR float* AimStuff::ArrayCameraExtZoom() { + return (float*)GetAddress(0x1440B0); +} + +SAMPAPI_VAR float* AimStuff::ArrayAspectRatio() { + return (float*)GetAddress(0x146BB8); +} + +SAMPAPI_VAR char* AimStuff::ArrayCameraMode() { + return (char*)GetAddress(0x143FD8); +} + +SAMPAPI_VAR char*& AimStuff::RefInternalCameraMode() { + return *(char**)GetAddress(0x113974); +} + +SAMPAPI_VAR AimStuff::Aim& AimStuff::RefLocalPlayerAim() { + return *(AimStuff::Aim*)GetAddress(0x1443F8); +} + +SAMPAPI_VAR AimStuff::Aim* AimStuff::ArrayPlayerAim() { + return (AimStuff::Aim*)GetAddress(0x144428); +} + +SAMPAPI_VAR AimStuff::Aim*& AimStuff::RefInternalAim() { + return *(AimStuff::Aim**)GetAddress(0x1039C8); +} + +void AimStuff::UpdateCameraExtZoomAndAspectRatio() { + ((void(__stdcall*)())GetAddress(0x9C7C0))(); +} + +void AimStuff::ApplyCameraExtZoomAndAspectRatio() { + ((void(__stdcall*)())GetAddress(0x9C7E0))(); +} + +void AimStuff::SetCameraExtZoomAndAspectRatio(NUMBER nPlayer, float fCameraExtZoom, float fAspectRatio) { + ((void(__stdcall*)(NUMBER, float, float))GetAddress(0x9C800))(nPlayer, fCameraExtZoom, fAspectRatio); +} + +float AimStuff::GetAspectRatio() { + return ((float(__stdcall*)())GetAddress(0x9C820))(); +} + +float AimStuff::GetCameraExtZoom() { + return ((float(__stdcall*)())GetAddress(0x9C830))(); +} + +void AimStuff::ApplyCameraExtZoomAndAspectRatio(NUMBER nPlayer) { + ((void(__stdcall*)(NUMBER))GetAddress(0x9C850))(nPlayer); +} + +void AimStuff::SetCameraMode(char nMode, NUMBER nPlayer) { + ((void(__stdcall*)(char, NUMBER))GetAddress(0x9C890))(nMode, nPlayer); +} + +char AimStuff::GetCameraMode(NUMBER nPlayer) { + return ((char(__stdcall*)(NUMBER))GetAddress(0x9C8B0))(nPlayer); +} + +char AimStuff::GetCameraMode() { + return ((char(__stdcall*)())GetAddress(0x9C8C0))(); +} + +void AimStuff::Initialize() { + ((void(__stdcall*)())GetAddress(0x9C8D0))(); +} + +void AimStuff::UpdateAim() { + ((void(__stdcall*)())GetAddress(0x9C940))(); +} + +void AimStuff::ApplyAim() { + ((void(__stdcall*)())GetAddress(0x9C960))(); +} + +AimStuff::Aim* AimStuff::GetAim() { + return ((Aim * (__stdcall*)()) GetAddress(0x9C980))(); +} + +void AimStuff::SetAim(int nPlayer, const Aim* pAim) { + ((void(__stdcall*)(int, const Aim*))GetAddress(0x9C990))(nPlayer, pAim); +} + +void AimStuff::ApplyAim(int nPlayer) { + ((void(__stdcall*)(int))GetAddress(0x9C9C0))(nPlayer); +} + +AimStuff::Aim* AimStuff::GetAim(int nPlayer) { + return ((Aim * (__stdcall*)(int)) GetAddress(0x9C9F0))(nPlayer); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CActor.cpp b/src/sampapi/0.3.7-R5-1/CActor.cpp new file mode 100644 index 00000000..6123cb77 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CActor.cpp @@ -0,0 +1,45 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CActor.h" + +SAMPAPI_BEGIN_V037R5_1 + +CActor::CActor(int nModel, CVector position, float fRotation) { + ((void(__thiscall*)(CActor*, int, CVector, float))GetAddress(0x9C2B0))(this, nModel, position, fRotation); +} + +CActor::~CActor() { +} + +void CActor::Destroy() { + ((void(__thiscall*)(CActor*))GetAddress(0x9C400))(this); +} + +void CActor::PerformAnimation(const char* szAnim, const char* szIFP, float fFramedelta, int bLockA, int bLockX, int bLockY, int bLockF, int nTime) { + ((void(__thiscall*)(CActor*, const char*, const char*, float, int, int, int, int, int))GetAddress(0x9C460))(this, szAnim, szIFP, fFramedelta, bLockA, bLockX, bLockY, bLockF, nTime); +} + +void CActor::SetRotation(float fAngle) { + ((void(__thiscall*)(CActor*, float))GetAddress(0x9C570))(this, fAngle); +} + +float CActor::GetHealth() { + return ((float(__thiscall*)(CActor*))GetAddress(0x9C5B0))(this); +} + +void CActor::SetHealth(float fValue) { + ((void(__thiscall*)(CActor*, float))GetAddress(0x9C5D0))(this, fValue); +} + +void CActor::SetInvulnerable(bool bEnable) { + ((void(__thiscall*)(CActor*, bool))GetAddress(0x9C700))(this, bEnable); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CActorPool.cpp b/src/sampapi/0.3.7-R5-1/CActorPool.cpp new file mode 100644 index 00000000..161d8e0d --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CActorPool.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CActorPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CActorPool::CActorPool() { + ((void(__thiscall*)(CActorPool*))GetAddress(0x16C0))(this); +} + +CActorPool::~CActorPool() { + ((void(__thiscall*)(CActorPool*))GetAddress(0x18E0))(this); +} + +CActor* CActorPool::Get(ID nId) { + return ((CActor * (__thiscall*)(CActorPool*, ID)) GetAddress(0x1610))(this, nId); +} + +BOOL CActorPool::DoesExist(ID nId) { + return ((BOOL(__thiscall*)(CActorPool*, ID))GetAddress(0x1640))(this, nId); +} + +void CActorPool::UpdateLargestId() { + ((void(__thiscall*)(CActorPool*))GetAddress(0x1660))(this); +} + +BOOL CActorPool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CActorPool*, ID))GetAddress(0x16F0))(this, nId); +} + +ID CActorPool::Find(::CPed* pGamePed) { + return ((ID(__thiscall*)(CActorPool*, ::CPed*))GetAddress(0x18B0))(this, pGamePed); +} + +BOOL CActorPool::Create(ActorInfo* pInfo) { + return ((BOOL(__thiscall*)(CActorPool*, ActorInfo*))GetAddress(0x1900))(this, pInfo); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CAudio.cpp b/src/sampapi/0.3.7-R5-1/CAudio.cpp new file mode 100644 index 00000000..1446d338 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CAudio.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CAudio.h" + +SAMPAPI_BEGIN_V037R5_1 + +int CAudio::GetRadioStation() { + return ((int(__thiscall*)(CAudio*))GetAddress(0xA2210))(this); +} + +void CAudio::StartRadio(int nStation) { + ((void(__thiscall*)(CAudio*, int))GetAddress(0xA2240))(this, nStation); +} + +void CAudio::StopRadio() { + ((void(__thiscall*)(CAudio*))GetAddress(0xA2260))(this); +} + +float CAudio::GetRadioVolume() { + return ((float(__thiscall*)(CAudio*))GetAddress(0xA2280))(this); +} + +void CAudio::StopOutdoorAmbienceTrack() { + ((void(__thiscall*)(CAudio*))GetAddress(0xA2290))(this); +} + +void CAudio::SetOutdoorAmbienceTrack(int nSound) { + ((void(__thiscall*)(CAudio*, int))GetAddress(0xA22A0))(this, nSound); +} + +bool CAudio::IsOutdoorAmbienceTrackDisabled() { + return ((bool(__thiscall*)(CAudio*))GetAddress(0xA23A0))(this); +} + +void CAudio::Play(int nSound, CVector location) { + ((void(__thiscall*)(CAudio*, int, CVector))GetAddress(0xA22C0))(this, nSound, location); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CAudioStream.cpp b/src/sampapi/0.3.7-R5-1/CAudioStream.cpp new file mode 100644 index 00000000..e210ceb1 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CAudioStream.cpp @@ -0,0 +1,90 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CAudioStream.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR int& CAudioStream::RefStream() { + return *(int*)GetAddress(0x12E7B4); +} + +SAMPAPI_VAR bool& CAudioStream::RefIsPlaying() { + return *(bool*)GetAddress(0x12E7B8); +} + +SAMPAPI_VAR CVector& CAudioStream::RefPosition() { + return *(CVector*)GetAddress(0x12E7BC); +} + +SAMPAPI_VAR bool& CAudioStream::RefIs3d() { + return *(bool*)GetAddress(0x12E7C8); +} + +SAMPAPI_VAR char* CAudioStream::ArrayIcyUrl() { + return (char*)GetAddress(0x12E6B0); +} + +SAMPAPI_VAR char* CAudioStream::ArrayInfo() { + return (char*)GetAddress(0x12E5A8); +} + +SAMPAPI_VAR char* CAudioStream::ArrayUrl() { + return (char*)GetAddress(0x12E4A0); +} + +SAMPAPI_VAR bool& CAudioStream::RefNeedsToDestroy() { + return *(bool*)GetAddress(0x1027D2); +} + +SAMPAPI_VAR float& CAudioStream::RefRadius() { + return *(float*)GetAddress(0x1027D4); +} + +SAMPAPI_VAR char* CAudioStream::ArrayIcyName() { + return (char*)GetAddress(0x12E398); +} + +SAMPAPI_VAR CAudioStream*& RefAudioStream() { + return *(CAudioStream**)GetAddress(0x26EB8C); +} + +BOOL CAudioStream::Reset() { + return ((BOOL(__thiscall*)(CAudioStream*))GetAddress(0x66480))(this); +} + +BOOL CAudioStream::Stop(bool bWait) { + return ((BOOL(__thiscall*)(CAudioStream*, bool))GetAddress(0x66560))(this, bWait); +} + +BOOL CAudioStream::Play(const char* szUrl, CVector position, float fRadius, bool bIs3d) { + return ((BOOL(__thiscall*)(CAudioStream*, const char*, CVector, float, bool))GetAddress(0x66960))(this, szUrl, position, fRadius, bIs3d); +} + +void CAudioStream::ControlGameRadio() { + ((void(__thiscall*)(CAudioStream*))GetAddress(0x66A80))(this); +} + +void CAudioStream::DrawInfo() { + ((void(__thiscall*)(CAudioStream*))GetAddress(0x66AB0))(this); +} + +void CAudioStream::ConstructInfo() { + ((void(__cdecl*)())GetAddress(0x665C0))(); +} + +void CAudioStream::SyncProc(int handle, int channel, int data, void* user) { + ((void(__stdcall*)(int, int, int, void*))GetAddress(0x666F0))(handle, channel, data, user); +} + +void CAudioStream::Process(void* arglist) { + ((void(__cdecl*)(void*))GetAddress(0x66700))(arglist); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CCamera.cpp b/src/sampapi/0.3.7-R5-1/CCamera.cpp new file mode 100644 index 00000000..693ac54e --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CCamera.cpp @@ -0,0 +1,74 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CCamera.h" + +SAMPAPI_BEGIN_V037R5_1 + +CCamera::CCamera() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9FF60))(this); +} + +CCamera::~CCamera() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9FF70))(this); +} + +void CCamera::Fade(BOOL bIn) { + ((void(__thiscall*)(CCamera*, BOOL))GetAddress(0x9D440))(this, bIn); +} + +void CCamera::GetMatrix(CMatrix* pMatrix) { + ((void(__thiscall*)(CCamera*, CMatrix*))GetAddress(0x9D460))(this, pMatrix); +} + +void CCamera::SetMatrix(CMatrix matrix) { + ((void(__thiscall*)(CCamera*, CMatrix))GetAddress(0x9D4E0))(this, matrix); +} + +void CCamera::TakeControl(::CEntity* pTarget, short nModeToGoTo, short nTypeOfSwitch) { + ((void(__thiscall*)(CCamera*, ::CEntity*, short, short))GetAddress(0x9D570))(this, pTarget, nModeToGoTo, nTypeOfSwitch); +} + +void CCamera::SetMoveVector(CVector* pCamera, CVector* pPosition, int nTime, bool bSmoothTransmition) { + ((void(__thiscall*)(CCamera*, CVector*, CVector*, int, bool))GetAddress(0x9D590))(this, pCamera, pPosition, nTime, bSmoothTransmition); +} + +void CCamera::SetTrackVector(CVector* pPointAt, CVector* pTransverseTo, int nTime, bool bSmooth) { + ((void(__thiscall*)(CCamera*, CVector*, CVector*, int, bool))GetAddress(0x9D600))(this, pPointAt, pTransverseTo, nTime, bSmooth); +} + +void CCamera::Attach(CEntity* pOwner) { + ((void(__thiscall*)(CCamera*, CEntity*))GetAddress(0x9D660))(this, pOwner); +} + +void CCamera::SetToOwner() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9D6B0))(this); +} + +float CCamera::GetDistanceToPoint(CVector* pPoint) { + return ((float(__thiscall*)(CCamera*, CVector*))GetAddress(0x9D700))(this, pPoint); +} + +void CCamera::Restore() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9D740))(this); +} + +void CCamera::Set(CVector position, CVector rotation) { + ((void(__thiscall*)(CCamera*, CVector, CVector))GetAddress(0x9D780))(this, position, rotation); +} + +void CCamera::PointAt(CVector point, int nSwitchStyle) { + ((void(__thiscall*)(CCamera*, CVector, int))GetAddress(0x9D7E0))(this, point, nSwitchStyle); +} + +void CCamera::Detach() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9D830))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CChat.cpp b/src/sampapi/0.3.7-R5-1/CChat.cpp new file mode 100644 index 00000000..4b2c9a63 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CChat.cpp @@ -0,0 +1,110 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CChat.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CChat*& RefChat() { + return *(CChat**)GetAddress(0x26EB80); +} + +CChat::CChat(IDirect3DDevice9* pDevice, CFonts* pFontRenderer, const char* szLogPath) { + ((void(__thiscall*)(CChat*, IDirect3DDevice9*, CFonts*, const char*))GetAddress(0x68380))(this, pDevice, pFontRenderer, szLogPath); +} + +void CChat::RecalcFontSize() { + ((void(__thiscall*)(CChat*))GetAddress(0x67120))(this); +} + +void CChat::OnLostDevice() { + ((void(__thiscall*)(CChat*))GetAddress(0x671A0))(this); +} + +void CChat::UpdateScrollbar() { + ((void(__thiscall*)(CChat*))GetAddress(0x67200))(this); +} + +void CChat::SetPageSize(int nValue) { + ((void(__thiscall*)(CChat*, int))GetAddress(0x672A0))(this, nValue); +} + +void CChat::PageUp() { + ((void(__thiscall*)(CChat*))GetAddress(0x672D0))(this); +} + +void CChat::PageDown() { + ((void(__thiscall*)(CChat*))GetAddress(0x67330))(this); +} + +void CChat::ScrollToBottom() { + ((void(__thiscall*)(CChat*))GetAddress(0x67390))(this); +} + +void CChat::Scroll(int nDelta) { + ((void(__thiscall*)(CChat*, int))GetAddress(0x673C0))(this, nDelta); +} + +void CChat::FilterOutInvalidChars(char* szString) { + ((void(__thiscall*)(CChat*, char*))GetAddress(0x67420))(this, szString); +} + +void CChat::PushBack() { + ((void(__thiscall*)(CChat*))GetAddress(0x67450))(this); +} + +void CChat::RenderEntry(const char* szText, CRect rect, D3DCOLOR color) { + ((void(__thiscall*)(CChat*, const char*, CRect, D3DCOLOR))GetAddress(0x67470))(this, szText, rect, color); +} + +void CChat::Log(int nType, const char* szText, const char* szPrefix) { + ((void(__thiscall*)(CChat*, int, const char*, const char*))GetAddress(0x677D0))(this, nType, szText, szPrefix); +} + +void CChat::ResetDialogControls(CDXUTDialog* pGameUi) { + ((void(__thiscall*)(CChat*, CDXUTDialog*))GetAddress(0x678A0))(this, pGameUi); +} + +void CChat::Render() { + ((void(__thiscall*)(CChat*))GetAddress(0x67940))(this); +} + +void CChat::AddEntry(int nType, const char* szText, const char* szPrefix, D3DCOLOR textColor, D3DCOLOR prefixColor) { + ((void(__thiscall*)(CChat*, int, const char*, const char*, D3DCOLOR, D3DCOLOR))GetAddress(0x67BE0))(this, nType, szText, szPrefix, textColor, prefixColor); +} + +void CChat::Draw() { + ((void(__thiscall*)(CChat*))GetAddress(0x67E00))(this); +} + +void CChat::RenderToSurface() { + ((void(__thiscall*)(CChat*))GetAddress(0x67ED0))(this); +} + +void CChat::AddChatMessage(const char* szPrefix, D3DCOLOR prefixColor, const char* szText) { + ((void(__thiscall*)(CChat*, const char*, D3DCOLOR, const char*))GetAddress(0x68020))(this, szPrefix, prefixColor, szText); +} + +void CChat::AddMessage(D3DCOLOR color, const char* szText) { + ((void(__thiscall*)(CChat*, D3DCOLOR, const char*))GetAddress(0x68170))(this, color, szText); +} + +void CChat::OnResetDevice() { + ((void(__thiscall*)(CChat*))GetAddress(0x681D0))(this); +} + +void CChat::SwitchMode() { + ((void(__thiscall*)(CChat*))GetAddress(0x612C0))(this); +} + +int CChat::GetMode() { + return ((int(__thiscall*)(CChat*))GetAddress(0x612B0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CChatBubble.cpp b/src/sampapi/0.3.7-R5-1/CChatBubble.cpp new file mode 100644 index 00000000..10b9c364 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CChatBubble.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CChatBubble.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CChatBubble*& RefChatBubble() { + return *(CChatBubble**)GetAddress(0x26EB78); +} + +CChatBubble::CChatBubble() { + ((void(__thiscall*)(CChatBubble*))GetAddress(0x66DE0))(this); +} + +void CChatBubble::Add(ID nPlayer, const char* szText, D3DCOLOR color, float fDrawDistance, int lifeSpan) { + ((void(__thiscall*)(CChatBubble*, ID, const char*, D3DCOLOR, float, int))GetAddress(0x66E10))(this, nPlayer, szText, color, fDrawDistance, lifeSpan); +} + +void CChatBubble::Draw() { + ((void(__thiscall*)(CChatBubble*))GetAddress(0x66ED0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CConfig.cpp b/src/sampapi/0.3.7-R5-1/CConfig.cpp new file mode 100644 index 00000000..eb53542d --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CConfig.cpp @@ -0,0 +1,94 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CConfig.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CConfig*& RefConfig() { + return *(CConfig**)GetAddress(0x26EB7C); +} + +CConfig::CConfig(const char* szFile) { + ((void(__thiscall*)(CConfig*, const char*))GetAddress(0x663E0))(this, szFile); +} + +CConfig::~CConfig() { + ((void(__thiscall*)(CConfig*))GetAddress(0x65C00))(this); +} + +void CConfig::FindFirstFree() { + ((void(__thiscall*)(CConfig*))GetAddress(0x65C40))(this); +} + +int CConfig::GetIndex(const char* szEntry) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65C90))(this, szEntry); +} + +bool CConfig::DoesExist(const char* szEntry) { + return ((bool(__thiscall*)(CConfig*, const char*))GetAddress(0x65D30))(this, szEntry); +} + +int CConfig::CreateEntry(const char* szName) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65D50))(this, szName); +} + +int CConfig::GetIntValue(const char* szEntry) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65E10))(this, szEntry); +} + +const char* CConfig::GetStringValue(const char* szEntry) { + return ((const char*(__thiscall*)(CConfig*, const char*))GetAddress(0x65E40))(this, szEntry); +} + +float CConfig::GetFloatValue(const char* szEntry) { + return ((float(__thiscall*)(CConfig*, const char*))GetAddress(0x65E70))(this, szEntry); +} + +BOOL CConfig::Free(const char* szEntry) { + return ((BOOL(__thiscall*)(CConfig*, const char*))GetAddress(0x65EA0))(this, szEntry); +} + +int CConfig::GetValueType(const char* szEntry) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65F00))(this, szEntry); +} + +CConfig::ConfigEntry* CConfig::GetEntry(int nIndex) { + return ((ConfigEntry * (__thiscall*)(CConfig*, int)) GetAddress(0x65F30))(this, nIndex); +} + +int CConfig::GetType(const char* szString) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65F60))(this, szString); +} + +BOOL CConfig::Save() { + return ((BOOL(__thiscall*)(CConfig*))GetAddress(0x65FD0))(this); +} + +BOOL CConfig::WriteIntValue(const char* szEntry, int nValue, BOOL bReadOnly) { + return ((BOOL(__thiscall*)(CConfig*, const char*, int, BOOL))GetAddress(0x66080))(this, szEntry, nValue, bReadOnly); +} + +BOOL CConfig::WriteStringValue(const char* szEntry, const char* szValue, BOOL bReadOnly) { + return ((BOOL(__thiscall*)(CConfig*, const char*, const char*, BOOL))GetAddress(0x660E0))(this, szEntry, szValue, bReadOnly); +} + +BOOL CConfig::WriteFloatValue(const char* szEntry, float fValue, BOOL bReadOnly) { + return ((BOOL(__thiscall*)(CConfig*, const char*, float, BOOL))GetAddress(0x66180))(this, szEntry, fValue, bReadOnly); +} + +void CConfig::Write(const char* szEntry, char* szBuffer) { + ((void(__thiscall*)(CConfig*, const char*, char*))GetAddress(0x661E0))(this, szEntry, szBuffer); +} + +BOOL CConfig::Load() { + return ((BOOL(__thiscall*)(CConfig*))GetAddress(0x66270))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CDeathWindow.cpp b/src/sampapi/0.3.7-R5-1/CDeathWindow.cpp new file mode 100644 index 00000000..195874c9 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CDeathWindow.cpp @@ -0,0 +1,66 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CDeathWindow.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CDeathWindow*& RefDeathWindow() { + return *(CDeathWindow**)GetAddress(0x26EB88); +} + +CDeathWindow::CDeathWindow(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CDeathWindow*, IDirect3DDevice9*))GetAddress(0x6A650))(this, pDevice); +} + +CDeathWindow::~CDeathWindow() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x69B40))(this); +} + +void CDeathWindow::InitializeAuxFonts() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x69BB0))(this); +} + +void CDeathWindow::PushBack() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x69C20))(this); +} + +void CDeathWindow::DrawText(const char* szText, CRect rect, D3DCOLOR color, int nFormat) { + ((void(__thiscall*)(CDeathWindow*, const char*, CRect, D3DCOLOR, int))GetAddress(0x69C40))(this, szText, rect, color, nFormat); +} + +void CDeathWindow::DrawWeaponSprite(const char* szSpriteId, CRect rect, D3DCOLOR color) { + ((void(__thiscall*)(CDeathWindow*, const char*, CRect, D3DCOLOR))GetAddress(0x69D40))(this, szSpriteId, rect, color); +} + +void CDeathWindow::GetWeaponSpriteRectSize(void* pPoint) { + ((void(__thiscall*)(CDeathWindow*, void*))GetAddress(0x69DD0))(this, pPoint); +} + +const char* CDeathWindow::GetWeaponSpriteId(char nWeapon) { + return ((const char*(__thiscall*)(CDeathWindow*, char))GetAddress(0x69E50))(this, nWeapon); +} + +void CDeathWindow::ResetFonts() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x6A150))(this); +} + +void CDeathWindow::Draw() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x6A2E0))(this); +} + +void CDeathWindow::AddEntry(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon) { + ((void(__thiscall*)(CDeathWindow*, const char*, const char*, D3DCOLOR, D3DCOLOR, char))GetAddress(0x6A5D0))(this, szKiller, szVictim, killerColor, victimColor, nWeapon); +} + +void CDeathWindow::AddMessage(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon) { + ((void(__thiscall*)(CDeathWindow*, const char*, const char*, D3DCOLOR, D3DCOLOR, char))GetAddress(0x6A6B0))(this, szKiller, szVictim, killerColor, victimColor, nWeapon); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CDialog.cpp b/src/sampapi/0.3.7-R5-1/CDialog.cpp new file mode 100644 index 00000000..e5c7f5c1 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CDialog.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CDialog.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CDialog*& RefDialog() { + return *(CDialog**)GetAddress(0x26EB50); +} + +CDialog::CDialog(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CDialog*, IDirect3DDevice9*))GetAddress(0x6F480))(this, pDevice); +} + +void CDialog::GetScreenRect(CRect* pRect) { + ((void(__thiscall*)(CDialog*, CRect*))GetAddress(0x6F6B0))(this, pRect); +} + +int CDialog::GetTextScreenLength(const char* szString) { + return ((int(__thiscall*)(CDialog*, const char*))GetAddress(0x6F6E0))(this, szString); +} + +void CDialog::Hide() { + ((void(__thiscall*)(CDialog*))GetAddress(0x6F860))(this); +} + +void CDialog::ResetDialogControls(CDXUTDialog* pDialog) { + ((void(__thiscall*)(CDialog*, CDXUTDialog*))GetAddress(0x6FA20))(this, pDialog); +} + +void CDialog::Show(int nId, int nType, const char* szCaption, const char* szText, const char* szLeftButton, const char* szRightButton, BOOL bServerside) { + ((void(__thiscall*)(CDialog*, int, int, const char*, const char*, const char*, const char*, BOOL))GetAddress(0x6FFB0))(this, nId, nType, szCaption, szText, szLeftButton, szRightButton, bServerside); +} + +void CDialog::Close(char nProcessButton) { + ((void(__thiscall*)(CDialog*, char))GetAddress(0x70630))(this, nProcessButton); +} + +void CDialog::Draw() { + ((void(__thiscall*)(CDialog*))GetAddress(0x6F890))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CEntity.cpp b/src/sampapi/0.3.7-R5-1/CEntity.cpp new file mode 100644 index 00000000..873a5650 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CEntity.cpp @@ -0,0 +1,133 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CEntity.h" + +SAMPAPI_BEGIN_V037R5_1 + +CEntity::CEntity() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9C260))(this); +} + +CEntity::~CEntity() { +} + +void CEntity::GetMatrix(CMatrix* pMatrix) { + ((void(__thiscall*)(CEntity*, CMatrix*))GetAddress(0x9EB10))(this, pMatrix); +} + +void CEntity::SetMatrix(CMatrix matrix) { + ((void(__thiscall*)(CEntity*, CMatrix))GetAddress(0x9EBC0))(this, matrix); +} + +void CEntity::GetSpeed(CVector* pVec) { + ((void(__thiscall*)(CEntity*, CVector*))GetAddress(0x9ECE0))(this, pVec); +} + +void CEntity::SetSpeed(CVector vec) { + ((void(__thiscall*)(CEntity*, CVector))GetAddress(0x9ED10))(this, vec); +} + +void CEntity::GetTurnSpeed(CVector* pVec) { + ((void(__thiscall*)(CEntity*, CVector*))GetAddress(0x9EE30))(this, pVec); +} + +void CEntity::SetTurnSpeed(CVector vec) { + ((void(__thiscall*)(CEntity*, CVector))GetAddress(0x9EE60))(this, vec); +} + +void CEntity::ApplyTurnSpeed() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9EE90))(this); +} + +float CEntity::GetDistanceFromCentreOfMassToBaseOfModel() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9EEB0))(this); +} + +void CEntity::GetBoundCentre(CVector* pVec) { + ((void(__thiscall*)(CEntity*, CVector*))GetAddress(0x9EEF0))(this, pVec); +} + +void CEntity::SetModelIndex(int nModel) { + ((void(__thiscall*)(CEntity*, int))GetAddress(0x9EF50))(this, nModel); +} + +int CEntity::GetModelIndex() { + return ((int(__thiscall*)(CEntity*))GetAddress(0x9F030))(this); +} + +void CEntity::Teleport(CVector position) { + ((void(__thiscall*)(CEntity*, CVector))GetAddress(0x9F040))(this, position); +} + +float CEntity::GetDistanceToLocalPlayer() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9F0C0))(this); +} + +float CEntity::GetDistanceToCamera() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9F190))(this); +} + +float CEntity::GetDistanceToPoint(CVector position) { + return ((float(__thiscall*)(CEntity*, CVector))GetAddress(0x9F2B0))(this, position); +} + +BOOL CEntity::DoesExist() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9F3D0))(this); +} + +BOOL CEntity::EnforceWorldBoundries(float fPX, float fZX, float fPY, float fNY) { + return ((BOOL(__thiscall*)(CEntity*, float, float, float, float))GetAddress(0x9F420))(this, fPX, fZX, fPY, fNY); +} + +BOOL CEntity::HasExceededWorldBoundries(float fPX, float fZX, float fPY, float fNY) { + return ((BOOL(__thiscall*)(CEntity*, float, float, float, float))GetAddress(0x9F5C0))(this, fPX, fZX, fPY, fNY); +} + +void CEntity::GetEulerInverted(float* x, float* y, float* z) { + ((void(__thiscall*)(CEntity*, float*, float*, float*))GetAddress(0x9F8F0))(this, x, y, z); +} + +BOOL CEntity::IsIgnored() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9FCE0))(this); +} + +BOOL CEntity::IsStationary() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9FDE0))(this); +} + +BOOL CEntity::GetCollisionFlag() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9F660))(this); +} + +void CEntity::SetCollisionFlag(BOOL bEnable) { + ((void(__thiscall*)(CEntity*, BOOL))GetAddress(0x9F630))(this, bEnable); +} + +RwObject* CEntity::GetRwObject() { + return ((::RwObject * (__thiscall*)(CEntity*)) GetAddress(0x9FA60))(this); +} + +void CEntity::DeleteRwObject() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9FBB0))(this); +} + +void CEntity::UpdateRwFrame() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9EC80))(this); +} + +float CEntity::GetDistanceToLocalPlayerNoHeight() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9F1F0))(this); +} + +void CEntity::SetCollisionProcessed(BOOL bProcessed) { + ((void(__thiscall*)(CEntity*, BOOL))GetAddress(0x9F680))(this, bProcessed); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CFont.cpp b/src/sampapi/0.3.7-R5-1/CFont.cpp new file mode 100644 index 00000000..cbeb256c --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CFont.cpp @@ -0,0 +1,23 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CFont.h" + +SAMPAPI_BEGIN_V037R5_1 + +CFont::CFont() { + ((void(__thiscall*)(CFont*))GetAddress(0x6B8D0))(this); +} + +CFont::CFont(ID3DXFont* pFont) { + *(void**)this = (void*)GetAddress(0xEA410); + m_pFont = pFont; +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CFonts.cpp b/src/sampapi/0.3.7-R5-1/CFonts.cpp new file mode 100644 index 00000000..1d5e88aa --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CFonts.cpp @@ -0,0 +1,58 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CFonts.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CFonts*& RefFontRenderer() { + return *(CFonts**)GetAddress(0x26EB9C); +} + +CFonts::CFonts(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CFonts*, IDirect3DDevice9*))GetAddress(0x6BAF0))(this, pDevice); +} + +CFonts::~CFonts() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6B100))(this); +} + +void CFonts::OnLostDevice() { + ((void(__thiscall*)(CFonts*))GetAddress(0x70EA0))(this); +} + +void CFonts::OnResetDevice() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6B1C0))(this); +} + +void CFonts::GetTextScreenSize(void* pSize, const char* szText, int nFormat) { + ((void(__thiscall*)(CFonts*, void*, const char*, int))GetAddress(0x6B200))(this, pSize, szText, nFormat); +} + +void CFonts::GetLittleTextScreenSize(void* pSize, const char* szText, int nFormat) { + ((void(__thiscall*)(CFonts*, void*, const char*, int))GetAddress(0x6B2B0))(this, pSize, szText, nFormat); +} + +void CFonts::DrawText(ID3DXSprite* pSprite, const char* szText, CRect rect, D3DCOLOR color, BOOL bShadow) { + ((void(__thiscall*)(CFonts*, ID3DXSprite*, const char*, CRect, D3DCOLOR, BOOL))GetAddress(0x6B360))(this, pSprite, szText, rect, color, bShadow); +} + +void CFonts::DrawLittleText(ID3DXSprite* pSprite, const char* szText, CRect rect, int nFormat, D3DCOLOR color, BOOL bShadow) { + ((void(__thiscall*)(CFonts*, ID3DXSprite*, const char*, CRect, int, D3DCOLOR, BOOL))GetAddress(0x6B4E0))(this, pSprite, szText, rect, nFormat, color, bShadow); +} + +void CFonts::DrawLicensePlateText(const char* szText, CRect rect, D3DCOLOR color) { + ((void(__thiscall*)(CFonts*, const char*, CRect, D3DCOLOR))GetAddress(0x6B650))(this, szText, rect, color); +} + +void CFonts::Reset() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6B8E0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CGame.cpp b/src/sampapi/0.3.7-R5-1/CGame.cpp new file mode 100644 index 00000000..89a89ecf --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CGame.cpp @@ -0,0 +1,314 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CGame.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR char*& CGame::RefGameTextMessage() { + return *(char**)GetAddress(0x150334); +} + +SAMPAPI_VAR BOOL* CGame::ArrayUsedPlayerSlots() { + return (BOOL*)GetAddress(0x150340); +} + +SAMPAPI_VAR CGame*& RefGame() { + return *(CGame**)GetAddress(0x26EBAC); +} + +CGame::CGame() { + ((void(__thiscall*)(CGame*))GetAddress(0x9FF80))(this); +} + +CPed* CGame::GetPlayerPed() { + return ((CPed * (__thiscall*)(CGame*)) GetAddress(0x1010))(this); +} + +float CGame::FindGroundZ(CVector vPoint) { + return ((float(__thiscall*)(CGame*, CVector))GetAddress(0xA0400))(this, vPoint); +} + +void CGame::SetCursorMode(int nMode, BOOL bImmediatelyHideCursor) { + ((void(__thiscall*)(CGame*, int, BOOL))GetAddress(0xA06F0))(this, nMode, bImmediatelyHideCursor); +} + +void CGame::InitGame() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0890))(this); +} + +void CGame::StartGame() { + ((void(__thiscall*)(CGame*))GetAddress(0xA08E0))(this); +} + +BOOL CGame::IsMenuVisible() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0xA0920))(this); +} + +BOOL CGame::IsStarted() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0xA0930))(this); +} + +void CGame::RequestModel(int nModel, int nLoadingStream) { + ((void(__thiscall*)(CGame*, int, int))GetAddress(0xA0940))(this, nModel, nLoadingStream); +} + +void CGame::LoadRequestedModels() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0960))(this); +} + +BOOL CGame::IsModelAvailable(int nModel) { + return ((BOOL(__thiscall*)(CGame*, int))GetAddress(0xA0970))(this, nModel); +} + +void CGame::ReleaseModel(int nModel, bool bGameFunc) { + ((void(__thiscall*)(CGame*, int, bool))GetAddress(0xA09A0))(this, nModel, bGameFunc); +} + +void CGame::SetWorldTime(char nHour, char nMinute) { + ((void(__thiscall*)(CGame*, char, char))GetAddress(0xA0AB0))(this, nHour, nMinute); +} + +void CGame::GetWorldTime(char* nHour, char* nMinute) { + ((void(__thiscall*)(CGame*, char*, char*))GetAddress(0xA0AE0))(this, nHour, nMinute); +} + +void CGame::LetTimeGo(bool bLet) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA0B00))(this, bLet); +} + +void CGame::SetWorldWeather(char nWeather) { + ((void(__thiscall*)(CGame*, char))GetAddress(0xA0B40))(this, nWeather); +} + +void CGame::SetFrameLimiter(int nValue) { + ((void(__thiscall*)(CGame*, int))GetAddress(0xA0BB0))(this, nValue); +} + +void CGame::SetMaxStats() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0BE0))(this); +} + +void CGame::DisableTrainTraffic() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0C10))(this); +} + +void CGame::RefreshRenderer(float fX, float fY) { + ((void(__thiscall*)(CGame*, float, float))GetAddress(0xA0C20))(this, fX, fY); +} + +void CGame::RequestAnimation(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA0C50))(this, szFile); +} + +BOOL CGame::IsAnimationLoaded(const char* szFile) { + return ((BOOL(__thiscall*)(CGame*, const char*))GetAddress(0xA0C70))(this, szFile); +} + +void CGame::ReleaseAnimation(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA0C90))(this, szFile); +} + +void CGame::DisplayGameText(const char* szText, int nTime, int nSize) { + ((void(__thiscall*)(CGame*, const char*, int, int))GetAddress(0xA0CE0))(this, szText, nTime, nSize); +} + +void CGame::DeleteRacingCheckpoint() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0D60))(this); +} + +GTAREF CGame::CreateMarker(int nIcon, CVector vPosition, int nColor, int nType) { + return ((GTAREF(__thiscall*)(CGame*, int, CVector, int, int))GetAddress(0xA0D90))(this, nIcon, vPosition, nColor, nType); +} + +void CGame::DeleteMarker(GTAREF handle) { + ((void(__thiscall*)(CGame*, GTAREF))GetAddress(0xA0EC0))(this, handle); +} + +char CGame::GetCurrentInterior() { + return ((char(__thiscall*)(CGame*))GetAddress(0xA0EE0))(this); +} + +void CGame::UpdateFarClippingPlane() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0F00))(this); +} + +void CGame::IncreasePlayerMoney(int nInc) { + ((void(__thiscall*)(CGame*, int))GetAddress(0xA0F70))(this, nInc); +} + +int CGame::GetPlayerMoney() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA0F90))(this); +} + +const char* CGame::GetWeaponName(int nWeapon) { + return ((const char*(__thiscall*)(CGame*, int))GetAddress(0xA0FA0))(this, nWeapon); +} + +void CGame::CreatePickup(int nModel, int nType, CVector vPosition, GTAREF* handle) { + ((void(__thiscall*)(CGame*, int, int, CVector, GTAREF*))GetAddress(0xA11F0))(this, nModel, nType, vPosition, handle); +} + +GTAREF CGame::CreateWeaponPickup(int nModel, int nAmmo, CVector vPosition) { + return ((GTAREF(__thiscall*)(CGame*, int, int, CVector))GetAddress(0xA12D0))(this, nModel, nAmmo, vPosition); +} + +IDirect3DDevice9* CGame::GetDevice() { + return ((IDirect3DDevice9 * (__thiscall*)(CGame*)) GetAddress(0xA1370))(this); +} + +void CGame::Restart() { + ((void(__thiscall*)(CGame*))GetAddress(0xA13B0))(this); +} + +CWeaponInfo* CGame::GetWeaponInfo(int nWeapon, int nSkill) { + return ((CWeaponInfo * (__thiscall*)(CGame*, int, int)) GetAddress(0xA13E0))(this, nWeapon, nSkill); +} + +void CGame::SetWorldGravity(float fValue) { + ((void(__thiscall*)(CGame*, float))GetAddress(0xA1400))(this, fValue); +} + +void CGame::SetWantedLevel(char nLevel) { + ((void(__thiscall*)(CGame*, char))GetAddress(0xA1420))(this, nLevel); +} + +void CGame::SetNumberOfIntroTextLinesThisFrame(unsigned short nValue) { + ((void(__thiscall*)(CGame*, unsigned short))GetAddress(0xA1430))(this, nValue); +} + +void CGame::DrawGangZone(float* pPos, char nColor) { + ((void(__thiscall*)(CGame*, float*, char))GetAddress(0xA1440))(this, pPos, nColor); +} + +void CGame::EnableZoneDisplaying(bool bEnable) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA1520))(this, bEnable); +} + +void CGame::EnableStuntBonus(bool bEnable) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA1540))(this, bEnable); +} + +void CGame::LoadScene(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA15B0))(this, szFile); +} + +int CGame::GetUsedMemory() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA15D0))(this); +} + +int CGame::GetStreamingMemory() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA15E0))(this); +} + +void CGame::SetRequiredVehicleModels(unsigned char* pModelCount) { + ((void(__thiscall*)(CGame*, unsigned char*))GetAddress(0xA1610))(this, pModelCount); +} + +int CGame::GetTimer() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA1770))(this); +} + +void CGame::LoadAnimationsAndModels() { + ((void(__thiscall*)(CGame*))GetAddress(0xA18A0))(this); +} + +void CGame::LoadCollisionFile(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA1B80))(this, szFile); +} + +void CGame::LoadCullZone(const char* szLine) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA1BA0))(this, szLine); +} + +BOOL CGame::UsingGamepad() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0xA1BC0))(this); +} + +void CGame::DisableAutoAiming() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1BD0))(this); +} + +void CGame::EnableHUD(BOOL bEnable) { + ((void(__thiscall*)(CGame*, BOOL))GetAddress(0xA1DB0))(this, bEnable); +} + +void CGame::SetCheckpoint(CVector* pPos, CVector* pSize) { + ((void(__thiscall*)(CGame*, CVector*, CVector*))GetAddress(0xA1DE0))(this, pPos, pSize); +} + +void CGame::CreateRacingCheckpoint() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1EA0))(this); +} + +void CGame::ProcessCheckpoints() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1F20))(this); +} + +void CGame::ResetMoney() { + ((void(__thiscall*)(CGame*))GetAddress(0xA20C0))(this); +} + +void CGame::SetRacingCheckpoint(int nType, CVector* pCurrentPos, CVector* pNextPos, float fSize) { + ((void(__thiscall*)(CGame*, int, CVector*, CVector*, float))GetAddress(0xA2100))(this, nType, pCurrentPos, pNextPos, fSize); +} + +void CGame::EnableRadar(BOOL bEnable) { + ((void(__thiscall*)(CGame*, BOOL))GetAddress(0xA0CC0))(this, bEnable); +} + +void* CGame::GetWindowHandle() { + return ((void*(__thiscall*)(CGame*))GetAddress(0x2D10))(this); +} + +CAudio* CGame::GetAudio() { + return ((CAudio * (__thiscall*)(CGame*)) GetAddress(0x2D20))(this); +} + +CCamera* CGame::GetCamera() { + return ((CCamera * (__thiscall*)(CGame*)) GetAddress(0x2D30))(this); +} + +BOOL CGame::DoesHeadMoves() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0x2D40))(this); +} + +void CGame::EnableClock(bool bEnable) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA1460))(this, bEnable); +} + +void CGame::Sleep(int elapsed, int fpsLimit) { + ((void(__thiscall*)(CGame*, int, int))GetAddress(0xA0090))(this, elapsed, fpsLimit); +} + +CPed* CGame::CreatePed(int nModel, CVector position, float fRotation, int a6, int a7) { + return ((CPed * (__thiscall*)(CGame*, int, CVector, float, int, int)) GetAddress(0xA0110))(this, nModel, position, fRotation, a6, a7); +} + +BOOL CGame::RemovePed(CPed* pPed) { + return ((BOOL(__thiscall*)(CGame*, CPed*))GetAddress(0xA0210))(this, pPed); +} + +CVehicle* CGame::CreateVehicle(int nModel, CVector position, float fRotation, BOOL bHasSiren) { + return ((CVehicle * (__thiscall*)(CGame*, int, CVector, float, BOOL)) GetAddress(0xA0250))(this, nModel, position, fRotation, bHasSiren); +} + +CObject* CGame::CreateObject(int nModel, CVector position, CVector rotation, float fDrawDistance, char a11, char a12) { + return ((CObject * (__thiscall*)(CGame*, int, CVector, CVector, float, char, char)) GetAddress(0xA0330))(this, nModel, position, rotation, fDrawDistance, a11, a12); +} + +void CGame::ProcessInputEnabling() { + ((void(__thiscall*)(CGame*))GetAddress(0xA05D0))(this); +} + +void CGame::ProcessFrameLimiter() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1C10))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CGangZonePool.cpp b/src/sampapi/0.3.7-R5-1/CGangZonePool.cpp new file mode 100644 index 00000000..c765ff3b --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CGangZonePool.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CGangZonePool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CGangZonePool::CGangZonePool() { + ((void(__thiscall*)(CGangZonePool*))GetAddress(0x2120))(this); +} + +CGangZonePool::~CGangZonePool() { + ((void(__thiscall*)(CGangZonePool*))GetAddress(0x2150))(this); +} + +void CGangZonePool::Create(ID nId, float left, float top, float right, float bottom, D3DCOLOR color) { + ((void(__thiscall*)(CGangZonePool*, ID, float, float, float, float, D3DCOLOR))GetAddress(0x2180))(this, nId, left, top, right, bottom, color); +} + +void CGangZonePool::StartFlashing(ID nId, D3DCOLOR color) { + ((void(__thiscall*)(CGangZonePool*, ID, D3DCOLOR))GetAddress(0x2200))(this, nId, color); +} + +void CGangZonePool::StopFlashing(ID nId) { + ((void(__thiscall*)(CGangZonePool*, ID))GetAddress(0x2220))(this, nId); +} + +void CGangZonePool::Delete(ID nId) { + ((void(__thiscall*)(CGangZonePool*, ID))GetAddress(0x2240))(this, nId); +} + +void CGangZonePool::Draw() { + ((void(__thiscall*)(CGangZonePool*))GetAddress(0x2270))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CHelpDialog.cpp b/src/sampapi/0.3.7-R5-1/CHelpDialog.cpp new file mode 100644 index 00000000..00d24a83 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CHelpDialog.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CHelpDialog.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CHelpDialog*& RefHelpDialog() { + return *(CHelpDialog**)GetAddress(0x26EB74); +} + +CHelpDialog::CHelpDialog(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CHelpDialog*, IDirect3DDevice9*))GetAddress(0x83D0))(this, pDevice); +} + +void CHelpDialog::Show() { + ((void(__thiscall*)(CHelpDialog*))GetAddress(0x6BB30))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CHttpClient.cpp b/src/sampapi/0.3.7-R5-1/CHttpClient.cpp new file mode 100644 index 00000000..d6a31439 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CHttpClient.cpp @@ -0,0 +1,58 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CHttpClient.h" + +SAMPAPI_BEGIN_V037R5_1 + +CHttpClient::CHttpClient() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x22E0))(this); +} + +CHttpClient::~CHttpClient() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2340))(this); +} + +bool CHttpClient::GetHeaderValue(const char* szHeaderName, char* szBuffer, int nBufferLen) { + return ((bool(__thiscall*)(CHttpClient*, const char*, char*, int))GetAddress(0x23B0))(this, szHeaderName, szBuffer, nBufferLen); +} + +void CHttpClient::InitializeRequest(int nType, const char* szUrl, const char* szPostData, const char* szReferer) { + ((void(__thiscall*)(CHttpClient*, int, const char*, const char*, const char*))GetAddress(0x24b0))(this, nType, szUrl, szPostData, szReferer); +} + +void CHttpClient::HandleEntity() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2680))(this); +} + +bool CHttpClient::Connect(const char* szHost, int nPort) { + return ((bool(__thiscall*)(CHttpClient*, const char*, int))GetAddress(0x29A0))(this, szHost, nPort); +} + +void CHttpClient::Process() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2A60))(this); +} + +void CHttpClient::Disconnect() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2440))(this); +} + +CHttpClient::ErrorCode CHttpClient::ProcessUrl(int nType, const char* szUrl, const char* szPostData, const char* szReferer) { + return ((ErrorCode(__thiscall*)(CHttpClient*, int, const char*, const char*, const char*))GetAddress(0x2C40))(this, nType, szUrl, szPostData, szReferer); +} + +bool CHttpClient::Send(const char* szBuffer) { + return ((bool(__thiscall*)(CHttpClient*, const char*))GetAddress(0x2450))(this, szBuffer); +} + +int CHttpClient::Receive(char* szBuffer, int nBufferLen) { + return ((int(__thiscall*)(CHttpClient*, char*, int))GetAddress(0x2490))(this, szBuffer, nBufferLen); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CInput.cpp b/src/sampapi/0.3.7-R5-1/CInput.cpp new file mode 100644 index 00000000..a4407f41 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CInput.cpp @@ -0,0 +1,78 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CInput.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CInput*& RefInputBox() { + return *(CInput**)GetAddress(0x26EB84); +} + +CInput::CInput(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CInput*, IDirect3DDevice9*))GetAddress(0x693D0))(this, pDevice); +} + +void CInput::GetRect(CRect* pRect) { + ((void(__thiscall*)(CInput*, CRect*))GetAddress(0x69440))(this, pRect); +} + +void CInput::Open() { + ((void(__thiscall*)(CInput*))GetAddress(0x69480))(this); +} + +void CInput::Close() { + ((void(__thiscall*)(CInput*))GetAddress(0x69580))(this); +} + +void CInput::AddRecall(const char* szString) { + ((void(__thiscall*)(CInput*, const char*))GetAddress(0x695D0))(this, szString); +} + +void CInput::RecallUp() { + ((void(__thiscall*)(CInput*))GetAddress(0x69630))(this); +} + +void CInput::RecallDown() { + ((void(__thiscall*)(CInput*))GetAddress(0x696A0))(this); +} + +void CInput::EnableCursor() { + ((void(__thiscall*)(CInput*))GetAddress(0x696F0))(this); +} + +CMDPROC CInput::GetCommandHandler(const char* szName) { + return ((CMDPROC(__thiscall*)(CInput*, const char*))GetAddress(0x69710))(this, szName); +} + +void CInput::SetDefaultCommand(CMDPROC proc) { + ((void(__thiscall*)(CInput*, CMDPROC))GetAddress(0x69760))(this, proc); +} + +void CInput::AddCommand(const char* szName, CMDPROC handler) { + ((void(__thiscall*)(CInput*, const char*, CMDPROC))GetAddress(0x69770))(this, szName, handler); +} + +BOOL CInput::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CInput*, int, int, int))GetAddress(0x697D0))(this, uMsg, wParam, lParam); +} + +void CInput::ResetDialogControls(CDXUTDialog* pGameUi) { + ((void(__thiscall*)(CInput*, CDXUTDialog*))GetAddress(0x69840))(this, pGameUi); +} + +void CInput::Send(const char* szString) { + ((void(__thiscall*)(CInput*, const char*))GetAddress(0x69900))(this, szString); +} + +void CInput::ProcessInput() { + ((void(__thiscall*)(CInput*))GetAddress(0x699D0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CLabel.cpp b/src/sampapi/0.3.7-R5-1/CLabel.cpp new file mode 100644 index 00000000..95d64792 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CLabel.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CLabel.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CLabel*& RefLabel() { + return *(CLabel**)GetAddress(0x26EB5C); +} + +CLabel::CLabel(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CLabel*, IDirect3DDevice9*))GetAddress(0x6BBB0))(this, pDevice); +} + +CLabel::~CLabel() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6BBD0))(this); +} + +void CLabel::OnLostDevice() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6BBF0))(this); +} + +void CLabel::OnResetDevice() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6BC00))(this); +} + +BOOL CLabel::HasNoObstacles(CVector position) { + return ((BOOL(__thiscall*)(CLabel*, CVector))GetAddress(0x6BC10))(this, position); +} + +void CLabel::Begin() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6BC70))(this); +} + +void CLabel::End() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6BC80))(this); +} + +void CLabel::Draw(CVector* pPosition, const char* szText, D3DCOLOR color, BOOL bShadow, bool bNoObstacles) { + ((void(__thiscall*)(CLabel*, CVector*, const char*, D3DCOLOR, BOOL, bool))GetAddress(0x6BC90))(this, pPosition, szText, color, bShadow, bNoObstacles); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CLabelPool.cpp b/src/sampapi/0.3.7-R5-1/CLabelPool.cpp new file mode 100644 index 00000000..097ef569 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CLabelPool.cpp @@ -0,0 +1,34 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CLabelPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CLabelPool::CLabelPool() { + ((void(__thiscall*)(CLabelPool*))GetAddress(0x1190))(this); +} + +CLabelPool::~CLabelPool() { + ((void(__thiscall*)(CLabelPool*))GetAddress(0x15E0))(this); +} + +void CLabelPool::Create(ID nId, const char* szText, D3DCOLOR color, CVector position, float fDrawDistance, bool bBehindWalls, ID nAttachedToPlayer, ID nAttachedToVehicle) { + ((void(__thiscall*)(CLabelPool*, ID, const char*, D3DCOLOR, CVector, float, bool, ID, ID))GetAddress(0x11D0))(this, nId, szText, color, position, fDrawDistance, bBehindWalls, nAttachedToPlayer, nAttachedToVehicle); +} + +BOOL CLabelPool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CLabelPool*, ID))GetAddress(0x12E0))(this, nId); +} + +void CLabelPool::Draw() { + ((void(__thiscall*)(CLabelPool*))GetAddress(0x1350))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CLicensePlate.cpp b/src/sampapi/0.3.7-R5-1/CLicensePlate.cpp new file mode 100644 index 00000000..e6ff95ef --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CLicensePlate.cpp @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CLicensePlate.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CLicensePlate*& RefLicensePlateManager() { + return *(CLicensePlate**)GetAddress(0x26EBA0); +} + +CLicensePlate::CLicensePlate(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CLicensePlate*, IDirect3DDevice9*))GetAddress(0x6D9B0))(this, pDevice); +} + +CLicensePlate::~CLicensePlate() { + ((void(__thiscall*)(CLicensePlate*))GetAddress(0x6D9E0))(this); +} + +void CLicensePlate::OnLostDevice() { + ((void(__thiscall*)(CLicensePlate*))GetAddress(0x6D7B0))(this); +} + +void CLicensePlate::OnResetDevice() { + ((void(__thiscall*)(CLicensePlate*))GetAddress(0x6D800))(this); +} + +IDirect3DTexture9* CLicensePlate::Create(const char* szText) { + return ((IDirect3DTexture9 * (__thiscall*)(CLicensePlate*, const char*)) GetAddress(0x6D880))(this, szText); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CLocalPlayer.cpp b/src/sampapi/0.3.7-R5-1/CLocalPlayer.cpp new file mode 100644 index 00000000..c14f0678 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CLocalPlayer.cpp @@ -0,0 +1,250 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CLocalPlayer.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR int& CLocalPlayer::RefIncarSendrate() { + return *(int*)GetAddress(0xFE0AC); +} + +SAMPAPI_VAR int& CLocalPlayer::RefOnfootSendrate() { + return *(int*)GetAddress(0xFE0A8); +} + +SAMPAPI_VAR int& CLocalPlayer::RefFiringSendrate() { + return *(int*)GetAddress(0xFE0B0); +} + +SAMPAPI_VAR int& CLocalPlayer::RefSendMultiplier() { + return *(int*)GetAddress(0xFE0B4); +} + +CLocalPlayer::CLocalPlayer() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4C50))(this); +} + +CPed* CLocalPlayer::GetPed() { + return ((CPed * (__thiscall*)(CLocalPlayer*)) GetAddress(0x2D70))(this); +} + +void CLocalPlayer::ResetData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x2E90))(this); +} + +void CLocalPlayer::ProcessHead() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x2FA0))(this); +} + +void CLocalPlayer::SetSpecialAction(char nId) { + ((void(__thiscall*)(CLocalPlayer*, char))GetAddress(0x30F0))(this, nId); +} + +char CLocalPlayer::GetSpecialAction() { + return ((char(__thiscall*)(CLocalPlayer*))GetAddress(0x3410))(this); +} + +void CLocalPlayer::UpdateSurfing() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3570))(this); +} + +void CLocalPlayer::SetSurfing(CVehicle* pVehicle, BOOL bStuck) { + ((void(__thiscall*)(CLocalPlayer*, CVehicle*, BOOL))GetAddress(0x3710))(this, pVehicle, bStuck); +} + +void CLocalPlayer::ProcessSurfing() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3730))(this); +} + +BOOL CLocalPlayer::NeedsToUpdate(const void* pOld, const void* pNew, unsigned int nLen) { + return ((BOOL(__thiscall*)(CLocalPlayer*, const void*, const void*, unsigned int))GetAddress(0x3A60))(this, pOld, pNew, nLen); +} + +int CLocalPlayer::GetIncarSendRate() { + return ((int(__thiscall*)(CLocalPlayer*))GetAddress(0x3AB0))(this); +} + +int CLocalPlayer::GetOnfootSendRate() { + return ((int(__thiscall*)(CLocalPlayer*))GetAddress(0x3AF0))(this); +} + +int CLocalPlayer::GetUnoccupiedSendRate() { + return ((int(__thiscall*)(CLocalPlayer*))GetAddress(0x3B30))(this); +} + +void CLocalPlayer::SetSpawnInfo(const SpawnInfo* pInfo) { + ((void(__thiscall*)(CLocalPlayer*, const SpawnInfo*))GetAddress(0x3BE0))(this, pInfo); +} + +BOOL CLocalPlayer::Spawn() { + return ((BOOL(__thiscall*)(CLocalPlayer*))GetAddress(0x3C20))(this); +} + +void CLocalPlayer::SetColor(D3DCOLOR color) { + ((void(__thiscall*)(CLocalPlayer*, D3DCOLOR))GetAddress(0x3ED0))(this, color); +} + +D3DCOLOR CLocalPlayer::GetColorAsRGBA() { + return ((D3DCOLOR(__thiscall*)(CLocalPlayer*))GetAddress(0x3F00))(this); +} + +D3DCOLOR CLocalPlayer::GetColorAsARGB() { + return ((D3DCOLOR(__thiscall*)(CLocalPlayer*))GetAddress(0x3F20))(this); +} + +void CLocalPlayer::ProcessOnfootWorldBounds() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3F50))(this); +} + +void CLocalPlayer::ProcessIncarWorldBounds() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3FC0))(this); +} + +void CLocalPlayer::RequestSpawn() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4060))(this); +} + +void CLocalPlayer::PrepareForClassSelection() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4080))(this); +} + +void CLocalPlayer::PrepareForClassSelection_Outcome(BOOL bOutcome) { + ((void(__thiscall*)(CLocalPlayer*, BOOL))GetAddress(0x40E0))(this, bOutcome); +} + +void CLocalPlayer::EnableSpectating(BOOL bEnable) { + ((void(__thiscall*)(CLocalPlayer*, BOOL))GetAddress(0x41C0))(this, bEnable); +} + +void CLocalPlayer::SpectateForVehicle(ID nId) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x4230))(this, nId); +} + +void CLocalPlayer::SpectateForPlayer(ID nId) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x4280))(this, nId); +} + +BOOL CLocalPlayer::NeedsToSendOnfootData(short controllerState, short sLeftStickX, short sLeftStickY) { + return ((BOOL(__thiscall*)(CLocalPlayer*, short, short, short))GetAddress(0x4300))(this, controllerState, sLeftStickX, sLeftStickY); +} + +BOOL CLocalPlayer::NeedsToSendIncarData(short controllerState, short sLeftStickX, short sLeftStickY) { + return ((BOOL(__thiscall*)(CLocalPlayer*, short, short, short))GetAddress(0x4340))(this, controllerState, sLeftStickX, sLeftStickY); +} + +bool CLocalPlayer::DefineCameraTarget(CameraTarget* pInfo) { + return ((bool(__thiscall*)(CLocalPlayer*, CameraTarget*))GetAddress(0x4440))(this, pInfo); +} + +void CLocalPlayer::UpdateCameraTarget() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4700))(this); +} + +void CLocalPlayer::DrawCameraTargetLabel() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4850))(this); +} + +void CLocalPlayer::SendUnoccupiedData(ID nVehicle, char arg4) { + ((void(__thiscall*)(CLocalPlayer*, ID, char))GetAddress(0x4D30))(this, nVehicle, arg4); +} + +void CLocalPlayer::SendOnfootData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4F00))(this); +} + +void CLocalPlayer::SendAimData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5210))(this); +} + +void CLocalPlayer::SendTrailerData(ID nTrailer) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x53D0))(this, nTrailer); +} + +void CLocalPlayer::SendPassengerData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5590))(this); +} + +void CLocalPlayer::WastedNotification() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5810))(this); +} + +void CLocalPlayer::RequestClass(int nId) { + ((void(__thiscall*)(CLocalPlayer*, int))GetAddress(0x58D0))(this, nId); +} + +void CLocalPlayer::ChangeInterior(char nId) { + ((void(__thiscall*)(CLocalPlayer*, char))GetAddress(0x5970))(this, nId); +} + +void CLocalPlayer::Chat(const char* szText) { + ((void(__thiscall*)(CLocalPlayer*, const char*))GetAddress(0x5A10))(this, szText); +} + +void CLocalPlayer::EnterVehicle(int nVehicle, BOOL bPassenger) { + ((void(__thiscall*)(CLocalPlayer*, int, BOOL))GetAddress(0x5AD0))(this, nVehicle, bPassenger); +} + +void CLocalPlayer::ExitVehicle(int nVehicle) { + ((void(__thiscall*)(CLocalPlayer*, int))GetAddress(0x5BF0))(this, nVehicle); +} + +void CLocalPlayer::SendStats() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5D00))(this); +} + +void CLocalPlayer::UpdateVehicleDamage(ID nVehicle) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x5DE0))(this, nVehicle); +} + +void CLocalPlayer::NextClass() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5FF0))(this); +} + +void CLocalPlayer::PrevClass() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6080))(this); +} + +void CLocalPlayer::ProcessClassSelection() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6100))(this); +} + +void CLocalPlayer::UpdateWeapons() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6290))(this); +} + +void CLocalPlayer::ProcessSpectating() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6540))(this); +} + +void CLocalPlayer::SendTakeDamage(int nId, float fDamage, int nWeapon, int nBodyPart) { + ((void(__thiscall*)(CLocalPlayer*, int, float, int, int))GetAddress(0x68A0))(this, nId, fDamage, nWeapon, nBodyPart); +} + +void CLocalPlayer::SendGiveDamage(int nId, float fDamage, int nWeapon, int nBodyPart) { + ((void(__thiscall*)(CLocalPlayer*, int, float, int, int))GetAddress(0x69B0))(this, nId, fDamage, nWeapon, nBodyPart); +} + +bool CLocalPlayer::ProcessUnoccupiedSync(ID nVehicle, CVehicle* pVehicle) { + return ((bool(__thiscall*)(CLocalPlayer*, ID, CVehicle*))GetAddress(0x6E00))(this, nVehicle, pVehicle); +} + +void CLocalPlayer::EnterVehicleAsPassenger() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6FE0))(this); +} + +void CLocalPlayer::SendIncarData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x7080))(this); +} + +void CLocalPlayer::Process() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x74C0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CMakeLists.txt b/src/sampapi/0.3.7-R5-1/CMakeLists.txt new file mode 100644 index 00000000..abdf728a --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CMakeLists.txt @@ -0,0 +1,59 @@ +target_sources(sampapi + PRIVATE + AimStuff.cpp + CActor.cpp + CActorPool.cpp + CAudio.cpp + CAudioStream.cpp + CCamera.cpp + CChat.cpp + CChatBubble.cpp + CConfig.cpp + CDeathWindow.cpp + CDialog.cpp + CEntity.cpp + CFont.cpp + CFonts.cpp + CGame.cpp + CGangZonePool.cpp + CHelpDialog.cpp + CHttpClient.cpp + CInput.cpp + CLabel.cpp + CLabelPool.cpp + CLicensePlate.cpp + CLocalPlayer.cpp + CMenu.cpp + CMenuPool.cpp + CNetGame.cpp + CNetStats.cpp + CObject.cpp + CObjectMaterialText.cpp + CObjectPool.cpp + CObjectSelection.cpp + Commands.cpp + CPed.cpp + CPickupPool.cpp + CPlayerInfo.cpp + CPlayerPool.cpp + CPlayerTags.cpp + CRemotePlayer.cpp + CScoreboard.cpp + CSpawnScreen.cpp + CSrvNetStats.cpp + CTextDraw.cpp + CTextDrawPool.cpp + CTextDrawSelection.cpp + CVehicle.cpp + CVehiclePool.cpp + DebugScript.cpp + Exception.cpp + GUI.cpp + KeyStuff.cpp + Scripting.cpp + Settings.cpp + CObjectMaterialText.cpp + InputHandler.cpp + CObjectEdit.cpp + RPCHandlers.cpp +) diff --git a/src/sampapi/0.3.7-R5-1/CMenu.cpp b/src/sampapi/0.3.7-R5-1/CMenu.cpp new file mode 100644 index 00000000..78d73d38 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CMenu.cpp @@ -0,0 +1,54 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CMenu.h" + +SAMPAPI_BEGIN_V037R5_1 + +CMenu::CMenu(float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const Interaction* pInteraction) { + ((void(__thiscall*)(CMenu*, float, float, char, float, float, const Interaction*))GetAddress(0xA7420))(this, fX, fY, nColumns, fFirstColumnWidth, fSecondColumnWidth, pInteraction); +} + +void CMenu::SetTitle(const char* szText) { + ((void(__thiscall*)(CMenu*, const char*))GetAddress(0xA7530))(this, szText); +} + +void CMenu::AddItem(NUMBER nColumn, NUMBER nRow, const char* szText) { + ((void(__thiscall*)(CMenu*, NUMBER, NUMBER, const char*))GetAddress(0xA7580))(this, nColumn, nRow, szText); +} + +void CMenu::SetColumnTitle(NUMBER nColumn, const char* szText) { + ((void(__thiscall*)(CMenu*, NUMBER, const char*))GetAddress(0xA7600))(this, nColumn, szText); +} + +void CMenu::Hide() { + ((void(__thiscall*)(CMenu*))GetAddress(0xA7670))(this); +} + +char* CMenu::GetItem(NUMBER nColumn, NUMBER nRow) { + return ((char*(__thiscall*)(CMenu*, NUMBER, NUMBER))GetAddress(0xA7690))(this, nColumn, nRow); +} + +char* CMenu::GetTitle() { + return ((char*(__thiscall*)(CMenu*))GetAddress(0xA76B0))(this); +} + +char* CMenu::MS(NUMBER nColumn, NUMBER nRow) { + return ((char*(__thiscall*)(CMenu*, NUMBER, NUMBER))GetAddress(0xA76E0))(this, nColumn, nRow); +} + +char CMenu::GetActiveRow() { + return ((char(__thiscall*)(CMenu*))GetAddress(0xA7710))(this); +} + +void CMenu::Show() { + ((void(__thiscall*)(CMenu*))GetAddress(0xA7740))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CMenuPool.cpp b/src/sampapi/0.3.7-R5-1/CMenuPool.cpp new file mode 100644 index 00000000..3badcb57 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CMenuPool.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CMenuPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CMenuPool::CMenuPool() { + ((void(__thiscall*)(CMenuPool*))GetAddress(0x7E60))(this); +} + +CMenuPool::~CMenuPool() { + ((void(__thiscall*)(CMenuPool*))GetAddress(0x81C0))(this); +} + +CMenu* CMenuPool::Create(NUMBER nId, float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const CMenu::Interaction* pInteraction) { + return ((CMenu * (__thiscall*)(CMenuPool*, NUMBER, float, float, char, float, float, const CMenu::Interaction*)) GetAddress(0x7EB0))(this, nId, fX, fY, nColumns, fFirstColumnWidth, fSecondColumnWidth, pInteraction); +} + +BOOL CMenuPool::Delete(NUMBER nId) { + return ((BOOL(__thiscall*)(CMenuPool*, NUMBER))GetAddress(0x7F70))(this, nId); +} + +void CMenuPool::Show(NUMBER nId) { + ((void(__thiscall*)(CMenuPool*, NUMBER))GetAddress(0x7FC0))(this, nId); +} + +void CMenuPool::Hide(NUMBER nId) { + ((void(__thiscall*)(CMenuPool*, NUMBER))GetAddress(0x8020))(this, nId); +} + +char* CMenuPool::GetTextPointer(const char* szName) { + return ((char*(__thiscall*)(CMenuPool*, const char*))GetAddress(0x8060))(this, szName); +} + +void CMenuPool::Process() { + ((void(__thiscall*)(CMenuPool*))GetAddress(0x8200))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CNetGame.cpp b/src/sampapi/0.3.7-R5-1/CNetGame.cpp new file mode 100644 index 00000000..3e2707f5 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CNetGame.cpp @@ -0,0 +1,238 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CNetGame.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CNetGame*& RefNetGame() { + return *(CNetGame**)GetAddress(0x26EB94); +} + +SAMPAPI_VAR TICK& CNetGame::RefLastPlayersUpdateRequest() { + return *(TICK*)GetAddress(0x118A10); +} + +CNetGame::CNetGame(const char* szHostAddress, int nPort, const char* szNick, const char* szPass) { + ((void(__thiscall*)(CNetGame*, const char*, int, const char*, const char*))GetAddress(0xB930))(this, szHostAddress, nPort, szNick, szPass); +} + +CNetGame::~CNetGame() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9880))(this); +} + +CPickupPool* CNetGame::GetPickupPool() { + return ((CPickupPool * (__thiscall*)(CNetGame*)) GetAddress(0x84E0))(this); +} + +CMenuPool* CNetGame::GetMenuPool() { + return ((CMenuPool * (__thiscall*)(CNetGame*)) GetAddress(0x84F0))(this); +} + +void CNetGame::SetState(int nValue) { + ((void(__thiscall*)(CNetGame*, int))GetAddress(0x8500))(this, nValue); +} + +void CNetGame::InitializePools() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8540))(this); +} + +void CNetGame::InitialNotification() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8760))(this); +} + +void CNetGame::InitializeGameLogic() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x88F0))(this); +} + +void CNetGame::Connect() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8940))(this); +} + +void CNetGame::SpawnScreen() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x89B0))(this); +} + +void CNetGame::Packet_RSAPublicKeyMismatch(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8D50))(this, pPacket); +} + +void CNetGame::Packet_ConnectionBanned(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8D70))(this, pPacket); +} + +void CNetGame::Packet_ConnectionRequestAcepted(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8D90))(this, pPacket); +} + +void CNetGame::Packet_NoFreeIncomingConnections(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8DB0))(this, pPacket); +} + +void CNetGame::Packet_DisconnectionNotification(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8DE0))(this, pPacket); +} + +void CNetGame::Packet_InvalidPassword(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8E20))(this, pPacket); +} + +void CNetGame::Packet_ConnectionAttemptFailed(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8E60))(this, pPacket); +} + +void CNetGame::UpdatePlayers() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8F10))(this); +} + +void CNetGame::DeleteMarker(NUMBER nIndex) { + ((void(__thiscall*)(CNetGame*, NUMBER))GetAddress(0x8FB0))(this, nIndex); +} + +void CNetGame::ResetPlayerPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8FE0))(this); +} + +void CNetGame::ResetVehiclePool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9080))(this); +} + +void CNetGame::ResetTextDrawPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9110))(this); +} + +void CNetGame::ResetObjectPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x91B0))(this); +} + +void CNetGame::ResetGangZonePool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9250))(this); +} + +void CNetGame::ResetPickupPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x92F0))(this); +} + +void CNetGame::ResetMenuPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9350))(this); +} + +void CNetGame::ResetLabelPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9490))(this); +} + +void CNetGame::ResetActorPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x93F0))(this); +} + +void CNetGame::Packet_UnoccupiedSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9A40))(this, pPacket); +} + +void CNetGame::Packet_BulletSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9B40))(this, pPacket); +} + +void CNetGame::Packet_AimSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9C40))(this, pPacket); +} + +void CNetGame::Packet_PassengerSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9D30))(this, pPacket); +} + +void CNetGame::Packet_TrailerSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9E20))(this, pPacket); +} + +void CNetGame::Packet_MarkersSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9F10))(this, pPacket); +} + +void CNetGame::Packet_AuthKey(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xA100))(this, pPacket); +} + +void CNetGame::ResetMarkers() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xA2C0))(this); +} + +void CNetGame::CreateMarker(NUMBER nIndex, CVector position, char nIcon, int nColor, int nType) { + ((void(__thiscall*)(CNetGame*, NUMBER, CVector, char, int, int))GetAddress(0xA300))(this, nIndex, position, nIcon, nColor, nType); +} + +void CNetGame::ResetPools() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xA4F0))(this); +} + +void CNetGame::ShutdownForRestart() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xA540))(this); +} + +void CNetGame::Packet_PlayerSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xA740))(this, pPacket); +} + +void CNetGame::Packet_VehicleSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xAA10))(this, pPacket); +} + +void CNetGame::Packet_ConnectionLost(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xACF0))(this, pPacket); +} + +void CNetGame::Packet_ConnectionSucceeded(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xAD80))(this, pPacket); +} + +void CNetGame::UpdateNetwork() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xB260))(this); +} + +void CNetGame::Process() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xB5B0))(this); +} + +void CNetGame::ProcessGameStuff() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8B20))(this); +} + +CPlayerPool* CNetGame::GetPlayerPool() { + return ((CPlayerPool * (__thiscall*)(CNetGame*)) GetAddress(0x1170))(this); +} + +CObjectPool* CNetGame::GetObjectPool() { + return ((CObjectPool * (__thiscall*)(CNetGame*)) GetAddress(0x2E10))(this); +} + +CActorPool* CNetGame::GetActorPool() { + return ((CActorPool * (__thiscall*)(CNetGame*)) GetAddress(0x2E20))(this); +} + +int CNetGame::GetState() { + return ((int(__thiscall*)(CNetGame*))GetAddress(0x2E30))(this); +} + +BOOL CNetGame::LanMode() { + return ((BOOL(__thiscall*)(CNetGame*))GetAddress(0x2E40))(this); +} + +CVehiclePool* CNetGame::GetVehiclePool() { + return ((CVehiclePool * (__thiscall*)(CNetGame*)) GetAddress(0x1180))(this); +} + +RakClientInterface* CNetGame::GetRakClient() { + return ((RakClientInterface * (__thiscall*)(CNetGame*)) GetAddress(0xBBC0))(this); +} + +__int64 CNetGame::GetCounter() { + return ((__int64(__thiscall*)(CNetGame*))GetAddress(0x88E0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CNetStats.cpp b/src/sampapi/0.3.7-R5-1/CNetStats.cpp new file mode 100644 index 00000000..cdf55574 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CNetStats.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CNetStats.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CNetStats*& RefNetStats() { + return *(CNetStats**)GetAddress(0x26EB6C); +} + +CNetStats::CNetStats(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CNetStats*, IDirect3DDevice9*))GetAddress(0x60D40))(this, pDevice); +} + +void CNetStats::Draw() { + ((void(__thiscall*)(CNetStats*))GetAddress(0x60D70))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CObject.cpp b/src/sampapi/0.3.7-R5-1/CObject.cpp new file mode 100644 index 00000000..d32182de --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CObject.cpp @@ -0,0 +1,89 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CObject.h" + +SAMPAPI_BEGIN_V037R5_1 + +CObject::CObject(int nModel, CVector position, CVector rotation, float fDrawDistance, int a10, char a11, char a12) { + ((void(__thiscall*)(CObject*, int, CVector, CVector, float, int, char, char))GetAddress(0xA9110))(this, nModel, position, rotation, fDrawDistance, a10, a11, a12); +} + +CObject::~CObject() { +} + +float CObject::GetDistance(const CMatrix* pMatrix) { + return ((float(__thiscall*)(CObject*, const CMatrix*))GetAddress(0xA7FC0))(this, pMatrix); +} + +void CObject::Stop() { + ((void(__thiscall*)(CObject*))GetAddress(0xA8030))(this); +} + +void CObject::SetRotation(const CVector* pVector) { + ((void(__thiscall*)(CObject*, const CVector*))GetAddress(0xA80A0))(this, pVector); +} + +void CObject::SetAttachedToVehicle(ID nId, const CVector* pOffset, const CVector* pRotation) { + ((void(__thiscall*)(CObject*, ID, const CVector*, const CVector*))GetAddress(0xA8110))(this, nId, pOffset, pRotation); +} + +void CObject::SetAttachedToObject(ID nId, const CVector* pOffset, const CVector* pRotation, char a5) { + ((void(__thiscall*)(CObject*, ID, const CVector*, const CVector*, char))GetAddress(0xA81A0))(this, nId, pOffset, pRotation, a5); +} + +void CObject::AttachToVehicle(CVehicle* pVehicle) { + ((void(__thiscall*)(CObject*, CVehicle*))GetAddress(0xA8240))(this, pVehicle); +} + +void CObject::AttachToObject(CObject* pObject) { + ((void(__thiscall*)(CObject*, CObject*))GetAddress(0xA82C0))(this, pObject); +} + +void CObject::Rotate(CVector vector) { + ((void(__thiscall*)(CObject*, CVector))GetAddress(0xA83C0))(this, vector); +} + +BOOL CObject::AttachedToMovingEntity() { + return ((BOOL(__thiscall*)(CObject*))GetAddress(0xA84C0))(this); +} + +void CObject::SetMaterial(int nModel, int nIndex, const char* szTxd, const char* szTexture, D3DCOLOR color) { + ((void(__thiscall*)(CObject*, int, int, const char*, const char*, D3DCOLOR))GetAddress(0xA8530))(this, nModel, nIndex, szTxd, szTexture, color); +} + +void CObject::SetMaterialText(int nIndex, const char* szText, char nMaterialSize, const char* szFont, char nFontSize, bool bBold, D3DCOLOR fontColor, D3DCOLOR backgroundColor, char align) { + ((void(__thiscall*)(CObject*, int, const char*, char, const char*, char, bool, D3DCOLOR, D3DCOLOR, char))GetAddress(0xA86B0))(this, nIndex, szText, nMaterialSize, szFont, nFontSize, bBold, fontColor, backgroundColor, align); +} + +bool CObject::GetMaterialSize(int nSize, int* x, int* y) { + return ((bool(__thiscall*)(CObject*, int, int*, int*))GetAddress(0xA8C80))(this, nSize, x, y); +} + +void CObject::Render() { + ((void(__thiscall*)(CObject*))GetAddress(0xA8F60))(this); +} + +void CObject::Process(float fElapsedTime) { + ((void(__thiscall*)(CObject*, float))GetAddress(0xA9650))(this, fElapsedTime); +} + +void CObject::ConstructMaterialText() { + ((void(__thiscall*)(CObject*))GetAddress(0xA9EE0))(this); +} + +void CObject::Draw() { + ((void(__thiscall*)(CObject*))GetAddress(0xA9F90))(this); +} + +void CObject::ShutdownMaterialText() { + ((void(__thiscall*)(CObject*))GetAddress(0xA8ED0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CObjectEdit.cpp b/src/sampapi/0.3.7-R5-1/CObjectEdit.cpp new file mode 100644 index 00000000..b97d5a46 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CObjectEdit.cpp @@ -0,0 +1,86 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CObjectEdit.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CObjectEdit*& RefObjectEdit() { + return *(CObjectEdit**)GetAddress(0x26EB60); +} + +CObjectEdit::CObjectEdit(IDirect3DDevice9* RefDevice) { + ((CObjectEdit*(__thiscall*)(CObjectEdit*, IDirect3DDevice9*))GetAddress(0x71B60))(this, RefDevice); +} + +float CObjectEdit::WorldToScreen(CVector* in, float* out) { + return ((float(__thiscall*)(CObjectEdit*, CVector*, float*))GetAddress(0x71C20))(this, in, out); +} + +int CObjectEdit::RenderAxes(CMatrix* a2, float linesize) { + return ((int(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x71D20))(this, a2, linesize); +} + +const char* CObjectEdit::GetRenderChar(BOOL for_big_font) { + return ((const char*(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x71FA0))(this, for_big_font); +} + +void CObjectEdit::TryChangeProcessType() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x720A0))(this); +} + +void CObjectEdit::SetEditMode(ObjectEditMode mode) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditMode))GetAddress(0x721F0))(this, mode); +} + +void CObjectEdit::ResetMousePos() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x723C0))(this); +} + +void CObjectEdit::EnterEditObject(ID object_id, BOOL player_object) { + ((void(__thiscall*)(CObjectEdit*, ID, BOOL))GetAddress(0x72420))(this, object_id, player_object); +} + +void CObjectEdit::SendEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x728B0))(this, response); +} + +void CObjectEdit::SendAttachedEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x72AC0))(this, response); +} + +void CObjectEdit::Disable(BOOL result) { + ((void(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x72BC0))(this, result); +} + +BOOL CObjectEdit::RenderControlsForObject(CMatrix* object_matrix, float linesize) { + return ((BOOL(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x72C30))(this, object_matrix, linesize); +} + +void CObjectEdit::ApplyChanges(ObjectEditProcessType type, float diff) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditProcessType, float))GetAddress(0x73460))(this, type, diff); +} + +void CObjectEdit::ProcessMouseMove() { + ((float(__thiscall*)(CObjectEdit*))GetAddress(0x73480))(this); +} + +BOOL CObjectEdit::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CObjectEdit*, int, int, int))GetAddress(0x73550))(this, uMsg, wParam, lParam); +} + +void CObjectEdit::Render() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x73780))(this); +} + +const char* CObjectEdit::GetMaxSizeChar() { + return ((const char*(__cdecl*)())GetAddress(0x71F90))(); +} + +SAMPAPI_END \ No newline at end of file diff --git a/src/sampapi/0.3.7-R5-1/CObjectMaterialText.cpp b/src/sampapi/0.3.7-R5-1/CObjectMaterialText.cpp new file mode 100644 index 00000000..7fcc66d0 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CObjectMaterialText.cpp @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CObjectMaterialText.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CObjectMaterialText*& RefObjectMaterialTextManager() { + return *(CObjectMaterialText**)GetAddress(0x26EBA4); +} + +CObjectMaterialText::CObjectMaterialText(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CObjectMaterialText*, IDirect3DDevice9*))GetAddress(0x70880))(this, pDevice); +} + +CObjectMaterialText::~CObjectMaterialText() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x708A0))(this); +} + +void CObjectMaterialText::OnLostDevice() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x70830))(this); +} + +void CObjectMaterialText::OnResetDevice() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x70860))(this); +} + +IDirect3DTexture9* CObjectMaterialText::Create(const char* szText, const char* szFont, char nFontSize, int nBgSizeX, int nBgSizeY, D3DCOLOR fontColor, D3DCOLOR bgColor, bool bBold, char align) { + return ((IDirect3DTexture9 * (__thiscall*)(CObjectMaterialText*, const char*, const char*, char, int, int, D3DCOLOR, D3DCOLOR, bool, char)) GetAddress(0x708B0))(this, szText, szFont, nFontSize, nBgSizeX, nBgSizeY, fontColor, bgColor, bBold, align); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CObjectPool.cpp b/src/sampapi/0.3.7-R5-1/CObjectPool.cpp new file mode 100644 index 00000000..04cf88ed --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CObjectPool.cpp @@ -0,0 +1,70 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CObjectPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CObjectPool::CObjectPool() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12800))(this); +} + +CObjectPool::~CObjectPool() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x13160))(this); +} + +void CObjectPool::UpdateLargestId() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x127A0))(this); +} + +int CObjectPool::GetCount() { + return ((int(__thiscall*)(CObjectPool*))GetAddress(0x12830))(this); +} + +BOOL CObjectPool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CObjectPool*, ID))GetAddress(0x12850))(this, nId); +} + +BOOL CObjectPool::Create(ID nId, int nModel, CVector position, CVector rotation, float fDrawDistance) { + return ((BOOL(__thiscall*)(CObjectPool*, ID, int, CVector, CVector, float))GetAddress(0x128D0))(this, nId, nModel, position, rotation, fDrawDistance); +} + +CObject* CObjectPool::Find(::CObject* pGameObject) { + return ((CObject * (__thiscall*)(CObjectPool*, ::CObject*)) GetAddress(0x129D0))(this, pGameObject); +} + +int CObjectPool::GetId(::CObject* pGameObject) { + return ((int(__thiscall*)(CObjectPool*, ::CObject*))GetAddress(0x12A10))(this, pGameObject); +} + +void CObjectPool::Process() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12A50))(this); +} + +void CObjectPool::ConstructMaterials() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12B10))(this); +} + +void CObjectPool::ShutdownMaterials() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12B50))(this); +} + +void CObjectPool::Draw() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12B90))(this); +} + +void CObjectPool::DrawLast() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12BD0))(this); +} + +CObject* CObjectPool::Get(ID nId) { + return ((CObject * (__thiscall*)(CObjectPool*, ID)) GetAddress(0x2DE0))(this, nId); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CObjectSelection.cpp b/src/sampapi/0.3.7-R5-1/CObjectSelection.cpp new file mode 100644 index 00000000..41ae2c1d --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CObjectSelection.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CObjectSelection.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CObjectSelection*& RefObjectSelection() { + return *(CObjectSelection**)GetAddress(0x26EB64); +} + +CObjectSelection::CObjectSelection() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6DA00))(this); +} + +ID CObjectSelection::DefineObject() { + return ((ID(__thiscall*)(CObjectSelection*))GetAddress(0x6DA10))(this); +} + +void CObjectSelection::DrawLabels() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6DA60))(this); +} + +void CObjectSelection::Enable(BOOL bEnable) { + ((void(__thiscall*)(CObjectSelection*, BOOL))GetAddress(0x6DB80))(this, bEnable); +} + +void CObjectSelection::Draw() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6DC00))(this); +} + +void CObjectSelection::SendNotification() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6DCD0))(this); +} + +BOOL CObjectSelection::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CObjectSelection*, int, int, int))GetAddress(0x6DE40))(this, uMsg, wParam, lParam); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CPed.cpp b/src/sampapi/0.3.7-R5-1/CPed.cpp new file mode 100644 index 00000000..bf2ddf63 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CPed.cpp @@ -0,0 +1,441 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CPed.h" + +SAMPAPI_BEGIN_V037R5_1 + +CPed::CPed() { + ((void(__thiscall*)(CPed*))GetAddress(0xABA70))(this); +} + +CPed::CPed(int nPlayerNumber, int nModel, CVector position, float fRotation) { + ((void(__thiscall*)(CPed*, int, int, CVector, float))GetAddress(0xB0CE0))(this, nPlayerNumber, nModel, position, fRotation); +} + +CPed::~CPed() { +} + +void CPed::ResetPointers() { + ((void(__thiscall*)(CPed*))GetAddress(0xABBB0))(this); +} + +void CPed::SetInitialState() { + ((void(__thiscall*)(CPed*))GetAddress(0xABBD0))(this); +} + +AimStuff::Aim* CPed::GetAim() { + return ((AimStuff::Aim * (__thiscall*)(CPed*)) GetAddress(0xABBF0))(this); +} + +void CPed::SetAim(const AimStuff::Aim* pAim) { + ((void(__thiscall*)(CPed*, const AimStuff::Aim*))GetAddress(0xABC30))(this, pAim); +} + +char CPed::GetCurrentWeapon() { + return ((char(__thiscall*)(CPed*))GetAddress(0xABC50))(this); +} + +GTAREF CPed::GetVehicleRef() { + return ((GTAREF(__thiscall*)(CPed*))GetAddress(0xABC90))(this); +} + +void CPed::DeleteArrow() { + ((void(__thiscall*)(CPed*))GetAddress(0xABCB0))(this); +} + +BOOL CPed::IsOnScreen() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xABCE0))(this); +} + +void CPed::SetImmunities(BOOL BP, BOOL FP, BOOL EP, BOOL CP, BOOL MP) { + ((void(__thiscall*)(CPed*, BOOL, BOOL, BOOL, BOOL, BOOL))GetAddress(0xABD00))(this, BP, FP, EP, CP, MP); +} + +float CPed::GetHealth() { + return ((float(__thiscall*)(CPed*))GetAddress(0xABD50))(this); +} + +void CPed::SetHealth(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xABD70))(this, fValue); +} + +float CPed::GetArmour() { + return ((float(__thiscall*)(CPed*))GetAddress(0xABD90))(this); +} + +void CPed::SetArmour(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xABDB0))(this, fValue); +} + +int CPed::GetFlags() { + return ((int(__thiscall*)(CPed*))GetAddress(0xABDD0))(this); +} + +void CPed::SetFlags(int nValue) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xABDF0))(this, nValue); +} + +BOOL CPed::IsDead() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xABE10))(this); +} + +char CPed::GetState() { + return ((char(__thiscall*)(CPed*))GetAddress(0xABE40))(this); +} + +void CPed::SetState(char nValue) { + ((void(__thiscall*)(CPed*, char))GetAddress(0xABE50))(this, nValue); +} + +float CPed::GetRotation() { + return ((float(__thiscall*)(CPed*))GetAddress(0xABE90))(this); +} + +void CPed::ForceRotation(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xABF10))(this, fValue); +} + +void CPed::SetRotation(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xABF60))(this, fValue); +} + +BOOL CPed::IsPassenger() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xABFC0))(this); +} + +::CVehicle* CPed::GetVehicle() { + return ((::CVehicle * (__thiscall*)(CPed*)) GetAddress(0xAC000))(this); +} + +void CPed::ClearWeapons() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC010))(this); +} + +void CPed::SetArmedWeapon(int nWeapon, bool bGameFunc) { + ((void(__thiscall*)(CPed*, int, bool))GetAddress(0xAC060))(this, nWeapon, bGameFunc); +} + +void CPed::RemoveWeaponWhenEnteringVehicle() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC140))(this); +} + +::CWeapon* CPed::GetCurrentWeaponSlot() { + return ((::CWeapon * (__thiscall*)(CPed*)) GetAddress(0xAC140))(this); +} + +BOOL CPed::CurrentWeaponHasAmmo() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAC160))(this); +} + +float CPed::GetDistanceToEntity(const CEntity* pEntity) { + return ((float(__thiscall*)(CPed*, const CEntity*))GetAddress(0xAC1A0))(this, pEntity); +} + +int CPed::GetVehicleSeatIndex() { + return ((int(__thiscall*)(CPed*))GetAddress(0xAC200))(this); +} + +void CPed::PutIntoVehicle(GTAREF vehicle, int nSeat) { + ((void(__thiscall*)(CPed*, GTAREF, int))GetAddress(0xAC290))(this, vehicle, nSeat); +} + +void CPed::EnterVehicle(GTAREF vehicle, BOOL bAsPassenger) { + ((void(__thiscall*)(CPed*, GTAREF, BOOL))GetAddress(0xAC410))(this, vehicle, bAsPassenger); +} + +void CPed::ExitVehicle() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC4E0))(this); +} + +void CPed::WarpFromVehicle(CVector putAt) { + ((void(__thiscall*)(CPed*, CVector))GetAddress(0xAC570))(this, putAt); +} + +void CPed::SetSpawnInfo(const CVector* pPosition, float fRotation) { + ((void(__thiscall*)(CPed*, const CVector*, float))GetAddress(0xAC750))(this, pPosition, fRotation); +} + +void CPed::SetControllable(BOOL bEnable) { + ((void(__thiscall*)(CPed*, BOOL))GetAddress(0xAC790))(this, bEnable); +} + +char CPed::GetDeathInfo(ID* pKiller) { + return ((char(__thiscall*)(CPed*, ID*))GetAddress(0xAC850))(this, pKiller); +} + +::CEntity* CPed::GetFloor() { + return ((::CEntity * (__thiscall*)(CPed*)) GetAddress(0xACA10))(this); +} + +::CWeaponInfo* CPed::GetCurrentWeaponInfo() { + return ((::CWeaponInfo * (__thiscall*)(CPed*)) GetAddress(0xACAC0))(this); +} + +void CPed::HandsUp() { + ((void(__thiscall*)(CPed*))GetAddress(0xACB10))(this); +} + +BOOL CPed::DoesHandsUp() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xACB60))(this); +} + +void CPed::HoldObject(int nModel) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xACBC0))(this, nModel); +} + +BOOL CPed::EnablePassengerDrivebyMode() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xACF90))(this); +} + +void CPed::Extinguish() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD0F0))(this); +} + +unsigned short CPed::GetCurrentWeaponAmmo() { + return ((unsigned short(__thiscall*)(CPed*))GetAddress(0xAD150))(this); +} + +void CPed::EnableJetpack() { + ((void(__thiscall*)(CPed*))GetAddress(0xACD10))(this); +} + +void CPed::DisableJetpack() { + ((void(__thiscall*)(CPed*))GetAddress(0xACD60))(this); +} + +BOOL CPed::HasJetpack() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xACDC0))(this); +} + +CWeapon* CPed::GetWeaponSlot(int nWeapon) { + return ((::CWeapon * (__thiscall*)(CPed*, int)) GetAddress(0xAD190))(this, nWeapon); +} + +void CPed::SetWalkStyle(const char* szName) { + ((void(__thiscall*)(CPed*, const char*))GetAddress(0xAD1D0))(this, szName); +} + +void CPed::PerformAnimation(const char* szName, const char* szFile, float fFramedelta, int nLoopA, int nLockX, int nLockY, int nLockF, int nTime) { + ((void(__thiscall*)(CPed*, const char*, const char*, float, int, int, int, int, int))GetAddress(0xAD230))(this, szName, szFile, fFramedelta, nLoopA, nLockX, nLockY, nLockF, nTime); +} + +void CPed::LinkToInterior(char nId, BOOL bRefresh) { + ((void(__thiscall*)(CPed*, char, BOOL))GetAddress(0xAD340))(this, nId, bRefresh); +} + +void CPed::DestroyParachute() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD3E0))(this); +} + +BOOL CPed::OpenParachute() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD4D0))(this); +} + +void CPed::ProcessParachuteEvent(const char* szName) { + ((void(__thiscall*)(CPed*, const char*))GetAddress(0xAD620))(this, szName); +} + +BOOL CPed::IsOnGround() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD860))(this); +} + +void CPed::ResetDamageEntity() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD880))(this); +} + +void CPed::RemoveWeaponModel(int nWeapon) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAD8B0))(this, nWeapon); +} + +float CPed::GetAimZ() { + return ((float(__thiscall*)(CPed*))GetAddress(0xAD8F0))(this); +} + +void CPed::SetAimZ(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xAD930))(this, fValue); +} + +::CEntity* CPed::GetContactEntity() { + return ((::CEntity * (__thiscall*)(CPed*)) GetAddress(0xAD9A0))(this); +} + +CVehicle* CPed::GetContactVehicle() { + return ((::CVehicle * (__thiscall*)(CPed*)) GetAddress(0xAD9B0))(this); +} + +int CPed::GetStat() { + return ((int(__thiscall*)(CPed*))GetAddress(0xAD9E0))(this); +} + +BOOL CPed::PerformingCustomAnimation() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xADA00))(this); +} + +void CPed::StartDancing(int nStyle) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xADAD0))(this, nStyle); +} + +void CPed::StopDancing() { + ((void(__thiscall*)(CPed*))GetAddress(0xADB20))(this); +} + +BOOL CPed::DoesDancing() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xADB60))(this); +} + +const char* CPed::GetAnimationForDance(int nMove) { + return ((const char*(__thiscall*)(CPed*, int))GetAddress(0xADB70))(this, nMove); +} + +void CPed::DropStuff() { + ((void(__thiscall*)(CPed*))GetAddress(0xADC00))(this); +} + +int CPed::GetStuff() { + return ((int(__thiscall*)(CPed*))GetAddress(0xADC90))(this); +} + +BOOL CPed::ApplyStuff() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xADCA0))(this); +} + +void CPed::ProcessDrunk() { + ((void(__thiscall*)(CPed*))GetAddress(0xADDF0))(this); +} + +int CPed::GetDrunkLevel() { + return ((int(__thiscall*)(CPed*))GetAddress(0xADFA0))(this); +} + +void CPed::SetDrunkLevel(int nValue) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xADFB0))(this, nValue); +} + +void CPed::ApplyCommandTask(const char* szName, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11) { + ((void(__thiscall*)(CPed*, const char*, int, int, int, int, int, int, int, int, int))GetAddress(0xADFD0))(this, szName, a3, a4, a5, a6, a7, a8, a9, a10, a11); +} + +void CPed::DestroyCommandTask() { + ((void(__thiscall*)(CPed*))GetAddress(0xAE020))(this); +} + +void CPed::EnableCellphone(BOOL bEnable) { + ((void(__thiscall*)(CPed*, BOOL))GetAddress(0xAE070))(this, bEnable); +} + +BOOL CPed::UsingCellphone() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAE0A0))(this); +} + +void CPed::SetFightingStyle(int nStyle) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAE0D0))(this, nStyle); +} + +void CPed::StartUrinating() { + ((void(__thiscall*)(CPed*))GetAddress(0xAE100))(this); +} + +void CPed::StopUrinating() { + ((void(__thiscall*)(CPed*))GetAddress(0xAE1E0))(this); +} + +BOOL CPed::DoesUrinating() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAE260))(this); +} + +const char* CPed::GetLoadedShoppingDataSubsection() { + return ((const char*(__thiscall*)(CPed*))GetAddress(0xAE2E0))(this); +} + +void CPed::LoadShoppingDataSubsection(const char* szName) { + ((void(__thiscall*)(CPed*, const char*))GetAddress(0xAE300))(this, szName); +} + +::CPed* CPed::GetAimedPed() { + return ((::CPed * (__thiscall*)(CPed*)) GetAddress(0xAEF60))(this); +} + +void CPed::SetKeys(short controllerState, short sLeftStickX, short sLeftStickY) { + ((void(__thiscall*)(CPed*, short, short, short))GetAddress(0xAF340))(this, controllerState, sLeftStickX, sLeftStickY); +} + +short CPed::GetKeys(short* pLeftStickX, short* pLeftStickY) { + return ((short(__thiscall*)(CPed*, short*, short*))GetAddress(0xAF5D0))(this, pLeftStickX, pLeftStickY); +} + +void CPed::CreateArrow(int nColor) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAF730))(this, nColor); +} + +void CPed::SetModelIndex(int nModel) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAFF50))(this, nModel); +} + +void CPed::Kill() { + ((void(__thiscall*)(CPed*))GetAddress(0xAFFD0))(this); +} + +void CPed::SetWeaponAmmo(unsigned char nWeapon, unsigned short nAmmo) { + ((void(__thiscall*)(CPed*, unsigned char, unsigned short))GetAddress(0xB0080))(this, nWeapon, nAmmo); +} + +void CPed::ProcessDancing() { + ((void(__thiscall*)(CPed*))GetAddress(0xB00B0))(this); +} + +void CPed::GiveStuff(int nType) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xB02D0))(this, nType); +} + +void CPed::Destroy() { + ((void(__thiscall*)(CPed*))GetAddress(0xB0FA0))(this); +} + +void CPed::SetCameraMode(char nMode) { + ((void(__thiscall*)(CPed*, char))GetAddress(0x14340))(this, nMode); +} + +void CPed::SetCameraExtZoomAndAspectRatio(float fExtZoom, float fAspectRatio) { + ((void(__thiscall*)(CPed*, float, float))GetAddress(0x14360))(this, fExtZoom, fAspectRatio); +} + +BOOL CPed::HasAccessory() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAEE30))(this); +} + +void CPed::DeleteAccessory(int nSlot) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAEE50))(this, nSlot); +} + +BOOL CPed::GetAccessoryState(int nSlot) { + return ((BOOL(__thiscall*)(CPed*, int))GetAddress(0xAEEB0))(this, nSlot); +} + +void CPed::DeleteAllAccessories() { + ((void(__thiscall*)(CPed*))GetAddress(0xB0AB0))(this); +} + +void CPed::AddAccessory(int nSlot, const Accessory* pInfo) { + ((void(__thiscall*)(CPed*, int, const Accessory*))GetAddress(0xB0B10))(this, nSlot, pInfo); +} + +CObject* CPed::GetAccessory(int nSlot) { + return ((CObject * (__thiscall*)(CPed*, int)) GetAddress(0x13680))(this, nSlot); +} + +char CPed::GetCameraMode() { + return ((char(__thiscall*)(CPed*))GetAddress(0x2CD0))(this); +} + +void CPed::GetBonePosition(unsigned int boneId, CVector *outPosition) { + ((void(__thiscall*)(CPed*, unsigned int, CVector*))GetAddress(0xAE480))(this, boneId, outPosition); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CPickupPool.cpp b/src/sampapi/0.3.7-R5-1/CPickupPool.cpp new file mode 100644 index 00000000..7a02e51a --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CPickupPool.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CPickupPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CPickupPool::CPickupPool() { + ((void(__thiscall*)(CPickupPool*))GetAddress(0x84A0))(this); +} + +CPickupPool::~CPickupPool() { + ((void(__thiscall*)(CPickupPool*))GetAddress(0x13410))(this); +} + +void CPickupPool::Create(Pickup* pData, int nId) { + ((void(__thiscall*)(CPickupPool*, Pickup*, int))GetAddress(0x12F20))(this, pData, nId); +} + +void CPickupPool::CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner) { + ((void(__thiscall*)(CPickupPool*, int, CVector, int, ID))GetAddress(0x13180))(this, nModel, position, nAmmo, nExOwner); +} + +void CPickupPool::Delete(int nId) { + ((void(__thiscall*)(CPickupPool*, int))GetAddress(0x13320))(this, nId); +} + +void CPickupPool::DeleteWeapon(ID nExOwner) { + ((void(__thiscall*)(CPickupPool*, ID))GetAddress(0x13380))(this, nExOwner); +} + +int CPickupPool::GetIndex(int nId) { + return ((int(__thiscall*)(CPickupPool*, int))GetAddress(0x133E0))(this, nId); +} + +void CPickupPool::SendNotification(int nId) { + ((void(__thiscall*)(CPickupPool*, int))GetAddress(0x13440))(this, nId); +} + +void CPickupPool::Process() { + ((void(__thiscall*)(CPickupPool*))GetAddress(0x13520))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CPlayerInfo.cpp b/src/sampapi/0.3.7-R5-1/CPlayerInfo.cpp new file mode 100644 index 00000000..dddc1957 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CPlayerInfo.cpp @@ -0,0 +1,22 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CPlayerInfo.h" + +SAMPAPI_BEGIN_V037R5_1 + +CPlayerInfo::CPlayerInfo(const char* szName, BOOL bIsNPC) { + ((void(__thiscall*)(CPlayerInfo*, const char*, BOOL))GetAddress(0x141B0))(this, szName, bIsNPC); +} + +CPlayerInfo::~CPlayerInfo() { + ((void(__thiscall*)(CPlayerInfo*))GetAddress(0x13F60))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CPlayerPool.cpp b/src/sampapi/0.3.7-R5-1/CPlayerPool.cpp new file mode 100644 index 00000000..7329a3d0 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CPlayerPool.cpp @@ -0,0 +1,110 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CPlayerPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CPlayerPool::CPlayerPool() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13FD0))(this); +} + +CPlayerPool::~CPlayerPool() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x14120))(this); +} + +void CPlayerPool::UpdateLargestId() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13750))(this); +} + +void CPlayerPool::Process() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x137C0))(this); +} + +ID CPlayerPool::Find(::CPed* pGamePed) { + return ((ID(__thiscall*)(CPlayerPool*, ::CPed*))GetAddress(0x138C0))(this, pGamePed); +} + +void CPlayerPool::Deactivate() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13B10))(this); +} + +void CPlayerPool::ForceCollision() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13C90))(this); +} + +void CPlayerPool::RestoreCollision() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13D10))(this); +} + +BOOL CPlayerPool::Delete(ID nId, int nReason) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID, int))GetAddress(0x14090))(this, nId, nReason); +} + +BOOL CPlayerPool::Create(ID nId, const char* szName, BOOL bIsNPC) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID, const char*, BOOL))GetAddress(0x14250))(this, nId, szName, bIsNPC); +} + +CRemotePlayer* CPlayerPool::GetPlayer(ID nId) { + return ((CRemotePlayer * (__thiscall*)(CPlayerPool*, ID)) GetAddress(0x10F0))(this, nId); +} + +const char* CPlayerPool::GetLocalPlayerName() { + return ((const char*(__thiscall*)(CPlayerPool*))GetAddress(0xA4E0))(this); +} + +BOOL CPlayerPool::IsDisconnected(ID nId) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID))GetAddress(0x10D0))(this, nId); +} + +BOOL CPlayerPool::IsConnected(ID nId) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID))GetAddress(0x10B0))(this, nId); +} + +void CPlayerPool::SetLocalPlayerName(const char* szName) { + ((void(__thiscall*)(CPlayerPool*, const char*))GetAddress(0xB8A0))(this, szName); +} + +void CPlayerPool::SetAt(ID nId, CPlayerInfo* pObject) { + ((void(__thiscall*)(CPlayerPool*, ID, CPlayerInfo*))GetAddress(0x13730))(this, nId, pObject); +} + +int CPlayerPool::GetScore(ID nId) { + return ((int(__thiscall*)(CPlayerPool*, ID))GetAddress(0x6E850))(this, nId); +} + +int CPlayerPool::GetPing(ID nId) { + return ((int(__thiscall*)(CPlayerPool*, ID))GetAddress(0x6E880))(this, nId); +} + +const char* CPlayerPool::GetName(ID nId) { + return ((const char*(__thiscall*)(CPlayerPool*, ID))GetAddress(0x175C0))(this, nId); +} + +int CPlayerPool::GetLocalPlayerPing() { + return ((int(__thiscall*)(CPlayerPool*))GetAddress(0x6E8C0))(this); +} + +int CPlayerPool::GetLocalPlayerScore() { + return ((int(__thiscall*)(CPlayerPool*))GetAddress(0x6E8B0))(this); +} + +int CPlayerPool::GetCount(BOOL bIncludeNPC) { + return ((int(__thiscall*)(CPlayerPool*, BOOL))GetAddress(0x139F0))(this, bIncludeNPC); +} + +CLocalPlayer* CPlayerPool::GetLocalPlayer() { + return ((CLocalPlayer * (__thiscall*)(CPlayerPool*)) GetAddress(0x1A40))(this); +} + +CObject* CPlayerPool::FindAccessory(::CObject* pGameObject) { + return ((CObject * (__thiscall*)(CPlayerPool*, ::CObject*)) GetAddress(0x13B70))(this, pGameObject); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CPlayerTags.cpp b/src/sampapi/0.3.7-R5-1/CPlayerTags.cpp new file mode 100644 index 00000000..13453483 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CPlayerTags.cpp @@ -0,0 +1,58 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CPlayerTags.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CPlayerTags*& RefPlayerTags() { + return *(CPlayerTags**)GetAddress(0x26EB48); +} + +CPlayerTags::CPlayerTags(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CPlayerTags*, IDirect3DDevice9*))GetAddress(0x6CCF0))(this, pDevice); +} + +CPlayerTags::~CPlayerTags() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6CD20))(this); +} + +void CPlayerTags::EndHealthBar() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6CD50))(this); +} + +void CPlayerTags::BeginLabel() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6CD80))(this); +} + +void CPlayerTags::EndLabel() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6CD90))(this); +} + +void CPlayerTags::DrawLabel(CVector* pPosition, const char* szText, D3DCOLOR color, float fDistanceToCamera, bool bDrawStatus, int nStatus) { + ((void(__thiscall*)(CPlayerTags*, CVector*, const char*, D3DCOLOR, float, bool, int))GetAddress(0x6CDA0))(this, pPosition, szText, color, fDistanceToCamera, bDrawStatus, nStatus); +} + +void CPlayerTags::DrawHealthBar(CVector* pPosition, float fHealth, float fArmour, float fDistanceToCamera) { + ((void(__thiscall*)(CPlayerTags*, CVector*, float, float, float))GetAddress(0x6D0A0))(this, pPosition, fHealth, fArmour, fDistanceToCamera); +} + +void CPlayerTags::OnLostDevice() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6D650))(this); +} + +void CPlayerTags::OnResetDevice() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6D680))(this); +} + +void CPlayerTags::BeginHealthBar() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6D6B0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CRemotePlayer.cpp b/src/sampapi/0.3.7-R5-1/CRemotePlayer.cpp new file mode 100644 index 00000000..506a1f8b --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CRemotePlayer.cpp @@ -0,0 +1,178 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CRemotePlayer.h" + +SAMPAPI_BEGIN_V037R5_1 + +CRemotePlayer::CRemotePlayer() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x165E0))(this); +} + +CRemotePlayer::~CRemotePlayer() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x16660))(this); +} + +void CRemotePlayer::ProcessHead() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x143A0))(this); +} + +void CRemotePlayer::SetMarkerState(BOOL bState) { + ((void(__thiscall*)(CRemotePlayer*, BOOL))GetAddress(0x14500))(this, bState); +} + +void CRemotePlayer::SetMarkerPosition(int x, int y, int z) { + ((void(__thiscall*)(CRemotePlayer*, int, int, int))GetAddress(0x14540))(this, x, y, z); +} + +BOOL CRemotePlayer::SurfingOnVehicle() { + return ((BOOL(__thiscall*)(CRemotePlayer*))GetAddress(0x145F0))(this); +} + +BOOL CRemotePlayer::SurfingOnObject() { + return ((BOOL(__thiscall*)(CRemotePlayer*))GetAddress(0x14620))(this); +} + +void CRemotePlayer::ProcessSurfing() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14650))(this); +} + +void CRemotePlayer::OnEnterVehicle() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14800))(this); +} + +void CRemotePlayer::OnExitVehicle() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x148F0))(this); +} + +void CRemotePlayer::ProcessSpecialAction() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14950))(this); +} + +void CRemotePlayer::UpdateOnfootSpeedAndPosition() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14C40))(this); +} + +void CRemotePlayer::UpdateOnfootRotation() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14FF0))(this); +} + +void CRemotePlayer::SetOnfootTargetSpeedAndPosition(CVector* pPosition, CVector* pSpeed) { + ((void(__thiscall*)(CRemotePlayer*, CVector*, CVector*))GetAddress(0x150D0))(this, pPosition, pSpeed); +} + +void CRemotePlayer::UpdateIncarSpeedAndPosition() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x15140))(this); +} + +void CRemotePlayer::UpdateIncarRotation() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x15460))(this); +} + +void CRemotePlayer::SetIncarTargetSpeedAndPosition(CMatrix* pMatrix, CVector* pPosition, CVector* pSpeed) { + ((void(__thiscall*)(CRemotePlayer*, CMatrix*, CVector*, CVector*))GetAddress(0x155E0))(this, pMatrix, pPosition, pSpeed); +} + +void CRemotePlayer::UpdateTrain(CMatrix* pMatrix, CVector* pSpeed, float fSpeed) { + ((void(__thiscall*)(CRemotePlayer*, CMatrix*, CVector*, float))GetAddress(0x15650))(this, pMatrix, pSpeed, fSpeed); +} + +void CRemotePlayer::Update(Synchronization::AimData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::AimData*))GetAddress(0x15760))(this, pData); +} + +void CRemotePlayer::Update(Synchronization::UnoccupiedData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::UnoccupiedData*))GetAddress(0x158D0))(this, pData); +} + +void CRemotePlayer::Update(Synchronization::TrailerData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::TrailerData*))GetAddress(0x15C90))(this, pData); +} + +void CRemotePlayer::ResetData() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x15FA0))(this); +} + +float CRemotePlayer::GetDistanceToPlayer(CRemotePlayer* pPlayer) { + return ((float(__thiscall*)(CRemotePlayer*, CRemotePlayer*))GetAddress(0x160A0))(this, pPlayer); +} + +float CRemotePlayer::GetDistanceToLocalPlayer() { + return ((float(__thiscall*)(CRemotePlayer*))GetAddress(0x16120))(this); +} + +void CRemotePlayer::SetColor(D3DCOLOR color) { + ((void(__thiscall*)(CRemotePlayer*, D3DCOLOR))GetAddress(0x16150))(this, color); +} + +D3DCOLOR CRemotePlayer::GetColorAsRGBA() { + return ((D3DCOLOR(__thiscall*)(CRemotePlayer*))GetAddress(0x16170))(this); +} + +D3DCOLOR CRemotePlayer::GetColorAsARGB() { + return ((D3DCOLOR(__thiscall*)(CRemotePlayer*))GetAddress(0x16180))(this); +} + +void CRemotePlayer::EnterVehicle(ID nId, BOOL bPassenger) { + ((void(__thiscall*)(CRemotePlayer*, ID, BOOL))GetAddress(0x161A0))(this, nId, bPassenger); +} + +void CRemotePlayer::ExitVehicle() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x16230))(this); +} + +void CRemotePlayer::ChangeState(char nOld, char nNew) { + ((void(__thiscall*)(CRemotePlayer*, char, char))GetAddress(0x16270))(this, nOld, nNew); +} + +int CRemotePlayer::GetStatus() { + return ((int(__thiscall*)(CRemotePlayer*))GetAddress(0x16330))(this); +} + +void CRemotePlayer::Update(Synchronization::BulletData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::BulletData*))GetAddress(0x16370))(this, pData); +} + +void CRemotePlayer::Process() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x166B0))(this); +} + +BOOL CRemotePlayer::Spawn(int a2, int nModel, int a4, CVector* pPosition, float fRotation, D3DCOLOR color, char nFightingStyle) { + return ((BOOL(__thiscall*)(CRemotePlayer*, int, int, int, CVector*, float, D3DCOLOR, char))GetAddress(0x17130))(this, a2, nModel, a4, pPosition, fRotation, color, nFightingStyle); +} + +void CRemotePlayer::Update(Synchronization::OnfootData* pData, TICK timestamp) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::OnfootData*, TICK))GetAddress(0x17260))(this, pData, timestamp); +} + +void CRemotePlayer::Update(Synchronization::IncarData* pData, TICK timestamp) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::IncarData*, TICK))GetAddress(0x17340))(this, pData, timestamp); +} + +void CRemotePlayer::Update(Synchronization::PassengerData* pData, TICK timestamp) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::PassengerData*, TICK))GetAddress(0x17440))(this, pData, timestamp); +} + +void CRemotePlayer::Remove() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x17530))(this); +} + +void CRemotePlayer::Kill() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x17570))(this); +} + +void CRemotePlayer::Chat(const char* szText) { + ((void(__thiscall*)(CRemotePlayer*, const char*))GetAddress(0x17610))(this, szText); +} + +BOOL CRemotePlayer::DoesExist() { + return ((BOOL(__thiscall*)(CRemotePlayer*))GetAddress(0x1080))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CScoreboard.cpp b/src/sampapi/0.3.7-R5-1/CScoreboard.cpp new file mode 100644 index 00000000..5fb32ea4 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CScoreboard.cpp @@ -0,0 +1,54 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CScoreboard.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CScoreboard*& RefScoreboard() { + return *(CScoreboard**)GetAddress(0x26EB4C); +} + +CScoreboard::CScoreboard(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CScoreboard*, IDirect3DDevice9*))GetAddress(0x6EA30))(this, pDevice); +} + +void CScoreboard::Recalc() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6E930))(this); +} + +void CScoreboard::GetRect(CRect* pRect) { + ((void(__thiscall*)(CScoreboard*, CRect*))GetAddress(0x6E990))(this, pRect); +} + +void CScoreboard::Close(bool bHideCursor) { + ((void(__thiscall*)(CScoreboard*, bool))GetAddress(0x6E9E0))(this, bHideCursor); +} + +void CScoreboard::ResetDialogControls(CDXUTDialog* pDialog) { + ((void(__thiscall*)(CScoreboard*, CDXUTDialog*))GetAddress(0x6EAB0))(this, pDialog); +} + +void CScoreboard::SendNotification() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6EC10))(this); +} + +void CScoreboard::UpdateList() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6ED30))(this); +} + +void CScoreboard::Draw() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6F0B0))(this); +} + +void CScoreboard::Enable() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6F3D0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CSpawnScreen.cpp b/src/sampapi/0.3.7-R5-1/CSpawnScreen.cpp new file mode 100644 index 00000000..d5a3b39e --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CSpawnScreen.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CSpawnScreen.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CSpawnScreen*& RefSpawnScreen() { + return *(CSpawnScreen**)GetAddress(0x26EB90); +} + +CSpawnScreen::CSpawnScreen(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CSpawnScreen*, IDirect3DDevice9*))GetAddress(0x70EF0))(this, pDevice); +} + +CSpawnScreen::~CSpawnScreen() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70F30))(this); +} + +void CSpawnScreen::SetText(const char* szString) { + ((void(__thiscall*)(CSpawnScreen*, const char*))GetAddress(0x70B90))(this, szString); +} + +void CSpawnScreen::OnResetDevice() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70BF0))(this); +} + +void CSpawnScreen::OnLostDevice() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70EA0))(this); +} + +void CSpawnScreen::Draw() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70F90))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CSrvNetStats.cpp b/src/sampapi/0.3.7-R5-1/CSrvNetStats.cpp new file mode 100644 index 00000000..1d8e4b1f --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CSrvNetStats.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CSrvNetStats.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CSrvNetStats*& RefServerNetStatistics() { + return *(CSrvNetStats**)GetAddress(0x26EB70); +} + +CSrvNetStats::CSrvNetStats(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CSrvNetStats*, IDirect3DDevice9*))GetAddress(0x71220))(this, pDevice); +} + +void CSrvNetStats::Draw() { + ((void(__thiscall*)(CSrvNetStats*))GetAddress(0x71260))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CTextDraw.cpp b/src/sampapi/0.3.7-R5-1/CTextDraw.cpp new file mode 100644 index 00000000..8554b916 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CTextDraw.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CTextDraw.h" + +SAMPAPI_BEGIN_V037R5_1 + +CTextDraw::CTextDraw(Transmit* pData, const char* szText) { + ((void(__thiscall*)(CTextDraw*, Transmit*, const char*))GetAddress(0xB36E0))(this, pData, szText); +} + +CTextDraw::~CTextDraw() { + ((void(__thiscall*)(CTextDraw*))GetAddress(0xB2F50))(this); +} + +void CTextDraw::SetText(const char* szText) { + ((void(__thiscall*)(CTextDraw*, const char*))GetAddress(0xB36E0))(this, szText); +} + +void CTextDraw::Draw() { + ((void(__thiscall*)(CTextDraw*))GetAddress(0xB3480))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CTextDrawPool.cpp b/src/sampapi/0.3.7-R5-1/CTextDrawPool.cpp new file mode 100644 index 00000000..66e6ee89 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CTextDrawPool.cpp @@ -0,0 +1,34 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CTextDrawPool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CTextDrawPool::CTextDrawPool() { + ((void(__thiscall*)(CTextDrawPool*))GetAddress(0x1E7A0))(this); +} + +CTextDrawPool::~CTextDrawPool() { + ((void(__thiscall*)(CTextDrawPool*))GetAddress(0x1E8D0))(this); +} + +void CTextDrawPool::Delete(ID nId) { + ((void(__thiscall*)(CTextDrawPool*, ID))GetAddress(0x1E7F0))(this, nId); +} + +void CTextDrawPool::Draw() { + ((void(__thiscall*)(CTextDrawPool*))GetAddress(0x1E830))(this); +} + +CTextDraw* CTextDrawPool::Create(int nId, CTextDraw::Transmit* pData, const char* szText) { + return ((CTextDraw * (__thiscall*)(CTextDrawPool*, int, CTextDraw::Transmit*, const char*)) GetAddress(0x1E910))(this, nId, pData, szText); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CTextDrawSelection.cpp b/src/sampapi/0.3.7-R5-1/CTextDrawSelection.cpp new file mode 100644 index 00000000..8f869b47 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CTextDrawSelection.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CTextDrawSelection.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CTextDrawSelection*& RefTextDrawSelection() { + return *(CTextDrawSelection**)GetAddress(0x26EB68); +} + +void CTextDrawSelection::ResetTextDraws() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x712B0))(this); +} + +void CTextDrawSelection::RawProcess() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x71310))(this); +} + +void CTextDrawSelection::Process() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x71410))(this); +} + +void CTextDrawSelection::Enable(D3DCOLOR hoveredColor) { + ((void(__thiscall*)(CTextDrawSelection*, D3DCOLOR))GetAddress(0x71440))(this, hoveredColor); +} + +void CTextDrawSelection::SendNotification() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x71480))(this); +} + +void CTextDrawSelection::Disable() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x71520))(this); +} + +BOOL CTextDrawSelection::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CTextDrawSelection*, int, int, int))GetAddress(0x71570))(this, uMsg, wParam, lParam); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CVehicle.cpp b/src/sampapi/0.3.7-R5-1/CVehicle.cpp new file mode 100644 index 00000000..20a8ad58 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CVehicle.cpp @@ -0,0 +1,249 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CVehicle.h" + +SAMPAPI_BEGIN_V037R5_1 + +CVehicle::CVehicle(int nModel, CVector position, float fRotation, BOOL bKeepModelLoaded, BOOL bHasSiren) { + ((void(__thiscall*)(CVehicle*, int, CVector, float, BOOL, BOOL))GetAddress(0xB83D0))(this, nModel, position, fRotation, bKeepModelLoaded, bHasSiren); +} + +CVehicle::~CVehicle() { +} + +void CVehicle::ChangeInterior(int nId) { + ((void(__thiscall*)(CVehicle*, int))GetAddress(0xB7090))(this, nId); +} + +void CVehicle::ResetPointers() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB70C0))(this); +} + +BOOL CVehicle::HasDriver() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB70E0))(this); +} + +BOOL CVehicle::IsOccupied() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7130))(this); +} + +void CVehicle::SetInvulnerable(BOOL bInv) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB7190))(this, bInv); +} + +void CVehicle::SetLocked(BOOL bLock) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB7230))(this, bLock); +} + +float CVehicle::GetHealth() { + return ((float(__thiscall*)(CVehicle*))GetAddress(0xB72A0))(this); +} + +void CVehicle::SetHealth(float fValue) { + ((void(__thiscall*)(CVehicle*, float))GetAddress(0xB72C0))(this, fValue); +} + +void CVehicle::SetColor(NUMBER nPrimary, NUMBER nSecondary) { + ((void(__thiscall*)(CVehicle*, NUMBER, NUMBER))GetAddress(0xB72E0))(this, nPrimary, nSecondary); +} + +void CVehicle::UpdateColor() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7330))(this); +} + +int CVehicle::GetSubtype() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB7390))(this); +} + +BOOL CVehicle::IsSunk() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB73B0))(this); +} + +BOOL CVehicle::IsWrecked() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB73D0))(this); +} + +BOOL CVehicle::DriverIsPlayerPed() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB73F0))(this); +} + +BOOL CVehicle::HasPlayerPed() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7420))(this); +} + +BOOL CVehicle::IsTrainPart() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7460))(this); +} + +BOOL CVehicle::HasTurret() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB74A0))(this); +} + +void CVehicle::EnableSiren(bool bEnable) { + ((void(__thiscall*)(CVehicle*, bool))GetAddress(0xB7540))(this, bEnable); +} + +BOOL CVehicle::SirenEnabled() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7560))(this); +} + +void CVehicle::SetLandingGearState(BOOL bHide) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB75A0))(this, bHide); +} + +BOOL CVehicle::GetLandingGearState() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7630))(this); +} + +void CVehicle::SetHydraThrusters(int nDirection) { + ((void(__thiscall*)(CVehicle*, int))GetAddress(0xB76A0))(this, nDirection); +} + +int CVehicle::GetHydraThrusters() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB76C0))(this); +} + +void CVehicle::ProcessMarkers() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB76E0))(this); +} + +void CVehicle::Lock(BOOL bLock) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB7840))(this, bLock); +} + +BOOL CVehicle::UpdateLastDrivenTime() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7870))(this); +} + +float CVehicle::GetTrainSpeed() { + return ((float(__thiscall*)(CVehicle*))GetAddress(0xB78E0))(this); +} + +void CVehicle::SetTrainSpeed(float fValue) { + ((void(__thiscall*)(CVehicle*, float))GetAddress(0xB7900))(this, fValue); +} + +void CVehicle::SetTires(char nState) { + ((void(__thiscall*)(CVehicle*, char))GetAddress(0xB7940))(this, nState); +} + +char CVehicle::GetTires() { + return ((char(__thiscall*)(CVehicle*))GetAddress(0xB7A30))(this); +} + +void CVehicle::UpdateDamage(int nPanels, int nDoors, char nLights) { + ((void(__thiscall*)(CVehicle*, int, int, char))GetAddress(0xB7AC0))(this, nPanels, nDoors, nLights); +} + +int CVehicle::GetPanelsDamage() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB7B80))(this); +} + +int CVehicle::GetDoorsDamage() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB7BB0))(this); +} + +char CVehicle::GetLightsDamage() { + return ((char(__thiscall*)(CVehicle*))GetAddress(0xB7BE0))(this); +} + +void CVehicle::AttachTrailer() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7C10))(this); +} + +void CVehicle::DetachTrailer() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7C30))(this); +} + +void CVehicle::SetTrailer(CVehicle* pVehicle) { + ((void(__thiscall*)(CVehicle*, CVehicle*))GetAddress(0xB7C80))(this, pVehicle); +} + +CVehicle* CVehicle::GetTrailer() { + return ((CVehicle * (__thiscall*)(CVehicle*)) GetAddress(0xB7C90))(this); +} + +CVehicle* CVehicle::GetTractor() { + return ((CVehicle * (__thiscall*)(CVehicle*)) GetAddress(0xB7CF0))(this); +} + +BOOL CVehicle::IsTrailer() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7D70))(this); +} + +BOOL CVehicle::IsTowtruck() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7DD0))(this); +} + +BOOL CVehicle::IsRC() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7E00))(this); +} + +void CVehicle::EnableLights(bool bEnable) { + ((void(__thiscall*)(CVehicle*, bool))GetAddress(0xB7E50))(this, bEnable); +} + +void CVehicle::RemovePassengers() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7EE0))(this); +} + +BOOL CVehicle::AddComponent(unsigned short nId) { + return ((BOOL(__thiscall*)(CVehicle*, unsigned short))GetAddress(0xB7FC0))(this, nId); +} + +BOOL CVehicle::RemoveComponent(unsigned short nId) { + return ((BOOL(__thiscall*)(CVehicle*, unsigned short))GetAddress(0xB80B0))(this, nId); +} + +void CVehicle::SetPaintjob(NUMBER nId) { + ((void(__thiscall*)(CVehicle*, NUMBER))GetAddress(0xB80F0))(this, nId); +} + +BOOL CVehicle::DoesExist() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB8140))(this); +} + +void CVehicle::SetLicensePlateText(const char* szText) { + ((void(__thiscall*)(CVehicle*, const char*))GetAddress(0xB8150))(this, szText); +} + +void CVehicle::SetRotation(float fValue) { + ((void(__thiscall*)(CVehicle*, float))GetAddress(0xB8170))(this, fValue); +} + +void CVehicle::ConstructLicensePlate() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB81A0))(this); +} + +void CVehicle::ShutdownLicensePlate() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB81F0))(this); +} + +BOOL CVehicle::HasSiren() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB8330))(this); +} + +char CVehicle::GetMaxPassengers() { + return ((char(__thiscall*)(CVehicle*))GetAddress(0xB8340))(this); +} + +void CVehicle::SetWindowOpenFlag(NUMBER nDoorId) { + ((void(__thiscall*)(CVehicle*, NUMBER))GetAddress(0xB8370))(this, nDoorId); +} + +void CVehicle::ClearWindowOpenFlag(NUMBER nDoorId) { + ((void(__thiscall*)(CVehicle*, NUMBER))GetAddress(0xB83A0))(this, nDoorId); +} + +void CVehicle::EnableEngine(BOOL bEnable) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB8A70))(this, bEnable); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/CVehiclePool.cpp b/src/sampapi/0.3.7-R5-1/CVehiclePool.cpp new file mode 100644 index 00000000..e136dbae --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/CVehiclePool.cpp @@ -0,0 +1,94 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/CVehiclePool.h" + +SAMPAPI_BEGIN_V037R5_1 + +CVehiclePool::CVehiclePool() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1EA10))(this); +} + +CVehiclePool::~CVehiclePool() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1F060))(this); +} + +void CVehiclePool::UpdateCount() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1E9B0))(this); +} + +BOOL CVehiclePool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CVehiclePool*, ID))GetAddress(0x1EA80))(this, nId); +} + +void CVehiclePool::ChangeInterior(ID nId, int nInteriorId) { + ((void(__thiscall*)(CVehiclePool*, ID, int))GetAddress(0x1EB00))(this, nId, nInteriorId); +} + +void CVehiclePool::SetParams(ID nId, bool bIsObjective, bool bIsLocked) { + ((void(__thiscall*)(CVehiclePool*, ID, bool, bool))GetAddress(0x1EB30))(this, nId, bIsObjective, bIsLocked); +} + +ID CVehiclePool::Find(::CVehicle* pGameObject) { + return ((ID(__thiscall*)(CVehiclePool*, ::CVehicle*))GetAddress(0x1EB90))(this, pGameObject); +} + +GTAREF CVehiclePool::GetRef(int nId) { + return ((GTAREF(__thiscall*)(CVehiclePool*, int))GetAddress(0x1EBC0))(this, nId); +} + +GTAREF CVehiclePool::GetRef(::CVehicle* pGameObject) { + return ((GTAREF(__thiscall*)(CVehiclePool*, ::CVehicle*))GetAddress(0x1EBE0))(this, pGameObject); +} + +ID CVehiclePool::GetNearest() { + return ((ID(__thiscall*)(CVehiclePool*))GetAddress(0x1EC00))(this); +} + +ID CVehiclePool::GetNearest(CVector point) { + return ((ID(__thiscall*)(CVehiclePool*, CVector))GetAddress(0x1EC70))(this, point); +} + +void CVehiclePool::AddToWaitingList(const VehicleInfo* pInfo) { + ((void(__thiscall*)(CVehiclePool*, const VehicleInfo*))GetAddress(0x1ED10))(this, pInfo); +} + +void CVehiclePool::ConstructLicensePlates() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1ED70))(this); +} + +void CVehiclePool::ShutdownLicensePlates() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1EDE0))(this); +} + +BOOL CVehiclePool::Create(VehicleInfo* pInfo) { + return ((BOOL(__thiscall*)(CVehiclePool*, VehicleInfo*))GetAddress(0x1F080))(this, pInfo); +} + +void CVehiclePool::SendDestroyNotification(ID nId) { + ((void(__thiscall*)(CVehiclePool*, ID))GetAddress(0x1F230))(this, nId); +} + +void CVehiclePool::ProcessWaitingList() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1F300))(this); +} + +void CVehiclePool::Process() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1F3C0))(this); +} + +CVehicle* CVehiclePool::Get(ID nId) { + return ((CVehicle * (__thiscall*)(CVehiclePool*, ID)) GetAddress(0x1120))(this, nId); +} + +BOOL CVehiclePool::DoesExist(ID nId) { + return ((BOOL(__thiscall*)(CVehiclePool*, ID))GetAddress(0x1150))(this, nId); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/Commands.cpp b/src/sampapi/0.3.7-R5-1/Commands.cpp new file mode 100644 index 00000000..28843944 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/Commands.cpp @@ -0,0 +1,148 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/Commands.h" + +SAMPAPI_BEGIN_V037R5_1 + +void Commands::Default(const char* params) { + CMDPROC(GetAddress(0x684E0)) + (params); +} + +void Commands::TestDeathWindow(const char* params) { + CMDPROC(GetAddress(0x68500)) + (params); +} + +void Commands::ToggleCameraTargetLabels(const char* params) { + CMDPROC(GetAddress(0x685E0)) + (params); +} + +void Commands::SetChatPageSize(const char* params) { + CMDPROC(GetAddress(0x685F0)) + (params); +} + +void Commands::SetChatFontSize(const char* params) { + CMDPROC(GetAddress(0x68670)) + (params); +} + +void Commands::DrawNameTagStatus(const char* params) { + CMDPROC(GetAddress(0x68720)) + (params); +} + +void Commands::DrawChatTimestamps(const char* params) { + CMDPROC(GetAddress(0x68730)) + (params); +} + +void Commands::ToggleAudioStreamMessages(const char* params) { + CMDPROC(GetAddress(0x68790)) + (params); +} + +void Commands::ToggleURLMessages(const char* params) { + CMDPROC(GetAddress(0x68800)) + (params); +} + +void Commands::ToggleHUDScaleFix(const char* params) { + CMDPROC(GetAddress(0x68870)) + (params); +} + +void Commands::PrintMemory(const char* params) { + CMDPROC(GetAddress(0x688B0)) + (params); +} + +void Commands::SetFrameLimiter(const char* params) { + CMDPROC(GetAddress(0x688D0)) + (params); +} + +void Commands::ToggleHeadMoves(const char* params) { + CMDPROC(GetAddress(0x68960)) + (params); +} + +void Commands::Quit(const char* params) { + CMDPROC(GetAddress(0x689E0)) + (params); +} + +void Commands::CmpStat(const char* params) { + CMDPROC(GetAddress(0x689F0)) + (params); +} + +void Commands::SavePosition(const char* params) { + CMDPROC(GetAddress(0x68A00)) + (params); +} + +void Commands::SavePositionOnly(const char* params) { + CMDPROC(GetAddress(0x68B80)) + (params); +} + +void Commands::PrintCurrentInterior(const char* params) { + CMDPROC(GetAddress(0x68FD0)) + (params); +} + +void Commands::ToggleObjectsLight(const char* params) { + CMDPROC(GetAddress(0x69000)) + (params); +} + +void Commands::ToggleDebugLabels(const char* params) { + CMDPROC(GetAddress(0x69020)) + (params); +} + +void Commands::SendRconCommand(const char* params) { + CMDPROC(GetAddress(0x69030)) + (params); +} + +void Commands::Debug::SetPlayerSkin(const char* params) { + CMDPROC(GetAddress(0x68D00)) + (params); +} + +void Commands::Debug::CreateVehicle(const char* params) { + CMDPROC(GetAddress(0x68D70)) + (params); +} + +void Commands::Debug::EnableVehicleSelection(const char* params) { + CMDPROC(GetAddress(0x68EB0)) + (params); +} + +void Commands::Debug::SetWorldWeather(const char* params) { + CMDPROC(GetAddress(0x68ED0)) + (params); +} + +void Commands::Debug::SetWorldTime(const char* params) { + CMDPROC(GetAddress(0x68F20)) + (params); +} + +void Commands::Setup() { + ((void(__cdecl*)())GetAddress(0x69110))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/DebugScript.cpp b/src/sampapi/0.3.7-R5-1/DebugScript.cpp new file mode 100644 index 00000000..4e721ffb --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/DebugScript.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/DebugScript.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CObjectPool*& DebugScript::RefPrivateObjectPool() { + return *(CObjectPool**)GetAddress(0x14FFAC); +} + +SAMPAPI_VAR unsigned short& DebugScript::RefObjectCount() { + return *(unsigned short*)GetAddress(0x14FFB0); +} + +SAMPAPI_VAR CVector& DebugScript::RefNewCameraPos() { + return *(CVector*)GetAddress(0x14FFA0); +} + +void DebugScript::Initialize(const char* szFile) { + ((void(__cdecl*)(const char*))GetAddress(0x9E9B0))(szFile); +} + +void DebugScript::ProcessLine(const char* szLine) { + ((void(__cdecl*)(const char*))GetAddress(0x9E8A0))(szLine); +} + +char* DebugScript::GetCommandParams(char* szLine) { + return ((char*(__cdecl*)(char*))GetAddress(0x9E4B0))(szLine); +} + +void DebugScript::CreateVehicle(const char* szParams) { + ((void(__cdecl*)(const char*))GetAddress(0x9E610))(szParams); +} + +void DebugScript::CreateObject(const char* szParams) { + ((void(__cdecl*)(const char*))GetAddress(0x9E500))(szParams); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/Exception.cpp b/src/sampapi/0.3.7-R5-1/Exception.cpp new file mode 100644 index 00000000..52285d80 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/Exception.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/Exception.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR int& Exception::RefCount() { + return *(int*)GetAddress(0x125A58); +} + +SAMPAPI_VAR void*& Exception::RefContextRecord() { + return *(void**)GetAddress(0x121A50); +} + +SAMPAPI_VAR char* Exception::ArrayCrashDialogText() { + return (char*)GetAddress(0x121A58); +} + +BOOL Exception::Print(int nCode, void* pExceptionPointers, const char* szWarning) { + return ((BOOL(__stdcall*)(int, void*, const char*))GetAddress(0x609B0))(nCode, pExceptionPointers, szWarning); +} + +void Exception::SendCrashReport() { + ((void(__cdecl*)())GetAddress(0x607A0))(); +} + +BOOL Exception::CrashDialogProc(void* hWnd, unsigned int uMsg, unsigned int wParam, long lParam) { + return ((BOOL(__stdcall*)(void*, unsigned int, unsigned int, long))GetAddress(0x60870))(hWnd, uMsg, wParam, lParam); +} + +void Exception::ConstructCrashDialogText(BOOL bModules) { + ((void(__cdecl*)(BOOL))GetAddress(0x605B0))(bModules); +} + +long Exception::Handler(void* pExceptionPointers) { + return ((long(__stdcall*)(void*))GetAddress(0x60970))(pExceptionPointers); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/GUI.cpp b/src/sampapi/0.3.7-R5-1/GUI.cpp new file mode 100644 index 00000000..5a677ef5 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/GUI.cpp @@ -0,0 +1,70 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/GUI.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CDXUTDialogResourceManager*& GUI::RefResourceMgr() { + return *(CDXUTDialogResourceManager**)GetAddress(0x26EC20); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefGameUi() { + return *(CDXUTDialog**)GetAddress(0x26EC24); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefScoreboard() { + return *(CDXUTDialog**)GetAddress(0x26EC28); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefDialog() { + return *(CDXUTDialog**)GetAddress(0x26EC30); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefClassSelection() { + return *(CDXUTDialog**)GetAddress(0x26EC2C); +} + +SAMPAPI_VAR IDirect3DSurface9*& GUI::RefCursor() { + return *(IDirect3DSurface9**)GetAddress(0x26EC3C); +} + +SAMPAPI_VAR IDirect3DDevice9*& GUI::RefDevice() { + return *(IDirect3DDevice9**)GetAddress(0x26EB40); +} + +void GUI::Initialize() { + ((void(__cdecl*)())GetAddress(0xC5620))(); +} + +void GUI::OnLostDevice() { + ((void(__cdecl*)())GetAddress(0xC3F50))(); +} + +void GUI::OnResetDevice() { + ((void(__cdecl*)())GetAddress(0xC41B0))(); +} + +void GUI::GameUIEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC5530))(nEvent, nControlId, pControl, pUserContext); +} + +void GUI::ScoreboardEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC5570))(nEvent, nControlId, pControl, pUserContext); +} + +void GUI::DialogEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC54A0))(nEvent, nControlId, pControl, pUserContext); +} + +void GUI::ClassSelectionEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC55A0))(nEvent, nControlId, pControl, pUserContext); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/InputHandler.cpp b/src/sampapi/0.3.7-R5-1/InputHandler.cpp new file mode 100644 index 00000000..8eeda760 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/InputHandler.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/InputHandler.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR void*& InputHandler::RefPrevWindowProc() { + return *(void**)GetAddress(0x12DE60); +} + +SAMPAPI_VAR unsigned int& InputHandler::RefAntiCheatDetectCount() { + return *(unsigned int*)GetAddress(0x26EBD0); +} + +int InputHandler::WindowProc(unsigned int uMsg, unsigned int wParam, long lParam) { + return ((int(__stdcall*)(unsigned int, unsigned int, long))GetAddress(0x61650))(uMsg, wParam, lParam); +} + +BOOL InputHandler::KeyPressHandler(unsigned int nKey) { + return ((BOOL(__cdecl*)(unsigned int))GetAddress(0x61360))(nKey); +} + +BOOL InputHandler::CharInputHandler(unsigned int nChar) { + return ((BOOL(__cdecl*)(unsigned int))GetAddress(0x61590))(nChar); +} + +BOOL InputHandler::Initialize() { + return ((BOOL(__cdecl*)())GetAddress(0x61EC0))(); +} + +void SwitchWindowedMode() { + ((void(__cdecl*)())GetAddress(0x61310))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/KeyStuff.cpp b/src/sampapi/0.3.7-R5-1/KeyStuff.cpp new file mode 100644 index 00000000..08493bbe --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/KeyStuff.cpp @@ -0,0 +1,82 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/KeyStuff.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CPad& KeyStuff::RefLocalPlayerKeys() { + return *(CPad*)GetAddress(0x1527C8); +} + +SAMPAPI_VAR CPad* KeyStuff::ArrayPlayerKeys() { + return (CPad*)GetAddress(0x152900); +} + +SAMPAPI_VAR CPad*& KeyStuff::RefInternalKeys() { + return *(CPad**)GetAddress(0x114AE8); +} + +SAMPAPI_VAR bool*& KeyStuff::RefDriveByLeft() { + return *(bool**)GetAddress(0x114AEC); +} + +SAMPAPI_VAR bool*& KeyStuff::RefDriveByRight() { + return *(bool**)GetAddress(0x114AF0); +} + +SAMPAPI_VAR bool& KeyStuff::RefSavedDriveByLeft() { + return *(bool*)GetAddress(0x1625A8); +} + +SAMPAPI_VAR bool& KeyStuff::RefSavedDriveByRight() { + return *(bool*)GetAddress(0x1625A9); +} + +void KeyStuff::Initialize() { + ((void(__cdecl*)())GetAddress(0xA72A0))(); +} + +void KeyStuff::UpdateKeys() { + ((void(__cdecl*)())GetAddress(0xA72C0))(); +} + +void KeyStuff::ApplyKeys() { + ((void(__cdecl*)())GetAddress(0xA7300))(); +} + +void KeyStuff::SetKeys(int nPlayer, const CPad* pKeys) { + ((void(__cdecl*)(int, const CPad*))GetAddress(0xA7340))(nPlayer, pKeys); +} + +void KeyStuff::ApplyKeys(int nPlayer) { + ((void(__cdecl*)(int))GetAddress(0xA7360))(nPlayer); +} + +CPad* KeyStuff::GetInternalKeys() { + return ((::CPad * (__cdecl*)()) GetAddress(0xA73B0))(); +} + +CPad* KeyStuff::GetKeys() { + return ((::CPad * (__cdecl*)()) GetAddress(0xA73C0))(); +} + +CPad* KeyStuff::GetKeys(int nPlayer) { + return ((::CPad * (__cdecl*)(int)) GetAddress(0xA73D0))(nPlayer); +} + +void KeyStuff::ResetKeys(int nPlayer) { + ((void(__cdecl*)(int))GetAddress(0xA73E0))(nPlayer); +} + +void KeyStuff::ResetInternalKeys() { + ((void(__cdecl*)())GetAddress(0xA7400))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/RPCHandlers.cpp b/src/sampapi/0.3.7-R5-1/RPCHandlers.cpp new file mode 100644 index 00000000..4b125b4d --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/RPCHandlers.cpp @@ -0,0 +1,546 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/RPCHandlers.h" + +SAMPAPI_BEGIN_V037R5_1 + +void RPCHandlers::ScrSetPlayerSkillLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF5E0))(pParams); +} + +void RPCHandlers::ScrCreate3DTextLabel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF720))(pParams); +} + +void RPCHandlers::ScrDestroy3DTextLabel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF8D0))(pParams); +} + +void RPCHandlers::ScrChatBubble(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF990))(pParams); +} + +void RPCHandlers::ScrShowDialog(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFAF0))(pParams); +} + +void RPCHandlers::ScrSetCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10170))(pParams); +} + +void RPCHandlers::ScrDisableCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE5A0))(pParams); +} + +void RPCHandlers::ScrSetRaceCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10280))(pParams); +} + +void RPCHandlers::ScrDisableRaceCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE5B0))(pParams); +} + +void RPCHandlers::UpdateScoresPingsIps(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x103E0))(pParams); +} + +void RPCHandlers::SrvNetStats(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE5C0))(pParams); +} + +void RPCHandlers::ScrGamemodeRestart(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE650))(pParams); +} + +void RPCHandlers::ConnectionRejected(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10540))(pParams); +} + +void RPCHandlers::ScrClientMessage(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEF90))(pParams); +} + +void RPCHandlers::ScrSetWorldTime(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEEF0))(pParams); +} + +void RPCHandlers::ScrCreatePickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF080))(pParams); +} + +void RPCHandlers::ScrDestroyPickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF140))(pParams); +} + +void RPCHandlers::ScrDestroyWeaponPickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF1E0))(pParams); +} + +void RPCHandlers::ScmEvent(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF280))(pParams); +} + +void RPCHandlers::ScrSetWeather(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF370))(pParams); +} + +void RPCHandlers::ScrSetPlayerTime(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF420))(pParams); +} + +void RPCHandlers::ScrToggleClock(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF500))(pParams); +} + +void RPCHandlers::ScrSetIngameTimer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFF30))(pParams); +} + +void RPCHandlers::ScrWorldPlayerAdd(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10B00))(pParams); +} + +void RPCHandlers::ScrWorldPlayerDeath(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10D40))(pParams); +} + +void RPCHandlers::ScrWorldPlayerRemove(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10E00))(pParams); +} + +void RPCHandlers::ScrWorldVehicleAdd(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE670))(pParams); +} + +void RPCHandlers::ScrWorldVehicleRemove(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10EE0))(pParams); +} + +void RPCHandlers::DamageVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x111C0))(pParams); +} + +void RPCHandlers::ScrSetVehicleParamsEx(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x112F0))(pParams); +} + +void RPCHandlers::EnterVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x115D0))(pParams); +} + +void RPCHandlers::ExitVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x116F0))(pParams); +} + +void RPCHandlers::ScrServerJoin(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFCE0))(pParams); +} + +void RPCHandlers::ScrServerQuit(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFE70))(pParams); +} + +void RPCHandlers::ScrInitGame(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10660))(pParams); +} + +void RPCHandlers::Chat(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x122F0))(pParams); +} + +void RPCHandlers::RequestClass(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFFD0))(pParams); +} + +void RPCHandlers::RequestSpawn(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x100A0))(pParams); +} + +void RPCHandlers::EditAttachedObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x117E0))(pParams); +} + +void RPCHandlers::EditObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x118A0))(pParams); +} + +void RPCHandlers::EnterEditObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE8B0))(pParams); +} + +void RPCHandlers::ScrCancelEdit(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE970))(pParams); +} + +void RPCHandlers::ScrUpdateCameraTarget(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEA20))(pParams); +} + +void RPCHandlers::ClientCheck(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11A60))(pParams); +} + +void RPCHandlers::ScrCreateActor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEAB0))(pParams); +} + +void RPCHandlers::ScrDestroyActor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11E00))(pParams); +} + +void RPCHandlers::ScrDisableVehicleCollisions(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17DE0))(pParams); +} + +void RPCHandlers::ScrSetPlayerMapIcon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A790))(pParams); +} + +void RPCHandlers::ScrRemovePlayerMapIcon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A8B0))(pParams); +} + +void RPCHandlers::ScrSetPlayerAmmo(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AC10))(pParams); +} + +void RPCHandlers::ScrSetGravity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1ACD0))(pParams); +} + +void RPCHandlers::ScrSetVehicleHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AD70))(pParams); +} + +void RPCHandlers::ScrAttachTrailerToVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AE50))(pParams); +} + +void RPCHandlers::ScrDetachTrailerFromVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AF90))(pParams); +} + +void RPCHandlers::ScrCreateObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B340))(pParams); +} + +void RPCHandlers::ScrSetObjectPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BA10))(pParams); +} + +void RPCHandlers::ScrSetObjectRotation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BB20))(pParams); +} + +void RPCHandlers::ScrDestroyObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BC20))(pParams); +} + +void RPCHandlers::ScrCreateExplosion(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BD10))(pParams); +} + +void RPCHandlers::ScrShowPlayerNametagForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BE20))(pParams); +} + +void RPCHandlers::ScrMoveObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BF00))(pParams); +} + +void RPCHandlers::ScrStopObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C0B0))(pParams); +} + +void RPCHandlers::ScrSetNumberPlate(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C230))(pParams); +} + +void RPCHandlers::ScrTogglePlayerSpectating(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C350))(pParams); +} + +void RPCHandlers::ScrPlayerSpectatePlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C400))(pParams); +} + +void RPCHandlers::ScrPlayerSpectateVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C4E0))(pParams); +} + +void RPCHandlers::ScrMoveVehicleComponent(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C5C0))(pParams); +} + +void RPCHandlers::ScrForceClassSelection(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x180D0))(pParams); +} + +void RPCHandlers::ScrAttachObjectToPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C6A0))(pParams); +} + +void RPCHandlers::ScrSetPlayerWantedLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CCF0))(pParams); +} + +void RPCHandlers::ScrShowTextDraw(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CD90))(pParams); +} + +void RPCHandlers::ScrHideTextDrawForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CEC0))(pParams); +} + +void RPCHandlers::ScrTextDrawSetString(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CF70))(pParams); +} + +void RPCHandlers::ScrGangZoneCreate(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D080))(pParams); +} + +void RPCHandlers::ScrGangZoneDestroy(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D1A0))(pParams); +} + +void RPCHandlers::ScrGangZoneFlash(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D250))(pParams); +} + +void RPCHandlers::ScrGangZoneStopFlash(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D310))(pParams); +} + +void RPCHandlers::ScrApplyAnimation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A950))(pParams); +} + +void RPCHandlers::ScrClearAnimations(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18580))(pParams); +} + +void RPCHandlers::ScrSetPlayerSpecialAction(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18690))(pParams); +} + +void RPCHandlers::ScrEnableStuntBonusForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17D50))(pParams); +} + +void RPCHandlers::ScrSetPlayerFightingStyle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18740))(pParams); +} + +void RPCHandlers::ScrSetPlayerVelocity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18850))(pParams); +} + +void RPCHandlers::ScrSetVehicleVelocity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18950))(pParams); +} + +void RPCHandlers::ScrPlayCrimeReport(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19050))(pParams); +} + +void RPCHandlers::ScrSetSpawnInfo(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17F50))(pParams); +} + +void RPCHandlers::ScrSetPlayerTeam(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19710))(pParams); +} + +void RPCHandlers::ScrSetPlayerSkin(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19190))(pParams); +} + +void RPCHandlers::ScrSetPlayerName(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1DFD0))(pParams); +} + +void RPCHandlers::ScrSetPlayerPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19320))(pParams); +} + +void RPCHandlers::ScrSetPlayerPositionFindZ(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19440))(pParams); +} + +void RPCHandlers::ScrSetPlayerHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19550))(pParams); +} + +void RPCHandlers::ScrPutPlayerInVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19600))(pParams); +} + +void RPCHandlers::ScrRemovePlayerFromVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17FF0))(pParams); +} + +void RPCHandlers::ScrSetPlayerColor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19800))(pParams); +} + +void RPCHandlers::ScrDisplayGametext(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x198F0))(pParams); +} + +void RPCHandlers::ScrSetPlayerInterior(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19A00))(pParams); +} + +void RPCHandlers::ScrSetPlayerCameraPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19AA0))(pParams); +} + +void RPCHandlers::ScrSetPlayerCameraLookAt(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19B70))(pParams); +} + +void RPCHandlers::ScrSetVehiclePosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19C70))(pParams); +} + +void RPCHandlers::ScrSetVehicleZAngle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19D80))(pParams); +} + +void RPCHandlers::ScrSetVehicleParamsForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19E60))(pParams); +} + +void RPCHandlers::ScrSetCameraBehindPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18080))(pParams); +} + +void RPCHandlers::ScrTogglePlayerControllable(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A290))(pParams); +} + +void RPCHandlers::ScrPlaySound(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A330))(pParams); +} + +void RPCHandlers::ScrSetPlayerWorldBounds(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A410))(pParams); +} + +void RPCHandlers::ScrGivePlayerMoney(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A500))(pParams); +} + +void RPCHandlers::ScrSetPlayerFacingAngle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A5A0))(pParams); +} + +void RPCHandlers::ScrResetPlayerMoney(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18090))(pParams); +} + +void RPCHandlers::ScrResetPlayerWeapons(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x180A0))(pParams); +} + +void RPCHandlers::ScrGivePlayerWeapon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A640))(pParams); +} + +void RPCHandlers::ScrLinkVehicleToInterior(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19F30))(pParams); +} + +void RPCHandlers::ScrSetPlayerArmor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AB60))(pParams); +} + +void RPCHandlers::ScrDeathMessage(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1DD70))(pParams); +} + +void RPCHandlers::ScrSetPlayerShopName(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17E50))(pParams); +} + +void RPCHandlers::ScrSetPlayerDrunkLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18DB0))(pParams); +} + +void RPCHandlers::ScrSetPlayerArmedWeapon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18E50))(pParams); +} + +void RPCHandlers::ScrSetPlayerAttachedObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18F00))(pParams); +} + +void RPCHandlers::ScrPlayAudioStream(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D3C0))(pParams); +} + +void RPCHandlers::ScrStopAudioStream(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x180F0))(pParams); +} + +void RPCHandlers::ScrRemoveBuildingForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D530))(pParams); +} + +void RPCHandlers::ScrAttachCameraToObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19FF0))(pParams); +} + +void RPCHandlers::ScrInterpolateCamera(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A0F0))(pParams); +} + +void RPCHandlers::ClickTextDraw(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D650))(pParams); +} + +void RPCHandlers::ScrSetObjectMaterial(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B6A0))(pParams); +} + +void RPCHandlers::ScrStopObjectCameraCollision(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C170))(pParams); +} + +void RPCHandlers::ScrSetActorAnimation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D750))(pParams); +} + +void RPCHandlers::ScrSetActorRotation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D9F0))(pParams); +} + +void RPCHandlers::ScrSetActorPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1DAD0))(pParams); +} + +void RPCHandlers::ScrSetActorHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1DBE0))(pParams); +} + +void RPCHandlers::ScrInitMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C870))(pParams); +} + +void RPCHandlers::ScrShowMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CB90))(pParams); +} + +void RPCHandlers::ScrHideMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CC40))(pParams); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/Scripting.cpp b/src/sampapi/0.3.7-R5-1/Scripting.cpp new file mode 100644 index 00000000..94f8e58d --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/Scripting.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/Scripting.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR CRunningScript*& Scripting::RefThread() { + return *(CRunningScript**)GetAddress(0x26B558); +} + +SAMPAPI_VAR unsigned char* Scripting::ArrayBuffer() { + return (unsigned char*)GetAddress(0x26B458); +} + +SAMPAPI_VAR unsigned long& Scripting::RefLastUsedOpcode() { + return *(unsigned long*)GetAddress(0x26B55C); +} + +SAMPAPI_VAR unsigned long** Scripting::ArrayThreadLocals() { + return (unsigned long**)GetAddress(0x26B410); +} + +SAMPAPI_VAR Scripting::ProcessOneCommandFn& Scripting::RefProcessOneCommand() { + return *(Scripting::ProcessOneCommandFn*)GetAddress(0x1173B8); +} + +SAMPAPI_VAR BOOL& Scripting::RefLocalDebug() { + return *(BOOL*)GetAddress(0x26B560); +} + +void Scripting::Initialize() { + ((void(__cdecl*)())GetAddress(0xB2550))(); +} + +int Scripting::ExecBuffer() { + return ((int(__cdecl*)())GetAddress(0xB22D0))(); +} + +int(__cdecl* Scripting::FunctionProcessCommand())(const Scripting::OpcodeInfo*, ...) { + return (int(__cdecl*)(const OpcodeInfo*, ...))GetAddress(0xB2310); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.7-R5-1/Settings.cpp b/src/sampapi/0.3.7-R5-1/Settings.cpp new file mode 100644 index 00000000..c0b481d0 --- /dev/null +++ b/src/sampapi/0.3.7-R5-1/Settings.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.7-R5) API project file. + Developers: LUCHARE , Northn + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.7-R5-1/Settings.h" + +SAMPAPI_BEGIN_V037R5_1 + +SAMPAPI_VAR Settings& RefSettings() { + return *(Settings*)GetAddress(0x26DFE8); +} + +void Settings::Initialize() { + ((void(__cdecl*)())GetAddress(0xC45B0))(); +} + +void Settings::GetFromCommandLine(const char* szLine, char* szBuffer) { + ((void(__cdecl*)(const char*, char*))GetAddress(0xC3EC0))(szLine, szBuffer); +} + +void Settings::GetFromQuotes(const char* szLine, char* szBuffer) { + ((void(__cdecl*)(const char*, char*))GetAddress(0xC3F10))(szLine, szBuffer); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/AimStuff.cpp b/src/sampapi/0.3.DL-1/AimStuff.cpp new file mode 100644 index 00000000..9472a5a6 --- /dev/null +++ b/src/sampapi/0.3.DL-1/AimStuff.cpp @@ -0,0 +1,122 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developer: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/AimStuff.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR float& AimStuff::RefLocalPlayerCameraExtZoom() { + return *(float*)GetAddress(0x181E60); +} + +SAMPAPI_VAR float& AimStuff::RefLocalPlayerAspectRatio() { + return *(float*)GetAddress(0x184A18); +} + +SAMPAPI_VAR float*& AimStuff::RefInternalCameraExtZoom() { + return *(float**)GetAddress(0x1419BC); +} + +SAMPAPI_VAR float*& AimStuff::RefInternalAspectRatio() { + return *(float**)GetAddress(0x1419B8); +} + +SAMPAPI_VAR float* AimStuff::ArrayCameraExtZoom() { + return (float*)GetAddress(0x181F40); +} + +SAMPAPI_VAR float* AimStuff::ArrayAspectRatio() { + return (float*)GetAddress(0x184A48); +} + +SAMPAPI_VAR char* AimStuff::ArrayCameraMode() { + return (char*)GetAddress(0x181E68); +} + +SAMPAPI_VAR char*& AimStuff::RefInternalCameraMode() { + return *(char**)GetAddress(0x15195C); +} + +SAMPAPI_VAR AimStuff::Aim& AimStuff::RefLocalPlayerAim() { + return *(AimStuff::Aim*)GetAddress(0x182288); +} + +SAMPAPI_VAR AimStuff::Aim* AimStuff::ArrayPlayerAim() { + return (AimStuff::Aim*)GetAddress(0x1822B8); +} + +SAMPAPI_VAR AimStuff::Aim*& AimStuff::RefInternalAim() { + return *(AimStuff::Aim**)GetAddress(0x1419B0); +} + +float AimStuff::GetCameraExtZoom() { + return ((float(__stdcall*)())GetAddress(0x9C2B0))(); +} + +void AimStuff::ApplyCameraExtZoomAndAspectRatio(NUMBER nPlayer) { + ((void(__stdcall*)(NUMBER))GetAddress(0x9C2D0))(nPlayer); +} + +void AimStuff::SetCameraMode(char nMode, NUMBER nPlayer) { + ((void(__stdcall*)(char, NUMBER))GetAddress(0x9C310))(nMode, nPlayer); +} + +char AimStuff::GetCameraMode(NUMBER nPlayer) { + return ((char(__stdcall*)(NUMBER))GetAddress(0x9C330))(nPlayer); +} + +char AimStuff::GetCameraMode() { + return ((char(__stdcall*)())GetAddress(0x9C340))(); +} + +void AimStuff::Initialize() { + ((void(__stdcall*)())GetAddress(0x9C350))(); +} + +void AimStuff::UpdateAim() { + ((void(__stdcall*)())GetAddress(0x9C3C0))(); +} + +void AimStuff::ApplyAim() { + ((void(__stdcall*)())GetAddress(0x9C3E0))(); +} + +AimStuff::Aim* AimStuff::GetAim() { + return ((Aim * (__stdcall*)()) GetAddress(0x9C400))(); +} + +void AimStuff::SetAim(int nPlayer, const Aim* pAim) { + ((void(__stdcall*)(int, const Aim*))GetAddress(0x9C410))(nPlayer, pAim); +} + +void AimStuff::ApplyAim(int nPlayer) { + ((void(__stdcall*)(int))GetAddress(0x9C440))(nPlayer); +} + +AimStuff::Aim* AimStuff::GetAim(int nPlayer) { + return ((Aim * (__stdcall*)(int)) GetAddress(0x9C470))(nPlayer); +} + +void AimStuff::UpdateCameraExtZoomAndAspectRatio() { + ((void(__stdcall*)())GetAddress(0x9C240))(); +} + +void AimStuff::ApplyCameraExtZoomAndAspectRatio() { + ((void(__stdcall*)())GetAddress(0x9C260))(); +} + +void AimStuff::SetCameraExtZoomAndAspectRatio(NUMBER nPlayer, float fCameraExtZoom, float fAspectRatio) { + ((void(__stdcall*)(NUMBER, float, float))GetAddress(0x9C280))(nPlayer, fCameraExtZoom, fAspectRatio); +} + +float AimStuff::GetAspectRatio() { + return ((float(__stdcall*)())GetAddress(0x9C2A0))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CActor.cpp b/src/sampapi/0.3.DL-1/CActor.cpp new file mode 100644 index 00000000..2341d579 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CActor.cpp @@ -0,0 +1,45 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CActor.h" + +SAMPAPI_BEGIN_V03DL_1 + +CActor::CActor(int nModel, CVector position, float fRotation) { + ((void(__thiscall*)(CActor*, int, CVector, float))GetAddress(0x9BD30))(this, nModel, position, fRotation); +} + +CActor::~CActor() { +} + +void CActor::Destroy() { + ((void(__thiscall*)(CActor*))GetAddress(0x9BE80))(this); +} + +void CActor::PerformAnimation(const char* szAnim, const char* szIFP, float fFramedelta, int bLockA, int bLockX, int bLockY, int bLockF, int nTime) { + ((void(__thiscall*)(CActor*, const char*, const char*, float, int, int, int, int, int))GetAddress(0x9BEE0))(this, szAnim, szIFP, fFramedelta, bLockA, bLockX, bLockY, bLockF, nTime); +} + +void CActor::SetRotation(float fAngle) { + ((void(__thiscall*)(CActor*, float))GetAddress(0x9BFF0))(this, fAngle); +} + +float CActor::GetHealth() { + return ((float(__thiscall*)(CActor*))GetAddress(0x9C030))(this); +} + +void CActor::SetHealth(float fValue) { + ((void(__thiscall*)(CActor*, float))GetAddress(0x9C050))(this, fValue); +} + +void CActor::SetInvulnerable(bool bEnable) { + ((void(__thiscall*)(CActor*, bool))GetAddress(0x9C180))(this, bEnable); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CActorPool.cpp b/src/sampapi/0.3.DL-1/CActorPool.cpp new file mode 100644 index 00000000..1a94cc46 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CActorPool.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CActorPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CActorPool::CActorPool() { + ((void(__thiscall*)(CActorPool*))GetAddress(0x16C0))(this); +} + +CActorPool::~CActorPool() { + ((void(__thiscall*)(CActorPool*))GetAddress(0x18E0))(this); +} + +CActor* CActorPool::Get(ID nId) { + return ((CActor * (__thiscall*)(CActorPool*, ID)) GetAddress(0x1615))(this, nId); +} + +BOOL CActorPool::DoesExist(ID nId) { + return ((BOOL(__thiscall*)(CActorPool*, ID))GetAddress(0x1640))(this, nId); +} + +void CActorPool::UpdateLargestId() { + ((void(__thiscall*)(CActorPool*))GetAddress(0x1660))(this); +} + +BOOL CActorPool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CActorPool*, ID))GetAddress(0x16F0))(this, nId); +} + +ID CActorPool::Find(::CPed* pGamePed) { + return ((ID(__thiscall*)(CActorPool*, ::CPed*))GetAddress(0x18B0))(this, pGamePed); +} + +BOOL CActorPool::Create(ActorInfo* pInfo) { + return ((BOOL(__thiscall*)(CActorPool*, ActorInfo*))GetAddress(0x1900))(this, pInfo); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CAudio.cpp b/src/sampapi/0.3.DL-1/CAudio.cpp new file mode 100644 index 00000000..9e5426d2 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CAudio.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CAudio.h" + +SAMPAPI_BEGIN_V03DL_1 + +int CAudio::GetRadioStation() { + return ((int(__thiscall*)(CAudio*))GetAddress(0xA2030))(this); +} + +void CAudio::StartRadio(int nStation) { + ((void(__thiscall*)(CAudio*, int))GetAddress(0xA2060))(this, nStation); +} + +void CAudio::StopRadio() { + ((void(__thiscall*)(CAudio*))GetAddress(0xA2260))(this); +} + +float CAudio::GetRadioVolume() { + return ((float(__thiscall*)(CAudio*))GetAddress(0xA20A0))(this); +} + +void CAudio::StopOutdoorAmbienceTrack() { + ((void(__thiscall*)(CAudio*))GetAddress(0xA20B0))(this); +} + +void CAudio::SetOutdoorAmbienceTrack(int nSound) { + ((void(__thiscall*)(CAudio*, int))GetAddress(0xA20C0))(this, nSound); +} + +bool CAudio::IsOutdoorAmbienceTrackDisabled() { + return ((bool(__thiscall*)(CAudio*))GetAddress(0xA21C0))(this); +} + +void CAudio::Play(int nSound, CVector location) { + ((void(__thiscall*)(CAudio*, int, CVector))GetAddress(0xA20E0))(this, nSound, location); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CAudioStream.cpp b/src/sampapi/0.3.DL-1/CAudioStream.cpp new file mode 100644 index 00000000..e0278dd5 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CAudioStream.cpp @@ -0,0 +1,90 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CAudioStream.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR int& CAudioStream::RefStream() { + return *(int*)GetAddress(0x16C7CC); +} + +SAMPAPI_VAR bool& CAudioStream::RefIsPlaying() { + return *(bool*)GetAddress(0x16C7D0); +} + +SAMPAPI_VAR CVector& CAudioStream::RefPosition() { + return *(CVector*)GetAddress(0x16C7D4); +} + +SAMPAPI_VAR bool& CAudioStream::RefIs3d() { + return *(bool*)GetAddress(0x16C7E0); +} + +SAMPAPI_VAR char* CAudioStream::ArrayIcyUrl() { + return (char*)GetAddress(0x16C6C8); +} + +SAMPAPI_VAR char* CAudioStream::ArrayInfo() { + return (char*)GetAddress(0x16C5C0); +} + +SAMPAPI_VAR char* CAudioStream::ArrayUrl() { + return (char*)GetAddress(0x16C4B8); +} + +SAMPAPI_VAR bool& CAudioStream::RefNeedsToDestroy() { + return *(bool*)GetAddress(0x1407BA); +} + +SAMPAPI_VAR float& CAudioStream::RefRadius() { + return *(float*)GetAddress(0x1407BC); +} + +SAMPAPI_VAR char* CAudioStream::ArrayIcyName() { + return (char*)GetAddress(0x16C3B0); +} + +SAMPAPI_VAR CAudioStream*& RefAudioStream() { + return *(CAudioStream**)GetAddress(0x2ACA1C); +} + +BOOL CAudioStream::Reset() { + return ((BOOL(__thiscall*)(CAudioStream*))GetAddress(0x65F00))(this); +} + +BOOL CAudioStream::Stop(bool bWait) { + return ((BOOL(__thiscall*)(CAudioStream*, bool))GetAddress(0x65FE0))(this, bWait); +} + +BOOL CAudioStream::Play(const char* szUrl, CVector position, float fRadius, bool bIs3d) { + return ((BOOL(__thiscall*)(CAudioStream*, const char*, CVector, float, bool))GetAddress(0x663E0))(this, szUrl, position, fRadius, bIs3d); +} + +void CAudioStream::ControlGameRadio() { + ((void(__thiscall*)(CAudioStream*))GetAddress(0x66500))(this); +} + +void CAudioStream::DrawInfo() { + ((void(__thiscall*)(CAudioStream*))GetAddress(0x66530))(this); +} + +void CAudioStream::ConstructInfo() { + ((void(__cdecl*)())GetAddress(0x66040))(); +} + +void CAudioStream::SyncProc(int handle, int channel, int data, void* user) { + ((void(__stdcall*)(int, int, int, void*))GetAddress(0x66170))(handle, channel, data, user); +} + +void CAudioStream::Process(void* arglist) { + ((void(__cdecl*)(void*))GetAddress(0x66180))(arglist); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CCamera.cpp b/src/sampapi/0.3.DL-1/CCamera.cpp new file mode 100644 index 00000000..c73167c2 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CCamera.cpp @@ -0,0 +1,74 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CCamera.h" + +SAMPAPI_BEGIN_V03DL_1 + +CCamera::CCamera() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9FDA0))(this); +} + +CCamera::~CCamera() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9FDB0))(this); +} + +void CCamera::Fade(BOOL bIn) { + ((void(__thiscall*)(CCamera*, BOOL))GetAddress(0x9D280))(this, bIn); +} + +void CCamera::GetMatrix(CMatrix* pMatrix) { + ((void(__thiscall*)(CCamera*, CMatrix*))GetAddress(0x9D2A0))(this, pMatrix); +} + +void CCamera::SetMatrix(CMatrix matrix) { + ((void(__thiscall*)(CCamera*, CMatrix))GetAddress(0x9D320))(this, matrix); +} + +void CCamera::TakeControl(::CEntity* pTarget, short nModeToGoTo, short nTypeOfSwitch) { + ((void(__thiscall*)(CCamera*, ::CEntity*, short, short))GetAddress(0x9D3B0))(this, pTarget, nModeToGoTo, nTypeOfSwitch); +} + +void CCamera::SetMoveVector(CVector* pCamera, CVector* pPosition, int nTime, bool bSmoothTransmition) { + ((void(__thiscall*)(CCamera*, CVector*, CVector*, int, bool))GetAddress(0x9D3D0))(this, pCamera, pPosition, nTime, bSmoothTransmition); +} + +void CCamera::SetTrackVector(CVector* pPointAt, CVector* pTransverseTo, int nTime, bool bSmooth) { + ((void(__thiscall*)(CCamera*, CVector*, CVector*, int, bool))GetAddress(0x9D440))(this, pPointAt, pTransverseTo, nTime, bSmooth); +} + +void CCamera::Attach(CEntity* pOwner) { + ((void(__thiscall*)(CCamera*, CEntity*))GetAddress(0x9D4A0))(this, pOwner); +} + +void CCamera::SetToOwner() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9D4F0))(this); +} + +float CCamera::GetDistanceToPoint(CVector* pPoint) { + return ((float(__thiscall*)(CCamera*, CVector*))GetAddress(0x9D540))(this, pPoint); +} + +void CCamera::Restore() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9D580))(this); +} + +void CCamera::Set(CVector position, CVector rotation) { + ((void(__thiscall*)(CCamera*, CVector, CVector))GetAddress(0x9D5C0))(this, position, rotation); +} + +void CCamera::PointAt(CVector point, int nSwitchStyle) { + ((void(__thiscall*)(CCamera*, CVector, int))GetAddress(0x9D620))(this, point, nSwitchStyle); +} + +void CCamera::Detach() { + ((void(__thiscall*)(CCamera*))GetAddress(0x9D670))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CChat.cpp b/src/sampapi/0.3.DL-1/CChat.cpp new file mode 100644 index 00000000..95f6735e --- /dev/null +++ b/src/sampapi/0.3.DL-1/CChat.cpp @@ -0,0 +1,110 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CChat.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CChat*& RefChat() { + return *(CChat**)GetAddress(0x2ACA10); +} + +CChat::CChat(IDirect3DDevice9* pDevice, CFonts* pFontRenderer, const char* szLogPath) { + ((void(__thiscall*)(CChat*, IDirect3DDevice9*, CFonts*, const char*))GetAddress(0x67DF0))(this, pDevice, pFontRenderer, szLogPath); +} + +void CChat::RecalcFontSize() { + ((void(__thiscall*)(CChat*))GetAddress(0x66B90))(this); +} + +void CChat::OnLostDevice() { + ((void(__thiscall*)(CChat*))GetAddress(0x66C10))(this); +} + +void CChat::UpdateScrollbar() { + ((void(__thiscall*)(CChat*))GetAddress(0x66C70))(this); +} + +void CChat::SetPageSize(int nValue) { + ((void(__thiscall*)(CChat*, int))GetAddress(0x66D10))(this, nValue); +} + +void CChat::PageUp() { + ((void(__thiscall*)(CChat*))GetAddress(0x66D40))(this); +} + +void CChat::PageDown() { + ((void(__thiscall*)(CChat*))GetAddress(0x66DA0))(this); +} + +void CChat::ScrollToBottom() { + ((void(__thiscall*)(CChat*))GetAddress(0x66E00))(this); +} + +void CChat::Scroll(int nDelta) { + ((void(__thiscall*)(CChat*, int))GetAddress(0x66E30))(this, nDelta); +} + +void CChat::FilterOutInvalidChars(char* szString) { + ((void(__thiscall*)(CChat*, char*))GetAddress(0x66E90))(this, szString); +} + +void CChat::PushBack() { + ((void(__thiscall*)(CChat*))GetAddress(0x66EC0))(this); +} + +void CChat::RenderEntry(const char* szText, CRect rect, D3DCOLOR color) { + ((void(__thiscall*)(CChat*, const char*, CRect, D3DCOLOR))GetAddress(0x66EE0))(this, szText, rect, color); +} + +void CChat::Log(int nType, const char* szText, const char* szPrefix) { + ((void(__thiscall*)(CChat*, int, const char*, const char*))GetAddress(0x67240))(this, nType, szText, szPrefix); +} + +void CChat::ResetDialogControls(CDXUTDialog* pGameUi) { + ((void(__thiscall*)(CChat*, CDXUTDialog*))GetAddress(0x67310))(this, pGameUi); +} + +void CChat::Render() { + ((void(__thiscall*)(CChat*))GetAddress(0x673B0))(this); +} + +void CChat::AddEntry(int nType, const char* szText, const char* szPrefix, D3DCOLOR textColor, D3DCOLOR prefixColor) { + ((void(__thiscall*)(CChat*, int, const char*, const char*, D3DCOLOR, D3DCOLOR))GetAddress(0x67650))(this, nType, szText, szPrefix, textColor, prefixColor); +} + +void CChat::Draw() { + ((void(__thiscall*)(CChat*))GetAddress(0x67870))(this); +} + +void CChat::RenderToSurface() { + ((void(__thiscall*)(CChat*))GetAddress(0x67940))(this); +} + +void CChat::AddChatMessage(const char* szPrefix, D3DCOLOR prefixColor, const char* szText) { + ((void(__thiscall*)(CChat*, const char*, D3DCOLOR, const char*))GetAddress(0x67A90))(this, szPrefix, prefixColor, szText); +} + +void CChat::AddMessage(D3DCOLOR color, const char* szText) { + ((void(__thiscall*)(CChat*, D3DCOLOR, const char*))GetAddress(0x67BE0))(this, color, szText); +} + +void CChat::OnResetDevice() { + ((void(__thiscall*)(CChat*))GetAddress(0x67C40))(this); +} + +void CChat::SwitchMode() { + ((void(__thiscall*)(CChat*))GetAddress(0x60D40))(this); +} + +int CChat::GetMode() { + return ((int(__thiscall*)(CChat*))GetAddress(0x60D30))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CChatBubble.cpp b/src/sampapi/0.3.DL-1/CChatBubble.cpp new file mode 100644 index 00000000..e18e3e87 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CChatBubble.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CChatBubble.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CChatBubble*& RefChatBubble() { + return *(CChatBubble**)GetAddress(0x2ACA08); +} + +CChatBubble::CChatBubble() { + ((void(__thiscall*)(CChatBubble*))GetAddress(0x66860))(this); +} + +void CChatBubble::Add(ID nPlayer, const char* szText, D3DCOLOR color, float fDrawDistance, int lifeSpan) { + ((void(__thiscall*)(CChatBubble*, ID, const char*, D3DCOLOR, float, int))GetAddress(0x66890))(this, nPlayer, szText, color, fDrawDistance, lifeSpan); +} + +void CChatBubble::Draw() { + ((void(__thiscall*)(CChatBubble*))GetAddress(0x66950))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CConfig.cpp b/src/sampapi/0.3.DL-1/CConfig.cpp new file mode 100644 index 00000000..7302526d --- /dev/null +++ b/src/sampapi/0.3.DL-1/CConfig.cpp @@ -0,0 +1,94 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CConfig.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CConfig*& RefConfig() { + return *(CConfig**)GetAddress(0x2ACA0C); +} + +CConfig::CConfig(const char* szFile) { + ((void(__thiscall*)(CConfig*, const char*))GetAddress(0x65E60))(this, szFile); +} + +CConfig::~CConfig() { + ((void(__thiscall*)(CConfig*))GetAddress(0x65680))(this); +} + +void CConfig::FindFirstFree() { + ((void(__thiscall*)(CConfig*))GetAddress(0x656C0))(this); +} + +int CConfig::GetIndex(const char* szEntry) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65710))(this, szEntry); +} + +bool CConfig::DoesExist(const char* szEntry) { + return ((bool(__thiscall*)(CConfig*, const char*))GetAddress(0x65D30))(this, szEntry); +} + +int CConfig::CreateEntry(const char* szName) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x657B0))(this, szName); +} + +int CConfig::GetIntValue(const char* szEntry) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65890))(this, szEntry); +} + +const char* CConfig::GetStringValue(const char* szEntry) { + return ((const char*(__thiscall*)(CConfig*, const char*))GetAddress(0x658C0))(this, szEntry); +} + +float CConfig::GetFloatValue(const char* szEntry) { + return ((float(__thiscall*)(CConfig*, const char*))GetAddress(0x658F0))(this, szEntry); +} + +BOOL CConfig::Free(const char* szEntry) { + return ((BOOL(__thiscall*)(CConfig*, const char*))GetAddress(0x65920))(this, szEntry); +} + +int CConfig::GetValueType(const char* szEntry) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x65980))(this, szEntry); +} + +CConfig::ConfigEntry* CConfig::GetEntry(int nIndex) { + return ((ConfigEntry * (__thiscall*)(CConfig*, int)) GetAddress(0x659B0))(this, nIndex); +} + +int CConfig::GetType(const char* szString) { + return ((int(__thiscall*)(CConfig*, const char*))GetAddress(0x659E0))(this, szString); +} + +BOOL CConfig::Save() { + return ((BOOL(__thiscall*)(CConfig*))GetAddress(0x65A50))(this); +} + +BOOL CConfig::WriteIntValue(const char* szEntry, int nValue, BOOL bReadOnly) { + return ((BOOL(__thiscall*)(CConfig*, const char*, int, BOOL))GetAddress(0x65B00))(this, szEntry, nValue, bReadOnly); +} + +BOOL CConfig::WriteStringValue(const char* szEntry, const char* szValue, BOOL bReadOnly) { + return ((BOOL(__thiscall*)(CConfig*, const char*, const char*, BOOL))GetAddress(0x65B60))(this, szEntry, szValue, bReadOnly); +} + +BOOL CConfig::WriteFloatValue(const char* szEntry, float fValue, BOOL bReadOnly) { + return ((BOOL(__thiscall*)(CConfig*, const char*, float, BOOL))GetAddress(0x65C00))(this, szEntry, fValue, bReadOnly); +} + +void CConfig::Write(const char* szEntry, char* szBuffer) { + ((void(__thiscall*)(CConfig*, const char*, char*))GetAddress(0x65C60))(this, szEntry, szBuffer); +} + +BOOL CConfig::Load() { + return ((BOOL(__thiscall*)(CConfig*))GetAddress(0x65CF0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CCustomModels.cpp b/src/sampapi/0.3.DL-1/CCustomModels.cpp new file mode 100644 index 00000000..6b4521a8 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CCustomModels.cpp @@ -0,0 +1,76 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CCustomModels.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CCustomModels*& RefCustomModels() { + return *(CCustomModels**)GetAddress(0x2ACA28); +} + +CCustomModels::CCustomModels(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CCustomModels*, IDirect3DDevice9*))GetAddress(0xD890))(this, pDevice); +} + +CCustomModels::~CCustomModels() {} + +bool CCustomModels::InitDirectory() { + return ((bool(__thiscall*)(CCustomModels*))GetAddress(0xBA40))(this); +} + +bool CCustomModels::DoesDffExist(unsigned int nDffIndex) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xBB10))(this, nDffIndex); +} + +bool CCustomModels::DoesTxdExist(unsigned int nTxdIndex) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xBBA0))(this, nTxdIndex); +} + +bool CCustomModels::DeleteDff(unsigned int nDffIndex) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xC100))(this, nDffIndex); +} + +bool CCustomModels::DeleteTxd(unsigned int nTxdIndex) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xC140))(this, nTxdIndex); +} + +bool CCustomModels::DeleteTempFile(const char* szFileName) { + return ((bool(__thiscall*)(CCustomModels*, const char*))GetAddress(0xC180))(this, szFileName); +} + +bool CCustomModels::LoadModel(unsigned int nStandartModelId, unsigned int nCustomModelId, unsigned int nDffIndex, unsigned int nTxdIndex) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int, unsigned int, unsigned int, unsigned int))GetAddress(0xC1C0))(this, nStandartModelId, nCustomModelId, nDffIndex, nTxdIndex); +} + +CCustomModelInfo* CCustomModels::GetModelInfo(unsigned int nId) { + return ((CCustomModelInfo*(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xC410))(this, nId); +} + +int CCustomModels::GetCount() { + return ((int(__thiscall*)(CCustomModels*))GetAddress(0xC430))(this); +} + +bool CCustomModels::ResizePool(unsigned int nId) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xC4E0))(this, nId); +} + +bool CCustomModels::DoesExist(unsigned int nId) { + return ((bool(__thiscall*)(CCustomModels*, unsigned int))GetAddress(0xCE30))(this, nId); +} + +void CCustomModels::PushBack(unsigned int nId, CCustomModelInfo* pModelInfo) { + ((void(__thiscall*)(CCustomModels*, unsigned int, CCustomModelInfo*))GetAddress(0xCFF0))(this, nId, pModelInfo); +} + +void CCustomModels::SetModelInfo(unsigned int nId, CCustomModelInfo* pModelInfo) { + ((void(__thiscall*)(CCustomModels*, unsigned int, CCustomModelInfo*))GetAddress(0xD550))(this, nId, pModelInfo); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CDeathWindow.cpp b/src/sampapi/0.3.DL-1/CDeathWindow.cpp new file mode 100644 index 00000000..e3664cdf --- /dev/null +++ b/src/sampapi/0.3.DL-1/CDeathWindow.cpp @@ -0,0 +1,66 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CDeathWindow.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CDeathWindow*& RefDeathWindow() { + return *(CDeathWindow**)GetAddress(0x26EB88); +} + +CDeathWindow::CDeathWindow(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CDeathWindow*, IDirect3DDevice9*))GetAddress(0x6A650))(this, pDevice); +} + +CDeathWindow::~CDeathWindow() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x69B40))(this); +} + +void CDeathWindow::InitializeAuxFonts() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x69BB0))(this); +} + +void CDeathWindow::PushBack() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x69C20))(this); +} + +void CDeathWindow::DrawText(const char* szText, CRect rect, D3DCOLOR color, int nFormat) { + ((void(__thiscall*)(CDeathWindow*, const char*, CRect, D3DCOLOR, int))GetAddress(0x69C40))(this, szText, rect, color, nFormat); +} + +void CDeathWindow::DrawWeaponSprite(const char* szSpriteId, CRect rect, D3DCOLOR color) { + ((void(__thiscall*)(CDeathWindow*, const char*, CRect, D3DCOLOR))GetAddress(0x69D40))(this, szSpriteId, rect, color); +} + +void CDeathWindow::GetWeaponSpriteRectSize(void* pPoint) { + ((void(__thiscall*)(CDeathWindow*, void*))GetAddress(0x69DD0))(this, pPoint); +} + +const char* CDeathWindow::GetWeaponSpriteId(char nWeapon) { + return ((const char*(__thiscall*)(CDeathWindow*, char))GetAddress(0x69E50))(this, nWeapon); +} + +void CDeathWindow::ResetFonts() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x6A150))(this); +} + +void CDeathWindow::Draw() { + ((void(__thiscall*)(CDeathWindow*))GetAddress(0x6A2E0))(this); +} + +void CDeathWindow::AddEntry(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon) { + ((void(__thiscall*)(CDeathWindow*, const char*, const char*, D3DCOLOR, D3DCOLOR, char))GetAddress(0x6A5D0))(this, szKiller, szVictim, killerColor, victimColor, nWeapon); +} + +void CDeathWindow::AddMessage(const char* szKiller, const char* szVictim, D3DCOLOR killerColor, D3DCOLOR victimColor, char nWeapon) { + ((void(__thiscall*)(CDeathWindow*, const char*, const char*, D3DCOLOR, D3DCOLOR, char))GetAddress(0x6A6B0))(this, szKiller, szVictim, killerColor, victimColor, nWeapon); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CDialog.cpp b/src/sampapi/0.3.DL-1/CDialog.cpp new file mode 100644 index 00000000..9ee09482 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CDialog.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CDialog.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CDialog*& RefDialog() { + return *(CDialog**)GetAddress(0x2AC9E0); +} + +CDialog::CDialog(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CDialog*, IDirect3DDevice9*))GetAddress(0x6EEC0))(this, pDevice); +} + +void CDialog::GetScreenRect(CRect* pRect) { + ((void(__thiscall*)(CDialog*, CRect*))GetAddress(0x6F0F0))(this, pRect); +} + +int CDialog::GetTextScreenLength(const char* szString) { + return ((int(__thiscall*)(CDialog*, const char*))GetAddress(0x6F120))(this, szString); +} + +void CDialog::Hide() { + ((void(__thiscall*)(CDialog*))GetAddress(0x6F2A0))(this); +} + +void CDialog::ResetDialogControls(CDXUTDialog* pDialog) { + ((void(__thiscall*)(CDialog*, CDXUTDialog*))GetAddress(0x6F460))(this, pDialog); +} + +void CDialog::Show(int nId, int nType, const char* szCaption, const char* szText, const char* szLeftButton, const char* szRightButton, BOOL bServerside) { + ((void(__thiscall*)(CDialog*, int, int, const char*, const char*, const char*, const char*, BOOL))GetAddress(0x6FA50))(this, nId, nType, szCaption, szText, szLeftButton, szRightButton, bServerside); +} + +void CDialog::Close(char nProcessButton) { + ((void(__thiscall*)(CDialog*, char))GetAddress(0x700D0))(this, nProcessButton); +} + +void CDialog::Draw() { + ((void(__thiscall*)(CDialog*))GetAddress(0x6F2D0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CDownloadWindow.cpp b/src/sampapi/0.3.DL-1/CDownloadWindow.cpp new file mode 100644 index 00000000..f28e4c10 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CDownloadWindow.cpp @@ -0,0 +1,75 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CDownloadWindow.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CDownloadWindow*& RefDownloadWindow() { + return *(CDownloadWindow**)GetAddress(0x2AC9E8); +} + +CDownloadWindow::CDownloadWindow(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CDownloadWindow*, IDirect3DDevice9*))GetAddress(0x6AA10))(this, pDevice); +} + +CDownloadWindow::~CDownloadWindow() { + ((void(__thiscall*)(CDownloadWindow*))GetAddress(0x6A6E0))(this); +} + +void CDownloadWindow::GetScreenRect(CRect* pRect) { + ((void(__thiscall*)(CDownloadWindow*, CRect*))GetAddress(0x6A280))(this, pRect); +} + +void CDownloadWindow::DoesExist(int nFileId) { + ((void(__thiscall*)(CDownloadWindow*, int))GetAddress(0x6A610))(this, nFileId); +} + +void CDownloadWindow::AddEntry(char nFileType, int nFileId, char nFileState, int nFileDownloaded, int nFileRemainDownload, int a7) { + ((void(__thiscall*)(CDownloadWindow*, char, int, char, int, int, int))GetAddress(0x6A720))(this, nFileType, nFileId, nFileState, nFileDownloaded, nFileRemainDownload, a7); +} + +void CDownloadWindow::Show() { + ((void(__thiscall*)(CDownloadWindow*))GetAddress(0x6A2B0))(this); +} + +void CDownloadWindow::ResetDialogControl(CDXUTDialog* pDialog) { + ((void(__thiscall*)(CDownloadWindow*, CDXUTDialog*))GetAddress(0x6A6E0))(this, pDialog); +} + +void CDownloadWindow::Draw() { + ((void(__thiscall*)(CDownloadWindow*))GetAddress(0x6A350))(this); +} + +void CDownloadWindow::FreePool() { + ((void(__thiscall*)(CDownloadWindow*))GetAddress(0x6A6E0))(this); +} + +void CDownloadWindow::PushBack(DownloadedFileInfo* pInfo) { + ((void(__thiscall*)(CDownloadWindow*, DownloadedFileInfo*))GetAddress(0x6A650))(this, pInfo); +} + +void CDownloadWindow::DeleteFile(unsigned int nId) { + ((void(__thiscall*)(CDownloadWindow*, unsigned int))GetAddress(0x6A6B0))(this, nId); +} + +void CDownloadWindow::ResizePool(unsigned int nId) { + ((void(__thiscall*)(CDownloadWindow*, unsigned int))GetAddress(0x6A450))(this, nId); +} + +int CDownloadWindow::GetFilesCount() { + return ((int(__thiscall*)(CDownloadWindow*))GetAddress(0x6A440))(this); +} + + +DownloadedFileInfo* CDownloadWindow::GetFileInfo(unsigned int nId) { + return ((DownloadedFileInfo*(__thiscall*)(CDownloadWindow*, unsigned int))GetAddress(0x6A420))(this, nId); +} + +SAMPAPI_END \ No newline at end of file diff --git a/src/sampapi/0.3.DL-1/CEntity.cpp b/src/sampapi/0.3.DL-1/CEntity.cpp new file mode 100644 index 00000000..54d03d25 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CEntity.cpp @@ -0,0 +1,133 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CEntity.h" + +SAMPAPI_BEGIN_V03DL_1 + +CEntity::CEntity() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9BCE0))(this); +} + +CEntity::~CEntity() { +} + +void CEntity::GetMatrix(CMatrix* pMatrix) { + ((void(__thiscall*)(CEntity*, CMatrix*))GetAddress(0x9E950))(this, pMatrix); +} + +void CEntity::SetMatrix(CMatrix matrix) { + ((void(__thiscall*)(CEntity*, CMatrix))GetAddress(0x9EA00))(this, matrix); +} + +void CEntity::GetSpeed(CVector* pVec) { + ((void(__thiscall*)(CEntity*, CVector*))GetAddress(0x9EB20))(this, pVec); +} + +void CEntity::SetSpeed(CVector vec) { + ((void(__thiscall*)(CEntity*, CVector))GetAddress(0x9EB50))(this, vec); +} + +void CEntity::GetTurnSpeed(CVector* pVec) { + ((void(__thiscall*)(CEntity*, CVector*))GetAddress(0x9EC70))(this, pVec); +} + +void CEntity::SetTurnSpeed(CVector vec) { + ((void(__thiscall*)(CEntity*, CVector))GetAddress(0x9ECA0))(this, vec); +} + +void CEntity::ApplyTurnSpeed() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9ECD0))(this); +} + +float CEntity::GetDistanceFromCentreOfMassToBaseOfModel() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9ECF0))(this); +} + +void CEntity::GetBoundCentre(CVector* pVec) { + ((void(__thiscall*)(CEntity*, CVector*))GetAddress(0x9ED30))(this, pVec); +} + +void CEntity::SetModelIndex(int nModel) { + ((void(__thiscall*)(CEntity*, int))GetAddress(0x9ED90))(this, nModel); +} + +int CEntity::GetModelIndex() { + return ((int(__thiscall*)(CEntity*))GetAddress(0x9EE70))(this); +} + +void CEntity::Teleport(CVector position) { + ((void(__thiscall*)(CEntity*, CVector))GetAddress(0x9EE80))(this, position); +} + +float CEntity::GetDistanceToLocalPlayer() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9EF00))(this); +} + +float CEntity::GetDistanceToCamera() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9EFD0))(this); +} + +float CEntity::GetDistanceToPoint(CVector position) { + return ((float(__thiscall*)(CEntity*, CVector))GetAddress(0x9F0F0))(this, position); +} + +BOOL CEntity::DoesExist() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9F210))(this); +} + +BOOL CEntity::EnforceWorldBoundries(float fPX, float fZX, float fPY, float fNY) { + return ((BOOL(__thiscall*)(CEntity*, float, float, float, float))GetAddress(0x9F260))(this, fPX, fZX, fPY, fNY); +} + +BOOL CEntity::HasExceededWorldBoundries(float fPX, float fZX, float fPY, float fNY) { + return ((BOOL(__thiscall*)(CEntity*, float, float, float, float))GetAddress(0x9F400))(this, fPX, fZX, fPY, fNY); +} + +void CEntity::GetEulerInverted(float* x, float* y, float* z) { + ((void(__thiscall*)(CEntity*, float*, float*, float*))GetAddress(0x9F730))(this, x, y, z); +} + +BOOL CEntity::IsIgnored() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9FB20))(this); +} + +BOOL CEntity::IsStationary() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9FC20))(this); +} + +BOOL CEntity::GetCollisionFlag() { + return ((BOOL(__thiscall*)(CEntity*))GetAddress(0x9F4A0))(this); +} + +void CEntity::SetCollisionFlag(BOOL bEnable) { + ((void(__thiscall*)(CEntity*, BOOL))GetAddress(0x9F470))(this, bEnable); +} + +RwObject* CEntity::GetRwObject() { + return ((::RwObject * (__thiscall*)(CEntity*)) GetAddress(0x9F8A0))(this); +} + +void CEntity::DeleteRwObject() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9F9F0))(this); +} + +void CEntity::UpdateRwFrame() { + ((void(__thiscall*)(CEntity*))GetAddress(0x9EAC0))(this); +} + +float CEntity::GetDistanceToLocalPlayerNoHeight() { + return ((float(__thiscall*)(CEntity*))GetAddress(0x9F030))(this); +} + +void CEntity::SetCollisionProcessed(BOOL bProcessed) { + ((void(__thiscall*)(CEntity*, BOOL))GetAddress(0x9F4C0))(this, bProcessed); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CFont.cpp b/src/sampapi/0.3.DL-1/CFont.cpp new file mode 100644 index 00000000..ddffba3f --- /dev/null +++ b/src/sampapi/0.3.DL-1/CFont.cpp @@ -0,0 +1,23 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CFont.h" + +SAMPAPI_BEGIN_V03DL_1 + +CFont::CFont() { + ((void(__thiscall*)(CFont*))GetAddress(0x6B8D0))(this); +} + +CFont::CFont(ID3DXFont* pFont) { + *(void**)this = (void*)GetAddress(0xEA410); + m_pFont = pFont; +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CFonts.cpp b/src/sampapi/0.3.DL-1/CFonts.cpp new file mode 100644 index 00000000..b9a38818 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CFonts.cpp @@ -0,0 +1,58 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CFonts.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CFonts*& RefFontRenderer() { + return *(CFonts**)GetAddress(0x2ACA2C); +} + +CFonts::CFonts(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CFonts*, IDirect3DDevice9*))GetAddress(0x6B530))(this, pDevice); +} + +CFonts::~CFonts() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6AB40))(this); +} + +void CFonts::OnLostDevice() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6ABC0))(this); +} + +void CFonts::OnResetDevice() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6AC00))(this); +} + +void CFonts::GetTextScreenSize(void* pSize, const char* szText, int nFormat) { + ((void(__thiscall*)(CFonts*, void*, const char*, int))GetAddress(0x6AC40))(this, pSize, szText, nFormat); +} + +void CFonts::GetLittleTextScreenSize(void* pSize, const char* szText, int nFormat) { + ((void(__thiscall*)(CFonts*, void*, const char*, int))GetAddress(0x6ACF0))(this, pSize, szText, nFormat); +} + +void CFonts::DrawText(ID3DXSprite* pSprite, const char* szText, CRect rect, D3DCOLOR color, BOOL bShadow) { + ((void(__thiscall*)(CFonts*, ID3DXSprite*, const char*, CRect, D3DCOLOR, BOOL))GetAddress(0x6ADA0))(this, pSprite, szText, rect, color, bShadow); +} + +void CFonts::DrawLittleText(ID3DXSprite* pSprite, const char* szText, CRect rect, int nFormat, D3DCOLOR color, BOOL bShadow) { + ((void(__thiscall*)(CFonts*, ID3DXSprite*, const char*, CRect, int, D3DCOLOR, BOOL))GetAddress(0x6AF20))(this, pSprite, szText, rect, nFormat, color, bShadow); +} + +void CFonts::DrawLicensePlateText(const char* szText, CRect rect, D3DCOLOR color) { + ((void(__thiscall*)(CFonts*, const char*, CRect, D3DCOLOR))GetAddress(0x6B090))(this, szText, rect, color); +} + +void CFonts::Reset() { + ((void(__thiscall*)(CFonts*))GetAddress(0x6B320))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CGame.cpp b/src/sampapi/0.3.DL-1/CGame.cpp new file mode 100644 index 00000000..639ef84e --- /dev/null +++ b/src/sampapi/0.3.DL-1/CGame.cpp @@ -0,0 +1,314 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CGame.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR char*& CGame::RefGameTextMessage() { + return *(char**)GetAddress(0x18E1CC); +} + +SAMPAPI_VAR BOOL* CGame::ArrayUsedPlayerSlots() { + return (BOOL*)GetAddress(0x18E1D8); +} + +SAMPAPI_VAR CGame*& RefGame() { + return *(CGame**)GetAddress(0x2ACA3C); +} + +CGame::CGame() { + ((void(__thiscall*)(CGame*))GetAddress(0x9FDC0))(this); +} + +CPed* CGame::GetPlayerPed() { + return ((CPed * (__thiscall*)(CGame*)) GetAddress(0x1010))(this); +} + +float CGame::FindGroundZ(CVector vPoint) { + return ((float(__thiscall*)(CGame*, CVector))GetAddress(0xA0240))(this, vPoint); +} + +void CGame::SetCursorMode(int nMode, BOOL bImmediatelyHideCursor) { + ((void(__thiscall*)(CGame*, int, BOOL))GetAddress(0xA0530))(this, nMode, bImmediatelyHideCursor); +} + +void CGame::InitGame() { + ((void(__thiscall*)(CGame*))GetAddress(0xA06D0))(this); +} + +void CGame::StartGame() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0720))(this); +} + +BOOL CGame::IsMenuVisible() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0xA0760))(this); +} + +BOOL CGame::IsStarted() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0xA0770))(this); +} + +void CGame::RequestModel(int nModel, int nLoadingStream) { + ((void(__thiscall*)(CGame*, int, int))GetAddress(0xA0780))(this, nModel, nLoadingStream); +} + +void CGame::LoadRequestedModels() { + ((void(__thiscall*)(CGame*))GetAddress(0xA07A0))(this); +} + +BOOL CGame::IsModelAvailable(int nModel) { + return ((BOOL(__thiscall*)(CGame*, int))GetAddress(0xA07B0))(this, nModel); +} + +void CGame::ReleaseModel(int nModel, bool bGameFunc) { + ((void(__thiscall*)(CGame*, int, bool))GetAddress(0xA07E0))(this, nModel, bGameFunc); +} + +void CGame::SetWorldTime(char nHour, char nMinute) { + ((void(__thiscall*)(CGame*, char, char))GetAddress(0xA08F0))(this, nHour, nMinute); +} + +void CGame::GetWorldTime(char* nHour, char* nMinute) { + ((void(__thiscall*)(CGame*, char*, char*))GetAddress(0xA0920))(this, nHour, nMinute); +} + +void CGame::LetTimeGo(bool bLet) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA0940))(this, bLet); +} + +void CGame::SetWorldWeather(char nWeather) { + ((void(__thiscall*)(CGame*, char))GetAddress(0xA0980))(this, nWeather); +} + +void CGame::SetFrameLimiter(int nValue) { + ((void(__thiscall*)(CGame*, int))GetAddress(0xA09F0))(this, nValue); +} + +void CGame::SetMaxStats() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0A20))(this); +} + +void CGame::DisableTrainTraffic() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0A50))(this); +} + +void CGame::RefreshRenderer(float fX, float fY) { + ((void(__thiscall*)(CGame*, float, float))GetAddress(0xA0A60))(this, fX, fY); +} + +void CGame::RequestAnimation(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA0A90))(this, szFile); +} + +BOOL CGame::IsAnimationLoaded(const char* szFile) { + return ((BOOL(__thiscall*)(CGame*, const char*))GetAddress(0xA0AB0))(this, szFile); +} + +void CGame::ReleaseAnimation(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA0AD0))(this, szFile); +} + +void CGame::DisplayGameText(const char* szText, int nTime, int nSize) { + ((void(__thiscall*)(CGame*, const char*, int, int))GetAddress(0xA0B20))(this, szText, nTime, nSize); +} + +void CGame::DeleteRacingCheckpoint() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0B80))(this); +} + +GTAREF CGame::CreateMarker(int nIcon, CVector vPosition, int nColor, int nType) { + return ((GTAREF(__thiscall*)(CGame*, int, CVector, int, int))GetAddress(0xA0BB0))(this, nIcon, vPosition, nColor, nType); +} + +void CGame::DeleteMarker(GTAREF handle) { + ((void(__thiscall*)(CGame*, GTAREF))GetAddress(0xA0CE0))(this, handle); +} + +char CGame::GetCurrentInterior() { + return ((char(__thiscall*)(CGame*))GetAddress(0xA0D00))(this); +} + +void CGame::UpdateFarClippingPlane() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0D20))(this); +} + +void CGame::IncreasePlayerMoney(int nInc) { + ((void(__thiscall*)(CGame*, int))GetAddress(0xA0D90))(this, nInc); +} + +int CGame::GetPlayerMoney() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA0DB0))(this); +} + +const char* CGame::GetWeaponName(int nWeapon) { + return ((const char*(__thiscall*)(CGame*, int))GetAddress(0xA0DC0))(this, nWeapon); +} + +void CGame::CreatePickup(int nModel, int nType, CVector vPosition, GTAREF* handle) { + ((void(__thiscall*)(CGame*, int, int, CVector, GTAREF*))GetAddress(0xA1010))(this, nModel, nType, vPosition, handle); +} + +GTAREF CGame::CreateWeaponPickup(int nModel, int nAmmo, CVector vPosition) { + return ((GTAREF(__thiscall*)(CGame*, int, int, CVector))GetAddress(0xA10F0))(this, nModel, nAmmo, vPosition); +} + +IDirect3DDevice9* CGame::GetDevice() { + return ((IDirect3DDevice9 * (__thiscall*)(CGame*)) GetAddress(0xA1190))(this); +} + +void CGame::Restart() { + ((void(__thiscall*)(CGame*))GetAddress(0xA11D0))(this); +} + +CWeaponInfo* CGame::GetWeaponInfo(int nWeapon, int nSkill) { + return ((CWeaponInfo * (__thiscall*)(CGame*, int, int)) GetAddress(0xA1200))(this, nWeapon, nSkill); +} + +void CGame::SetWorldGravity(float fValue) { + ((void(__thiscall*)(CGame*, float))GetAddress(0xA1220))(this, fValue); +} + +void CGame::SetWantedLevel(char nLevel) { + ((void(__thiscall*)(CGame*, char))GetAddress(0xA1240))(this, nLevel); +} + +void CGame::SetNumberOfIntroTextLinesThisFrame(unsigned short nValue) { + ((void(__thiscall*)(CGame*, unsigned short))GetAddress(0xA1250))(this, nValue); +} + +void CGame::DrawGangZone(float* pPos, char nColor) { + ((void(__thiscall*)(CGame*, float*, char))GetAddress(0xA1260))(this, pPos, nColor); +} + +void CGame::EnableZoneDisplaying(bool bEnable) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA1340))(this, bEnable); +} + +void CGame::EnableStuntBonus(bool bEnable) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA1360))(this, bEnable); +} + +void CGame::LoadScene(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA13D0))(this, szFile); +} + +int CGame::GetUsedMemory() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA13F0))(this); +} + +int CGame::GetStreamingMemory() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA1400))(this); +} + +void CGame::SetRequiredVehicleModels(unsigned char* pModelCount) { + ((void(__thiscall*)(CGame*, unsigned char*))GetAddress(0xA1430))(this, pModelCount); +} + +int CGame::GetTimer() { + return ((int(__thiscall*)(CGame*))GetAddress(0xA1590))(this); +} + +void CGame::LoadAnimationsAndModels() { + ((void(__thiscall*)(CGame*))GetAddress(0xA16C0))(this); +} + +void CGame::LoadCollisionFile(const char* szFile) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA19A0))(this, szFile); +} + +void CGame::LoadCullZone(const char* szLine) { + ((void(__thiscall*)(CGame*, const char*))GetAddress(0xA19C0))(this, szLine); +} + +BOOL CGame::UsingGamepad() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0xA19E0))(this); +} + +void CGame::DisableAutoAiming() { + ((void(__thiscall*)(CGame*))GetAddress(0xA19F0))(this); +} + +void CGame::EnableHUD(BOOL bEnable) { + ((void(__thiscall*)(CGame*, BOOL))GetAddress(0xA1BD0))(this, bEnable); +} + +void CGame::SetCheckpoint(CVector* pPos, CVector* pSize) { + ((void(__thiscall*)(CGame*, CVector*, CVector*))GetAddress(0xA1C00))(this, pPos, pSize); +} + +void CGame::CreateRacingCheckpoint() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1CC0))(this); +} + +void CGame::ProcessCheckpoints() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1D40))(this); +} + +void CGame::ResetMoney() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1EE0))(this); +} + +void CGame::SetRacingCheckpoint(int nType, CVector* pCurrentPos, CVector* pNextPos, float fSize) { + ((void(__thiscall*)(CGame*, int, CVector*, CVector*, float))GetAddress(0xA1F20))(this, nType, pCurrentPos, pNextPos, fSize); +} + +void CGame::EnableRadar(BOOL bEnable) { + ((void(__thiscall*)(CGame*, BOOL))GetAddress(0xA0B00))(this, bEnable); +} + +void* CGame::GetWindowHandle() { + return ((void*(__thiscall*)(CGame*))GetAddress(0x2D40))(this); +} + +CAudio* CGame::GetAudio() { + return ((CAudio * (__thiscall*)(CGame*)) GetAddress(0x2D50))(this); +} + +CCamera* CGame::GetCamera() { + return ((CCamera * (__thiscall*)(CGame*)) GetAddress(0x2D60))(this); +} + +BOOL CGame::DoesHeadMoves() { + return ((BOOL(__thiscall*)(CGame*))GetAddress(0x2D70))(this); +} + +void CGame::EnableClock(bool bEnable) { + ((void(__thiscall*)(CGame*, bool))GetAddress(0xA1280))(this, bEnable); +} + +void CGame::Sleep(int elapsed, int fpsLimit) { + ((void(__thiscall*)(CGame*, int, int))GetAddress(0x9FED0))(this, elapsed, fpsLimit); +} + +CPed* CGame::CreatePed(int nModel, CVector position, float fRotation, int a6, int a7) { + return ((CPed * (__thiscall*)(CGame*, int, CVector, float, int, int)) GetAddress(0x9FF50))(this, nModel, position, fRotation, a6, a7); +} + +BOOL CGame::RemovePed(CPed* pPed) { + return ((BOOL(__thiscall*)(CGame*, CPed*))GetAddress(0xA0050))(this, pPed); +} + +CVehicle* CGame::CreateVehicle(int nModel, CVector position, float fRotation, BOOL bHasSiren) { + return ((CVehicle * (__thiscall*)(CGame*, int, CVector, float, BOOL)) GetAddress(0xA0090))(this, nModel, position, fRotation, bHasSiren); +} + +CObject* CGame::CreateObject(int nModel, CVector position, CVector rotation, float fDrawDistance, char a11, char a12) { + return ((CObject * (__thiscall*)(CGame*, int, CVector, CVector, float, char, char)) GetAddress(0xA0170))(this, nModel, position, rotation, fDrawDistance, a11, a12); +} + +void CGame::ProcessInputEnabling() { + ((void(__thiscall*)(CGame*))GetAddress(0xA0410))(this); +} + +void CGame::ProcessFrameLimiter() { + ((void(__thiscall*)(CGame*))GetAddress(0xA1A30))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CGangZonePool.cpp b/src/sampapi/0.3.DL-1/CGangZonePool.cpp new file mode 100644 index 00000000..f6f7b8ae --- /dev/null +++ b/src/sampapi/0.3.DL-1/CGangZonePool.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CGangZonePool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CGangZonePool::CGangZonePool() { + ((void(__thiscall*)(CGangZonePool*))GetAddress(0x2150))(this); +} + +CGangZonePool::~CGangZonePool() { + ((void(__thiscall*)(CGangZonePool*))GetAddress(0x2180))(this); +} + +void CGangZonePool::Create(ID nId, float left, float top, float right, float bottom, D3DCOLOR color) { + ((void(__thiscall*)(CGangZonePool*, ID, float, float, float, float, D3DCOLOR))GetAddress(0x21B0))(this, nId, left, top, right, bottom, color); +} + +void CGangZonePool::StartFlashing(ID nId, D3DCOLOR color) { + ((void(__thiscall*)(CGangZonePool*, ID, D3DCOLOR))GetAddress(0x2230))(this, nId, color); +} + +void CGangZonePool::StopFlashing(ID nId) { + ((void(__thiscall*)(CGangZonePool*, ID))GetAddress(0x2250))(this, nId); +} + +void CGangZonePool::Delete(ID nId) { + ((void(__thiscall*)(CGangZonePool*, ID))GetAddress(0x2270))(this, nId); +} + +void CGangZonePool::Draw() { + ((void(__thiscall*)(CGangZonePool*))GetAddress(0x22A0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CHelpDialog.cpp b/src/sampapi/0.3.DL-1/CHelpDialog.cpp new file mode 100644 index 00000000..4027137e --- /dev/null +++ b/src/sampapi/0.3.DL-1/CHelpDialog.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CHelpDialog.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CHelpDialog*& RefHelpDialog() { + return *(CHelpDialog**)GetAddress(0x2ACA04); +} + +CHelpDialog::CHelpDialog(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CHelpDialog*, IDirect3DDevice9*))GetAddress(0x6B566))(this, pDevice); +} + +void CHelpDialog::Show() { + ((void(__thiscall*)(CHelpDialog*))GetAddress(0x6B570))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CHttpClient.cpp b/src/sampapi/0.3.DL-1/CHttpClient.cpp new file mode 100644 index 00000000..370fb020 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CHttpClient.cpp @@ -0,0 +1,58 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CHttpClient.h" + +SAMPAPI_BEGIN_V03DL_1 + +CHttpClient::CHttpClient() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2310))(this); +} + +CHttpClient::~CHttpClient() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2370))(this); +} + +bool CHttpClient::GetHeaderValue(const char* szHeaderName, char* szBuffer, int nBufferLen) { + return ((bool(__thiscall*)(CHttpClient*, const char*, char*, int))GetAddress(0x23E0))(this, szHeaderName, szBuffer, nBufferLen); +} + +void CHttpClient::InitializeRequest(int nType, const char* szUrl, const char* szPostData, const char* szReferer) { + ((void(__thiscall*)(CHttpClient*, int, const char*, const char*, const char*))GetAddress(0x24E0))(this, nType, szUrl, szPostData, szReferer); +} + +void CHttpClient::HandleEntity() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x26B0))(this); +} + +bool CHttpClient::Connect(const char* szHost, int nPort) { + return ((bool(__thiscall*)(CHttpClient*, const char*, int))GetAddress(0x29D0))(this, szHost, nPort); +} + +void CHttpClient::Process() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2A90))(this); +} + +void CHttpClient::Disconnect() { + ((void(__thiscall*)(CHttpClient*))GetAddress(0x2470))(this); +} + +CHttpClient::ErrorCode CHttpClient::ProcessUrl(int nType, const char* szUrl, const char* szPostData, const char* szReferer) { + return ((ErrorCode(__thiscall*)(CHttpClient*, int, const char*, const char*, const char*))GetAddress(0x2C70))(this, nType, szUrl, szPostData, szReferer); +} + +bool CHttpClient::Send(const char* szBuffer) { + return ((bool(__thiscall*)(CHttpClient*, const char*))GetAddress(0x2480))(this, szBuffer); +} + +int CHttpClient::Receive(char* szBuffer, int nBufferLen) { + return ((int(__thiscall*)(CHttpClient*, char*, int))GetAddress(0x24C0))(this, szBuffer, nBufferLen); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CInput.cpp b/src/sampapi/0.3.DL-1/CInput.cpp new file mode 100644 index 00000000..5577ca66 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CInput.cpp @@ -0,0 +1,78 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CInput.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CInput*& RefInputBox() { + return *(CInput**)GetAddress(0x2ACA14); +} + +CInput::CInput(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CInput*, IDirect3DDevice9*))GetAddress(0x68E10))(this, pDevice); +} + +void CInput::GetRect(CRect* pRect) { + ((void(__thiscall*)(CInput*, CRect*))GetAddress(0x68E80))(this, pRect); +} + +void CInput::Open() { + ((void(__thiscall*)(CInput*))GetAddress(0x68EC0))(this); +} + +void CInput::Close() { + ((void(__thiscall*)(CInput*))GetAddress(0x68FC0))(this); +} + +void CInput::AddRecall(const char* szString) { + ((void(__thiscall*)(CInput*, const char*))GetAddress(0x69010))(this, szString); +} + +void CInput::RecallUp() { + ((void(__thiscall*)(CInput*))GetAddress(0x69070))(this); +} + +void CInput::RecallDown() { + ((void(__thiscall*)(CInput*))GetAddress(0x690E0))(this); +} + +void CInput::EnableCursor() { + ((void(__thiscall*)(CInput*))GetAddress(0x69130))(this); +} + +CMDPROC CInput::GetCommandHandler(const char* szName) { + return ((CMDPROC(__thiscall*)(CInput*, const char*))GetAddress(0x69150))(this, szName); +} + +void CInput::SetDefaultCommand(CMDPROC proc) { + ((void(__thiscall*)(CInput*, CMDPROC))GetAddress(0x691A0))(this, proc); +} + +void CInput::AddCommand(const char* szName, CMDPROC handler) { + ((void(__thiscall*)(CInput*, const char*, CMDPROC))GetAddress(0x691B0))(this, szName, handler); +} + +BOOL CInput::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CInput*, int, int, int))GetAddress(0x69210))(this, uMsg, wParam, lParam); +} + +void CInput::ResetDialogControls(CDXUTDialog* pGameUi) { + ((void(__thiscall*)(CInput*, CDXUTDialog*))GetAddress(0x69280))(this, pGameUi); +} + +void CInput::Send(const char* szString) { + ((void(__thiscall*)(CInput*, const char*))GetAddress(0x69340))(this, szString); +} + +void CInput::ProcessInput() { + ((void(__thiscall*)(CInput*))GetAddress(0x69410))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CLabel.cpp b/src/sampapi/0.3.DL-1/CLabel.cpp new file mode 100644 index 00000000..8db2cc51 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CLabel.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CLabel.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CLabel*& RefLabel() { + return *(CLabel**)GetAddress(0x2AC9EC); +} + +CLabel::CLabel(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CLabel*, IDirect3DDevice9*))GetAddress(0x6B5F0))(this, pDevice); +} + +CLabel::~CLabel() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6B610))(this); +} + +void CLabel::OnLostDevice() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6B630))(this); +} + +void CLabel::OnResetDevice() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6B640))(this); +} + +BOOL CLabel::HasNoObstacles(CVector position) { + return ((BOOL(__thiscall*)(CLabel*, CVector))GetAddress(0x6B650))(this, position); +} + +void CLabel::Begin() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6B6B0))(this); +} + +void CLabel::End() { + ((void(__thiscall*)(CLabel*))GetAddress(0x6B6C0))(this); +} + +void CLabel::Draw(CVector* pPosition, const char* szText, D3DCOLOR color, BOOL bShadow, bool bNoObstacles) { + ((void(__thiscall*)(CLabel*, CVector*, const char*, D3DCOLOR, BOOL, bool))GetAddress(0x6B6D0))(this, pPosition, szText, color, bShadow, bNoObstacles); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CLabelPool.cpp b/src/sampapi/0.3.DL-1/CLabelPool.cpp new file mode 100644 index 00000000..e22f7bb4 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CLabelPool.cpp @@ -0,0 +1,34 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CLabelPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CLabelPool::CLabelPool() { + ((void(__thiscall*)(CLabelPool*))GetAddress(0x1190))(this); +} + +CLabelPool::~CLabelPool() { + ((void(__thiscall*)(CLabelPool*))GetAddress(0x15E0))(this); +} + +void CLabelPool::Create(ID nId, const char* szText, D3DCOLOR color, CVector position, float fDrawDistance, bool bBehindWalls, ID nAttachedToPlayer, ID nAttachedToVehicle) { + ((void(__thiscall*)(CLabelPool*, ID, const char*, D3DCOLOR, CVector, float, bool, ID, ID))GetAddress(0x11D0))(this, nId, szText, color, position, fDrawDistance, bBehindWalls, nAttachedToPlayer, nAttachedToVehicle); +} + +BOOL CLabelPool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CLabelPool*, ID))GetAddress(0x12E0))(this, nId); +} + +void CLabelPool::Draw() { + ((void(__thiscall*)(CLabelPool*))GetAddress(0x1350))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CLicensePlate.cpp b/src/sampapi/0.3.DL-1/CLicensePlate.cpp new file mode 100644 index 00000000..61c6e3c2 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CLicensePlate.cpp @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CLicensePlate.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CLicensePlate*& RefLicensePlateManager() { + return *(CLicensePlate**)GetAddress(0x2ACA30); +} + +CLicensePlate::CLicensePlate(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CLicensePlate*, IDirect3DDevice9*))GetAddress(0x6D3F0))(this, pDevice); +} + +CLicensePlate::~CLicensePlate() { + ((void(__thiscall*)(CLicensePlate*))GetAddress(0x6D420))(this); +} + +void CLicensePlate::OnLostDevice() { + ((void(__thiscall*)(CLicensePlate*))GetAddress(0x6D1F0))(this); +} + +void CLicensePlate::OnResetDevice() { + ((void(__thiscall*)(CLicensePlate*))GetAddress(0x6D240))(this); +} + +IDirect3DTexture9* CLicensePlate::Create(const char* szText) { + return ((IDirect3DTexture9 * (__thiscall*)(CLicensePlate*, const char*)) GetAddress(0x6D2C0))(this, szText); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CLocalPlayer.cpp b/src/sampapi/0.3.DL-1/CLocalPlayer.cpp new file mode 100644 index 00000000..0df6c500 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CLocalPlayer.cpp @@ -0,0 +1,251 @@ + +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CLocalPlayer.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR int& CLocalPlayer::RefIncarSendrate() { + return *(int*)GetAddress(0x13C0AC); +} + +SAMPAPI_VAR int& CLocalPlayer::RefOnfootSendrate() { + return *(int*)GetAddress(0x13C0A8); +} + +SAMPAPI_VAR int& CLocalPlayer::RefFiringSendrate() { + return *(int*)GetAddress(0x13C0B0); +} + +SAMPAPI_VAR int& CLocalPlayer::RefSendMultiplier() { + return *(int*)GetAddress(0x13C0B4); +} + +CLocalPlayer::CLocalPlayer() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4AF0))(this); +} + +CPed* CLocalPlayer::GetPed() { + return ((CPed * (__thiscall*)(CLocalPlayer*)) GetAddress(0x2DA0))(this); +} + +void CLocalPlayer::ResetData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x2EC0))(this); +} + +void CLocalPlayer::ProcessHead() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x2FD0))(this); +} + +void CLocalPlayer::SetSpecialAction(char nId) { + ((void(__thiscall*)(CLocalPlayer*, char))GetAddress(0x3110))(this, nId); +} + +char CLocalPlayer::GetSpecialAction() { + return ((char(__thiscall*)(CLocalPlayer*))GetAddress(0x3390))(this); +} + +void CLocalPlayer::UpdateSurfing() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x34B0))(this); +} + +void CLocalPlayer::SetSurfing(CVehicle* pVehicle, BOOL bStuck) { + ((void(__thiscall*)(CLocalPlayer*, CVehicle*, BOOL))GetAddress(0x3630))(this, pVehicle, bStuck); +} + +void CLocalPlayer::ProcessSurfing() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3650))(this); +} + +BOOL CLocalPlayer::NeedsToUpdate(const void* pOld, const void* pNew, unsigned int nLen) { + return ((BOOL(__thiscall*)(CLocalPlayer*, const void*, const void*, unsigned int))GetAddress(0x3970))(this, pOld, pNew, nLen); +} + +int CLocalPlayer::GetIncarSendRate() { + return ((int(__thiscall*)(CLocalPlayer*))GetAddress(0x39C0))(this); +} + +int CLocalPlayer::GetOnfootSendRate() { + return ((int(__thiscall*)(CLocalPlayer*))GetAddress(0x3A00))(this); +} + +int CLocalPlayer::GetUnoccupiedSendRate() { + return ((int(__thiscall*)(CLocalPlayer*))GetAddress(0x3A40))(this); +} + +void CLocalPlayer::SetSpawnInfo(const SpawnInfo* pInfo) { + ((void(__thiscall*)(CLocalPlayer*, const SpawnInfo*))GetAddress(0x3AF0))(this, pInfo); +} + +BOOL CLocalPlayer::Spawn() { + return ((BOOL(__thiscall*)(CLocalPlayer*))GetAddress(0x3B20))(this); +} + +void CLocalPlayer::SetColor(D3DCOLOR color) { + ((void(__thiscall*)(CLocalPlayer*, D3DCOLOR))GetAddress(0x3DE0))(this, color); +} + +D3DCOLOR CLocalPlayer::GetColorAsRGBA() { + return ((D3DCOLOR(__thiscall*)(CLocalPlayer*))GetAddress(0x3E00))(this); +} + +D3DCOLOR CLocalPlayer::GetColorAsARGB() { + return ((D3DCOLOR(__thiscall*)(CLocalPlayer*))GetAddress(0x3E20))(this); +} + +void CLocalPlayer::ProcessOnfootWorldBounds() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3E40))(this); +} + +void CLocalPlayer::ProcessIncarWorldBounds() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3EA0))(this); +} + +void CLocalPlayer::RequestSpawn() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3F40))(this); +} + +void CLocalPlayer::PrepareForClassSelection() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x3F60))(this); +} + +void CLocalPlayer::PrepareForClassSelection_Outcome(BOOL bOutcome) { + ((void(__thiscall*)(CLocalPlayer*, BOOL))GetAddress(0x3FB0))(this, bOutcome); +} + +void CLocalPlayer::EnableSpectating(BOOL bEnable) { + ((void(__thiscall*)(CLocalPlayer*, BOOL))GetAddress(0x4080))(this, bEnable); +} + +void CLocalPlayer::SpectateForVehicle(ID nId) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x40F0))(this, nId); +} + +void CLocalPlayer::SpectateForPlayer(ID nId) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x4140))(this, nId); +} + +BOOL CLocalPlayer::NeedsToSendOnfootData(short controllerState, short sLeftStickX, short sLeftStickY) { + return ((BOOL(__thiscall*)(CLocalPlayer*, short, short, short))GetAddress(0x41C0))(this, controllerState, sLeftStickX, sLeftStickY); +} + +BOOL CLocalPlayer::NeedsToSendIncarData(short controllerState, short sLeftStickX, short sLeftStickY) { + return ((BOOL(__thiscall*)(CLocalPlayer*, short, short, short))GetAddress(0x41F0))(this, controllerState, sLeftStickX, sLeftStickY); +} + +bool CLocalPlayer::DefineCameraTarget(CameraTarget* pInfo) { + return ((bool(__thiscall*)(CLocalPlayer*, CameraTarget*))GetAddress(0x4300))(this, pInfo); +} + +void CLocalPlayer::UpdateCameraTarget() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x45C0))(this); +} + +void CLocalPlayer::DrawCameraTargetLabel() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4710))(this); +} + +void CLocalPlayer::SendUnoccupiedData(ID nVehicle, char arg4) { + ((void(__thiscall*)(CLocalPlayer*, ID, char))GetAddress(0x4BD0))(this, nVehicle, arg4); +} + +void CLocalPlayer::SendOnfootData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x4DB0))(this); +} + +void CLocalPlayer::SendAimData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5090))(this); +} + +void CLocalPlayer::SendTrailerData(ID nTrailer) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x5240))(this, nTrailer); +} + +void CLocalPlayer::SendPassengerData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5400))(this); +} + +void CLocalPlayer::WastedNotification() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5660))(this); +} + +void CLocalPlayer::RequestClass(int nId) { + ((void(__thiscall*)(CLocalPlayer*, int))GetAddress(0x5720))(this, nId); +} + +void CLocalPlayer::ChangeInterior(char nId) { + ((void(__thiscall*)(CLocalPlayer*, char))GetAddress(0x57C0))(this, nId); +} + +void CLocalPlayer::Chat(const char* szText) { + ((void(__thiscall*)(CLocalPlayer*, const char*))GetAddress(0x5860))(this, szText); +} + +void CLocalPlayer::EnterVehicle(int nVehicle, BOOL bPassenger) { + ((void(__thiscall*)(CLocalPlayer*, int, BOOL))GetAddress(0x5920))(this, nVehicle, bPassenger); +} + +void CLocalPlayer::ExitVehicle(int nVehicle) { + ((void(__thiscall*)(CLocalPlayer*, int))GetAddress(0x5A40))(this, nVehicle); +} + +void CLocalPlayer::SendStats() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5B50))(this); +} + +void CLocalPlayer::UpdateVehicleDamage(ID nVehicle) { + ((void(__thiscall*)(CLocalPlayer*, ID))GetAddress(0x5C20))(this, nVehicle); +} + +void CLocalPlayer::NextClass() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5E30))(this); +} + +void CLocalPlayer::PrevClass() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5EC0))(this); +} + +void CLocalPlayer::ProcessClassSelection() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5F40))(this); +} + +void CLocalPlayer::UpdateWeapons() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x5F40))(this); +} + +void CLocalPlayer::ProcessSpectating() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6360))(this); +} + +void CLocalPlayer::SendTakeDamage(int nId, float fDamage, int nWeapon, int nBodyPart) { + ((void(__thiscall*)(CLocalPlayer*, int, float, int, int))GetAddress(0x66B0))(this, nId, fDamage, nWeapon, nBodyPart); +} + +void CLocalPlayer::SendGiveDamage(int nId, float fDamage, int nWeapon, int nBodyPart) { + ((void(__thiscall*)(CLocalPlayer*, int, float, int, int))GetAddress(0x67C0))(this, nId, fDamage, nWeapon, nBodyPart); +} + +bool CLocalPlayer::ProcessUnoccupiedSync(ID nVehicle, CVehicle* pVehicle) { + return ((bool(__thiscall*)(CLocalPlayer*, ID, CVehicle*))GetAddress(0x6C10))(this, nVehicle, pVehicle); +} + +void CLocalPlayer::EnterVehicleAsPassenger() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6DE0))(this); +} + +void CLocalPlayer::SendIncarData() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x6E80))(this); +} + +void CLocalPlayer::Process() { + ((void(__thiscall*)(CLocalPlayer*))GetAddress(0x72D0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CMakeLists.txt b/src/sampapi/0.3.DL-1/CMakeLists.txt new file mode 100644 index 00000000..e2935838 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CMakeLists.txt @@ -0,0 +1,61 @@ +target_sources(sampapi + PRIVATE + AimStuff.cpp + CActor.cpp + CActorPool.cpp + CAudio.cpp + CAudioStream.cpp + CCamera.cpp + CChat.cpp + CChatBubble.cpp + CConfig.cpp + CDeathWindow.cpp + CDialog.cpp + CEntity.cpp + CFont.cpp + CFonts.cpp + CGame.cpp + CGangZonePool.cpp + CHelpDialog.cpp + CHttpClient.cpp + CInput.cpp + CLabel.cpp + CLabelPool.cpp + CLicensePlate.cpp + CLocalPlayer.cpp + CMenu.cpp + CMenuPool.cpp + CNetGame.cpp + CNetStats.cpp + CObject.cpp + CObjectMaterialText.cpp + CObjectPool.cpp + CObjectSelection.cpp + Commands.cpp + CPed.cpp + CPickupPool.cpp + CPlayerInfo.cpp + CPlayerPool.cpp + CPlayerTags.cpp + CRemotePlayer.cpp + CScoreboard.cpp + CSpawnScreen.cpp + CSrvNetStats.cpp + CTextDraw.cpp + CTextDrawPool.cpp + CTextDrawSelection.cpp + CVehicle.cpp + CVehiclePool.cpp + DebugScript.cpp + Exception.cpp + GUI.cpp + KeyStuff.cpp + Scripting.cpp + Settings.cpp + CObjectMaterialText.cpp + InputHandler.cpp + CObjectEdit.cpp + RPCHandlers.cpp + CDownloadWindow.cpp + CCustomModels.cpp +) diff --git a/src/sampapi/0.3.DL-1/CMenu.cpp b/src/sampapi/0.3.DL-1/CMenu.cpp new file mode 100644 index 00000000..ef1fe207 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CMenu.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CMenu.h" + +SAMPAPI_BEGIN_V03DL_1 + +CMenu::CMenu(float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const Interaction* pInteraction) { + ((void(__thiscall*)(CMenu*, float, float, char, float, float, const Interaction*))GetAddress(0xA7160))(this, fX, fY, nColumns, fFirstColumnWidth, fSecondColumnWidth, pInteraction); +} + +void CMenu::AddItem(NUMBER nColumn, NUMBER nRow, const char* szText) { + ((void(__thiscall*)(CMenu*, NUMBER, NUMBER, const char*))GetAddress(0xA7200))(this, nColumn, nRow, szText); +} + +void CMenu::SetColumnTitle(NUMBER nColumn, const char* szText) { + ((void(__thiscall*)(CMenu*, NUMBER, const char*))GetAddress(0xA7230))(this, nColumn, szText); +} + +void CMenu::Hide() { + ((void(__thiscall*)(CMenu*))GetAddress(0xA7260))(this); +} + +char* CMenu::GetItem(NUMBER nColumn, NUMBER nRow) { + return ((char*(__thiscall*)(CMenu*, NUMBER, NUMBER))GetAddress(0xA7280))(this, nColumn, nRow); +} + +char* CMenu::GetTitle() { + return ((char*(__thiscall*)(CMenu*))GetAddress(0xA72A0))(this); +} + +char* CMenu::MS(NUMBER nColumn, NUMBER nRow) { + return ((char*(__thiscall*)(CMenu*, NUMBER, NUMBER))GetAddress(0xA72D0))(this, nColumn, nRow); +} + +char CMenu::GetActiveRow() { + return ((char(__thiscall*)(CMenu*))GetAddress(0xA7300))(this); +} + +void CMenu::Show() { + ((void(__thiscall*)(CMenu*))GetAddress(0xA7330))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CMenuPool.cpp b/src/sampapi/0.3.DL-1/CMenuPool.cpp new file mode 100644 index 00000000..7db9b727 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CMenuPool.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CMenuPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CMenuPool::CMenuPool() { + ((void(__thiscall*)(CMenuPool*))GetAddress(0x7B40))(this); +} + +CMenuPool::~CMenuPool() { + ((void(__thiscall*)(CMenuPool*))GetAddress(0x7EB0))(this); +} + +CMenu* CMenuPool::Create(NUMBER nId, float fX, float fY, char nColumns, float fFirstColumnWidth, float fSecondColumnWidth, const CMenu::Interaction* pInteraction) { + return ((CMenu * (__thiscall*)(CMenuPool*, NUMBER, float, float, char, float, float, const CMenu::Interaction*)) GetAddress(0x7B90))(this, nId, fX, fY, nColumns, fFirstColumnWidth, fSecondColumnWidth, pInteraction); +} + +BOOL CMenuPool::Delete(NUMBER nId) { + return ((BOOL(__thiscall*)(CMenuPool*, NUMBER))GetAddress(0x7C60))(this, nId); +} + +void CMenuPool::Show(NUMBER nId) { + ((void(__thiscall*)(CMenuPool*, NUMBER))GetAddress(0x7CB0))(this, nId); +} + +void CMenuPool::Hide(NUMBER nId) { + ((void(__thiscall*)(CMenuPool*, NUMBER))GetAddress(0x7D10))(this, nId); +} + +char* CMenuPool::GetTextPointer(const char* szName) { + return ((char*(__thiscall*)(CMenuPool*, const char*))GetAddress(0x7D50))(this, szName); +} + +void CMenuPool::Process() { + ((void(__thiscall*)(CMenuPool*))GetAddress(0x7EF0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CNetGame.cpp b/src/sampapi/0.3.DL-1/CNetGame.cpp new file mode 100644 index 00000000..9ef79ba0 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CNetGame.cpp @@ -0,0 +1,238 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CNetGame.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CNetGame*& RefNetGame() { + return *(CNetGame**)GetAddress(0x2ACA24); +} + +SAMPAPI_VAR TICK& CNetGame::RefLastPlayersUpdateRequest() { + return *(TICK*)GetAddress(0x156B30); +} + +CNetGame::CNetGame(const char* szHostAddress, int nPort, const char* szNick, const char* szPass) { + ((void(__thiscall*)(CNetGame*, const char*, int, const char*, const char*))GetAddress(0xB610))(this, szHostAddress, nPort, szNick, szPass); +} + +CNetGame::~CNetGame() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9570))(this); +} + +CPickupPool* CNetGame::GetPickupPool() { + return ((CPickupPool * (__thiscall*)(CNetGame*)) GetAddress(0x81D0))(this); +} + +CMenuPool* CNetGame::GetMenuPool() { + return ((CMenuPool * (__thiscall*)(CNetGame*)) GetAddress(0x81E0))(this); +} + +void CNetGame::SetState(int nValue) { + ((void(__thiscall*)(CNetGame*, int))GetAddress(0x81F0))(this, nValue); +} + +void CNetGame::InitializePools() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8230))(this); +} + +void CNetGame::InitialNotification() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8450))(this); +} + +void CNetGame::InitializeGameLogic() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x85E0))(this); +} + +void CNetGame::Connect() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8630))(this); +} + +void CNetGame::SpawnScreen() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x86A0))(this); +} + +void CNetGame::Packet_RSAPublicKeyMismatch(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8A40))(this, pPacket); +} + +void CNetGame::Packet_ConnectionBanned(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8A60))(this, pPacket); +} + +void CNetGame::Packet_ConnectionRequestAcepted(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8A80))(this, pPacket); +} + +void CNetGame::Packet_NoFreeIncomingConnections(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8AA0))(this, pPacket); +} + +void CNetGame::Packet_DisconnectionNotification(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8AD0))(this, pPacket); +} + +void CNetGame::Packet_InvalidPassword(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8B10))(this, pPacket); +} + +void CNetGame::Packet_ConnectionAttemptFailed(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x8B50))(this, pPacket); +} + +void CNetGame::UpdatePlayers() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8C00))(this); +} + +void CNetGame::DeleteMarker(NUMBER nIndex) { + ((void(__thiscall*)(CNetGame*, NUMBER))GetAddress(0x8CA0))(this, nIndex); +} + +void CNetGame::ResetPlayerPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8CD0))(this); +} + +void CNetGame::ResetVehiclePool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8D70))(this); +} + +void CNetGame::ResetTextDrawPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8E10))(this); +} + +void CNetGame::ResetObjectPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8EB0))(this); +} + +void CNetGame::ResetGangZonePool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8F50))(this); +} + +void CNetGame::ResetPickupPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8FF0))(this); +} + +void CNetGame::ResetMenuPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9050))(this); +} + +void CNetGame::ResetLabelPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x90E0))(this); +} + +void CNetGame::ResetActorPool() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9180))(this); +} + +void CNetGame::Packet_UnoccupiedSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9730))(this, pPacket); +} + +void CNetGame::Packet_BulletSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9830))(this, pPacket); +} + +void CNetGame::Packet_AimSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9930))(this, pPacket); +} + +void CNetGame::Packet_PassengerSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9A20))(this, pPacket); +} + +void CNetGame::Packet_TrailerSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9B10))(this, pPacket); +} + +void CNetGame::Packet_MarkersSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9C00))(this, pPacket); +} + +void CNetGame::Packet_AuthKey(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0x9DF0))(this, pPacket); +} + +void CNetGame::ResetMarkers() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x9FB0))(this); +} + +void CNetGame::CreateMarker(NUMBER nIndex, CVector position, char nIcon, int nColor, int nType) { + ((void(__thiscall*)(CNetGame*, NUMBER, CVector, char, int, int))GetAddress(0x9FF0))(this, nIndex, position, nIcon, nColor, nType); +} + +void CNetGame::ResetPools() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xA1E0))(this); +} + +void CNetGame::ShutdownForRestart() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xA230))(this); +} + +void CNetGame::Packet_PlayerSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xA420))(this, pPacket); +} + +void CNetGame::Packet_VehicleSync(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xA6F0))(this, pPacket); +} + +void CNetGame::Packet_ConnectionLost(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xA9D0))(this, pPacket); +} + +void CNetGame::Packet_ConnectionSucceeded(Packet* pPacket) { + ((void(__thiscall*)(CNetGame*, Packet*))GetAddress(0xAA60))(this, pPacket); +} + +void CNetGame::UpdateNetwork() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xAF40))(this); +} + +void CNetGame::Process() { + ((void(__thiscall*)(CNetGame*))GetAddress(0xB290))(this); +} + +void CNetGame::ProcessGameStuff() { + ((void(__thiscall*)(CNetGame*))GetAddress(0x8810))(this); +} + +CPlayerPool* CNetGame::GetPlayerPool() { + return ((CPlayerPool * (__thiscall*)(CNetGame*)) GetAddress(0x1170))(this); +} + +CObjectPool* CNetGame::GetObjectPool() { + return ((CObjectPool * (__thiscall*)(CNetGame*)) GetAddress(0x2E40))(this); +} + +CActorPool* CNetGame::GetActorPool() { + return ((CActorPool * (__thiscall*)(CNetGame*)) GetAddress(0x2E50))(this); +} + +int CNetGame::GetState() { + return ((int(__thiscall*)(CNetGame*))GetAddress(0x2E60))(this); +} + +BOOL CNetGame::LanMode() { + return ((BOOL(__thiscall*)(CNetGame*))GetAddress(0x2E70))(this); +} + +CVehiclePool* CNetGame::GetVehiclePool() { + return ((CVehiclePool * (__thiscall*)(CNetGame*)) GetAddress(0x1180))(this); +} + +RakClientInterface* CNetGame::GetRakClient() { + return this->m_pRakClient; +} + +__int64 CNetGame::GetCounter() { + return ((__int64(__thiscall*)(CNetGame*))GetAddress(0x85D0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CNetStats.cpp b/src/sampapi/0.3.DL-1/CNetStats.cpp new file mode 100644 index 00000000..c72d13de --- /dev/null +++ b/src/sampapi/0.3.DL-1/CNetStats.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CNetStats.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CNetStats*& RefNetStats() { + return *(CNetStats**)GetAddress(0x2AC9FC); +} + +CNetStats::CNetStats(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CNetStats*, IDirect3DDevice9*))GetAddress(0x607C0))(this, pDevice); +} + +void CNetStats::Draw() { + ((void(__thiscall*)(CNetStats*))GetAddress(0x607F0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CObject.cpp b/src/sampapi/0.3.DL-1/CObject.cpp new file mode 100644 index 00000000..c92f87d3 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CObject.cpp @@ -0,0 +1,89 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CObject.h" + +SAMPAPI_BEGIN_V03DL_1 + +CObject::CObject(int nModel, CVector position, CVector rotation, float fDrawDistance, int a10, char a11, char a12) { + ((void(__thiscall*)(CObject*, int, CVector, CVector, float, int, char, char))GetAddress(0xA8D00))(this, nModel, position, rotation, fDrawDistance, a10, a11, a12); +} + +CObject::~CObject() { +} + +float CObject::GetDistance(const CMatrix* pMatrix) { + return ((float(__thiscall*)(CObject*, const CMatrix*))GetAddress(0xA7BB0))(this, pMatrix); +} + +void CObject::Stop() { + ((void(__thiscall*)(CObject*))GetAddress(0xA7C20))(this); +} + +void CObject::SetRotation(const CVector* pVector) { + ((void(__thiscall*)(CObject*, const CVector*))GetAddress(0xA7C90))(this, pVector); +} + +void CObject::SetAttachedToVehicle(ID nId, const CVector* pOffset, const CVector* pRotation) { + ((void(__thiscall*)(CObject*, ID, const CVector*, const CVector*))GetAddress(0xA7D00))(this, nId, pOffset, pRotation); +} + +void CObject::SetAttachedToObject(ID nId, const CVector* pOffset, const CVector* pRotation, char a5) { + ((void(__thiscall*)(CObject*, ID, const CVector*, const CVector*, char))GetAddress(0xA7D90))(this, nId, pOffset, pRotation, a5); +} + +void CObject::AttachToVehicle(CVehicle* pVehicle) { + ((void(__thiscall*)(CObject*, CVehicle*))GetAddress(0xA7E30))(this, pVehicle); +} + +void CObject::AttachToObject(CObject* pObject) { + ((void(__thiscall*)(CObject*, CObject*))GetAddress(0xA7EB0))(this, pObject); +} + +void CObject::Rotate(CVector vector) { + ((void(__thiscall*)(CObject*, CVector))GetAddress(0xA7FB0))(this, vector); +} + +BOOL CObject::AttachedToMovingEntity() { + return ((BOOL(__thiscall*)(CObject*))GetAddress(0xA80B0))(this); +} + +void CObject::SetMaterial(int nModel, int nIndex, const char* szTxd, const char* szTexture, D3DCOLOR color) { + ((void(__thiscall*)(CObject*, int, int, const char*, const char*, D3DCOLOR))GetAddress(0xA8120))(this, nModel, nIndex, szTxd, szTexture, color); +} + +void CObject::SetMaterialText(int nIndex, const char* szText, char nMaterialSize, const char* szFont, char nFontSize, bool bBold, D3DCOLOR fontColor, D3DCOLOR backgroundColor, char align) { + ((void(__thiscall*)(CObject*, int, const char*, char, const char*, char, bool, D3DCOLOR, D3DCOLOR, char))GetAddress(0xA82A0))(this, nIndex, szText, nMaterialSize, szFont, nFontSize, bBold, fontColor, backgroundColor, align); +} + +bool CObject::GetMaterialSize(int nSize, int* x, int* y) { + return ((bool(__thiscall*)(CObject*, int, int*, int*))GetAddress(0xA8870))(this, nSize, x, y); +} + +void CObject::Render() { + ((void(__thiscall*)(CObject*))GetAddress(0xA8B50))(this); +} + +void CObject::Process(float fElapsedTime) { + ((void(__thiscall*)(CObject*, float))GetAddress(0xA9240))(this, fElapsedTime); +} + +void CObject::ConstructMaterialText() { + ((void(__thiscall*)(CObject*))GetAddress(0xA9AD0))(this); +} + +void CObject::Draw() { + ((void(__thiscall*)(CObject*))GetAddress(0xA9B80))(this); +} + +void CObject::ShutdownMaterialText() { + ((void(__thiscall*)(CObject*))GetAddress(0xA8AC0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CObjectEdit.cpp b/src/sampapi/0.3.DL-1/CObjectEdit.cpp new file mode 100644 index 00000000..bfc26004 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CObjectEdit.cpp @@ -0,0 +1,86 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CObjectEdit.h" + +SAMPAPI_BEGIN_V03DL_1 + +CObjectEdit*& RefObjectEdit() { + return *((CObjectEdit**)GetAddress(0x2AC9F0)); +} + +CObjectEdit::CObjectEdit(IDirect3DDevice9* RefDevice) { + ((CObjectEdit*(__thiscall*)(CObjectEdit*, IDirect3DDevice9*))GetAddress(0x71600))(this, RefDevice); +} + +float CObjectEdit::WorldToScreen(CVector* in, float* out) { + return ((float(__thiscall*)(CObjectEdit*, CVector*, float*))GetAddress(0x716C0))(this, in, out); +} + +int CObjectEdit::RenderAxes(CMatrix* a2, float linesize) { + return ((int(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x717C0))(this, a2, linesize); +} + +const char* CObjectEdit::GetRenderChar(BOOL for_big_font) { + return ((const char*(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x71A40))(this, for_big_font); +} + +void CObjectEdit::TryChangeProcessType() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x71B40))(this); +} + +void CObjectEdit::SetEditMode(ObjectEditMode mode) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditMode))GetAddress(0x71C90))(this, mode); +} + +void CObjectEdit::ResetMousePos() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x71E60))(this); +} + +void CObjectEdit::EnterEditObject(ID object_id, BOOL player_object) { + ((void(__thiscall*)(CObjectEdit*, ID, BOOL))GetAddress(0x71EC0))(this, object_id, player_object); +} + +void CObjectEdit::SendEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x72350))(this, response); +} + +void CObjectEdit::SendAttachedEditEndNotification(int response) { + ((void(__thiscall*)(CObjectEdit*, int))GetAddress(0x72560))(this, response); +} + +void CObjectEdit::Disable(BOOL result) { + ((void(__thiscall*)(CObjectEdit*, BOOL))GetAddress(0x72660))(this, result); +} + +BOOL CObjectEdit::RenderControlsForObject(CMatrix* object_matrix, float linesize) { + return ((BOOL(__thiscall*)(CObjectEdit*, CMatrix*, float))GetAddress(0x726D0))(this, object_matrix, linesize); +} + +void CObjectEdit::ApplyChanges(ObjectEditProcessType type, float diff) { + ((void(__thiscall*)(CObjectEdit*, ObjectEditProcessType, float))GetAddress(0x72F00))(this, type, diff); +} + +void CObjectEdit::ProcessMouseMove() { + ((float(__thiscall*)(CObjectEdit*))GetAddress(0x72F20))(this); +} + +BOOL CObjectEdit::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CObjectEdit*, int, int, int))GetAddress(0x72FF0))(this, uMsg, wParam, lParam); +} + +void CObjectEdit::Render() { + ((void(__thiscall*)(CObjectEdit*))GetAddress(0x73220))(this); +} + +const char* CObjectEdit::GetMaxSizeChar() { + return ((const char*(__cdecl*)())GetAddress(0x71A30))(); +} + +SAMPAPI_END \ No newline at end of file diff --git a/src/sampapi/0.3.DL-1/CObjectMaterialText.cpp b/src/sampapi/0.3.DL-1/CObjectMaterialText.cpp new file mode 100644 index 00000000..7aff75fb --- /dev/null +++ b/src/sampapi/0.3.DL-1/CObjectMaterialText.cpp @@ -0,0 +1,38 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CObjectMaterialText.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CObjectMaterialText*& RefObjectMaterialTextManager() { + return *(CObjectMaterialText**)GetAddress(0x2ACA34); +} + +CObjectMaterialText::CObjectMaterialText(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CObjectMaterialText*, IDirect3DDevice9*))GetAddress(0x70320))(this, pDevice); +} + +CObjectMaterialText::~CObjectMaterialText() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x70340))(this); +} + +void CObjectMaterialText::OnLostDevice() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x702D0))(this); +} + +void CObjectMaterialText::OnResetDevice() { + ((void(__thiscall*)(CObjectMaterialText*))GetAddress(0x70300))(this); +} + +IDirect3DTexture9* CObjectMaterialText::Create(const char* szText, const char* szFont, char nFontSize, int nBgSizeX, int nBgSizeY, D3DCOLOR fontColor, D3DCOLOR bgColor, bool bBold, char align) { + return ((IDirect3DTexture9 * (__thiscall*)(CObjectMaterialText*, const char*, const char*, char, int, int, D3DCOLOR, D3DCOLOR, bool, char)) GetAddress(0x70350))(this, szText, szFont, nFontSize, nBgSizeX, nBgSizeY, fontColor, bgColor, bBold, align); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CObjectPool.cpp b/src/sampapi/0.3.DL-1/CObjectPool.cpp new file mode 100644 index 00000000..4b6670db --- /dev/null +++ b/src/sampapi/0.3.DL-1/CObjectPool.cpp @@ -0,0 +1,70 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CObjectPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CObjectPool::CObjectPool() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12700))(this); +} + +CObjectPool::~CObjectPool() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x13060))(this); +} + +void CObjectPool::UpdateLargestId() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x126A0))(this); +} + +int CObjectPool::GetCount() { + return ((int(__thiscall*)(CObjectPool*))GetAddress(0x12730))(this); +} + +BOOL CObjectPool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CObjectPool*, ID))GetAddress(0x12750))(this, nId); +} + +BOOL CObjectPool::Create(ID nId, int nModel, CVector position, CVector rotation, float fDrawDistance) { + return ((BOOL(__thiscall*)(CObjectPool*, ID, int, CVector, CVector, float))GetAddress(0x127D0))(this, nId, nModel, position, rotation, fDrawDistance); +} + +CObject* CObjectPool::Find(::CObject* pGameObject) { + return ((CObject * (__thiscall*)(CObjectPool*, ::CObject*)) GetAddress(0x128D0))(this, pGameObject); +} + +int CObjectPool::GetId(::CObject* pGameObject) { + return ((int(__thiscall*)(CObjectPool*, ::CObject*))GetAddress(0x12910))(this, pGameObject); +} + +void CObjectPool::Process() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12950))(this); +} + +void CObjectPool::ConstructMaterials() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12A10))(this); +} + +void CObjectPool::ShutdownMaterials() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12A50))(this); +} + +void CObjectPool::Draw() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12A90))(this); +} + +void CObjectPool::DrawLast() { + ((void(__thiscall*)(CObjectPool*))GetAddress(0x12AD0))(this); +} + +CObject* CObjectPool::Get(ID nId) { + return ((CObject * (__thiscall*)(CObjectPool*, ID)) GetAddress(0x2E10))(this, nId); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CObjectSelection.cpp b/src/sampapi/0.3.DL-1/CObjectSelection.cpp new file mode 100644 index 00000000..3b70cf9d --- /dev/null +++ b/src/sampapi/0.3.DL-1/CObjectSelection.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CObjectSelection.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CObjectSelection*& RefObjectSelection() { + return *(CObjectSelection**)GetAddress(0x2AC9F4); +} + +CObjectSelection::CObjectSelection() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6D440))(this); +} + +ID CObjectSelection::DefineObject() { + return ((ID(__thiscall*)(CObjectSelection*))GetAddress(0x6D450))(this); +} + +void CObjectSelection::DrawLabels() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6D4A0))(this); +} + +void CObjectSelection::Enable(BOOL bEnable) { + ((void(__thiscall*)(CObjectSelection*, BOOL))GetAddress(0x6D5C0))(this, bEnable); +} + +void CObjectSelection::Draw() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6D640))(this); +} + +void CObjectSelection::SendNotification() { + ((void(__thiscall*)(CObjectSelection*))GetAddress(0x6D710))(this); +} + +BOOL CObjectSelection::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CObjectSelection*, int, int, int))GetAddress(0x6D880))(this, uMsg, wParam, lParam); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CPed.cpp b/src/sampapi/0.3.DL-1/CPed.cpp new file mode 100644 index 00000000..b88c79cb --- /dev/null +++ b/src/sampapi/0.3.DL-1/CPed.cpp @@ -0,0 +1,441 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CPed.h" + +SAMPAPI_BEGIN_V03DL_1 + +CPed::CPed() { + ((void(__thiscall*)(CPed*))GetAddress(0xAB690))(this); +} + +CPed::CPed(int nPlayerNumber, int nModel, CVector position, float fRotation) { + ((void(__thiscall*)(CPed*, int, int, CVector, float))GetAddress(0xB08E0))(this, nPlayerNumber, nModel, position, fRotation); +} + +CPed::~CPed() { +} + +void CPed::ResetPointers() { + ((void(__thiscall*)(CPed*))GetAddress(0xAB7D0))(this); +} + +void CPed::SetInitialState() { + ((void(__thiscall*)(CPed*))GetAddress(0xAB7F0))(this); +} + +AimStuff::Aim* CPed::GetAim() { + return ((AimStuff::Aim * (__thiscall*)(CPed*)) GetAddress(0xAB810))(this); +} + +void CPed::SetAim(const AimStuff::Aim* pAim) { + ((void(__thiscall*)(CPed*, const AimStuff::Aim*))GetAddress(0xAB850))(this, pAim); +} + +char CPed::GetCurrentWeapon() { + return ((char(__thiscall*)(CPed*))GetAddress(0xAB870))(this); +} + +GTAREF CPed::GetVehicleRef() { + return ((GTAREF(__thiscall*)(CPed*))GetAddress(0xAB8B0))(this); +} + +void CPed::DeleteArrow() { + ((void(__thiscall*)(CPed*))GetAddress(0xAB8D0))(this); +} + +BOOL CPed::IsOnScreen() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAB900))(this); +} + +void CPed::SetImmunities(BOOL BP, BOOL FP, BOOL EP, BOOL CP, BOOL MP) { + ((void(__thiscall*)(CPed*, BOOL, BOOL, BOOL, BOOL, BOOL))GetAddress(0xAB920))(this, BP, FP, EP, CP, MP); +} + +float CPed::GetHealth() { + return ((float(__thiscall*)(CPed*))GetAddress(0xAB970))(this); +} + +void CPed::SetHealth(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xAB990))(this, fValue); +} + +float CPed::GetArmour() { + return ((float(__thiscall*)(CPed*))GetAddress(0xAB9B0))(this); +} + +void CPed::SetArmour(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xAB9D0))(this, fValue); +} + +int CPed::GetFlags() { + return ((int(__thiscall*)(CPed*))GetAddress(0xAB9F0))(this); +} + +void CPed::SetFlags(int nValue) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xABA10))(this, nValue); +} + +BOOL CPed::IsDead() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xABA30))(this); +} + +char CPed::GetState() { + return ((char(__thiscall*)(CPed*))GetAddress(0xABA60))(this); +} + +void CPed::SetState(char nValue) { + ((void(__thiscall*)(CPed*, char))GetAddress(0xABA70))(this, nValue); +} + +float CPed::GetRotation() { + return ((float(__thiscall*)(CPed*))GetAddress(0xABAB0))(this); +} + +void CPed::ForceRotation(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xABB30))(this, fValue); +} + +void CPed::SetRotation(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xABB80))(this, fValue); +} + +BOOL CPed::IsPassenger() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xABBE0))(this); +} + +::CVehicle* CPed::GetVehicle() { + return ((::CVehicle * (__thiscall*)(CPed*)) GetAddress(0xABC20))(this); +} + +void CPed::ClearWeapons() { + ((void(__thiscall*)(CPed*))GetAddress(0xABC30))(this); +} + +void CPed::SetArmedWeapon(int nWeapon, bool bGameFunc) { + ((void(__thiscall*)(CPed*, int, bool))GetAddress(0xABC80))(this, nWeapon, bGameFunc); +} + +void CPed::RemoveWeaponWhenEnteringVehicle() { + ((void(__thiscall*)(CPed*))GetAddress(0xABD30))(this); +} + +::CWeapon* CPed::GetCurrentWeaponSlot() { + return ((::CWeapon * (__thiscall*)(CPed*)) GetAddress(0xABD60))(this); +} + +BOOL CPed::CurrentWeaponHasAmmo() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xABD80))(this); +} + +float CPed::GetDistanceToEntity(const CEntity* pEntity) { + return ((float(__thiscall*)(CPed*, const CEntity*))GetAddress(0xABDC0))(this, pEntity); +} + +int CPed::GetVehicleSeatIndex() { + return ((int(__thiscall*)(CPed*))GetAddress(0xABE20))(this); +} + +void CPed::PutIntoVehicle(GTAREF vehicle, int nSeat) { + ((void(__thiscall*)(CPed*, GTAREF, int))GetAddress(0xABEB0))(this, vehicle, nSeat); +} + +void CPed::EnterVehicle(GTAREF vehicle, BOOL bAsPassenger) { + ((void(__thiscall*)(CPed*, GTAREF, BOOL))GetAddress(0xAC030))(this, vehicle, bAsPassenger); +} + +void CPed::ExitVehicle() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC100))(this); +} + +void CPed::WarpFromVehicle(CVector putAt) { + ((void(__thiscall*)(CPed*, CVector))GetAddress(0xAC190))(this, putAt); +} + +void CPed::SetSpawnInfo(const CVector* pPosition, float fRotation) { + ((void(__thiscall*)(CPed*, const CVector*, float))GetAddress(0xAC370))(this, pPosition, fRotation); +} + +void CPed::SetControllable(BOOL bEnable) { + ((void(__thiscall*)(CPed*, BOOL))GetAddress(0xAC3B0))(this, bEnable); +} + +char CPed::GetDeathInfo(ID* pKiller) { + return ((char(__thiscall*)(CPed*, ID*))GetAddress(0xAC470))(this, pKiller); +} + +::CEntity* CPed::GetFloor() { + return ((::CEntity * (__thiscall*)(CPed*)) GetAddress(0xAC630))(this); +} + +::CWeaponInfo* CPed::GetCurrentWeaponInfo() { + return ((::CWeaponInfo * (__thiscall*)(CPed*)) GetAddress(0xAC6E0))(this); +} + +void CPed::HandsUp() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC730))(this); +} + +BOOL CPed::DoesHandsUp() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAC780))(this); +} + +void CPed::HoldObject(int nModel) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAC7E0))(this, nModel); +} + +BOOL CPed::EnablePassengerDrivebyMode() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xACF90))(this); +} + +void CPed::Extinguish() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD0F0))(this); +} + +unsigned short CPed::GetCurrentWeaponAmmo() { + return ((unsigned short(__thiscall*)(CPed*))GetAddress(0xAD150))(this); +} + +void CPed::EnableJetpack() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC930))(this); +} + +void CPed::DisableJetpack() { + ((void(__thiscall*)(CPed*))GetAddress(0xAC980))(this); +} + +BOOL CPed::HasJetpack() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAC9E0))(this); +} + +CWeapon* CPed::GetWeaponSlot(int nWeapon) { + return ((::CWeapon * (__thiscall*)(CPed*, int)) GetAddress(0xACDB0))(this, nWeapon); +} + +void CPed::SetWalkStyle(const char* szName) { + ((void(__thiscall*)(CPed*, const char*))GetAddress(0xACDF0))(this, szName); +} + +void CPed::PerformAnimation(const char* szName, const char* szFile, float fFramedelta, int nLoopA, int nLockX, int nLockY, int nLockF, int nTime) { + ((void(__thiscall*)(CPed*, const char*, const char*, float, int, int, int, int, int))GetAddress(0xACE50))(this, szName, szFile, fFramedelta, nLoopA, nLockX, nLockY, nLockF, nTime); +} + +void CPed::LinkToInterior(char nId, BOOL bRefresh) { + ((void(__thiscall*)(CPed*, char, BOOL))GetAddress(0xACF60))(this, nId, bRefresh); +} + +void CPed::DestroyParachute() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD000))(this); +} + +BOOL CPed::OpenParachute() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD0F0))(this); +} + +void CPed::ProcessParachuteEvent(const char* szName) { + ((void(__thiscall*)(CPed*, const char*))GetAddress(0xAD240))(this, szName); +} + +BOOL CPed::IsOnGround() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD480))(this); +} + +void CPed::ResetDamageEntity() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD4A0))(this); +} + +void CPed::RemoveWeaponModel(int nWeapon) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAD4D0))(this, nWeapon); +} + +float CPed::GetAimZ() { + return ((float(__thiscall*)(CPed*))GetAddress(0xAD510))(this); +} + +void CPed::SetAimZ(float fValue) { + ((void(__thiscall*)(CPed*, float))GetAddress(0xAD550))(this, fValue); +} + +::CEntity* CPed::GetContactEntity() { + return ((::CEntity * (__thiscall*)(CPed*)) GetAddress(0xAD5A0))(this); +} + +CVehicle* CPed::GetContactVehicle() { + return ((::CVehicle * (__thiscall*)(CPed*)) GetAddress(0xAD5B0))(this); +} + +int CPed::GetStat() { + return ((int(__thiscall*)(CPed*))GetAddress(0xAD5E0))(this); +} + +BOOL CPed::PerformingCustomAnimation() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD600))(this); +} + +void CPed::StartDancing(int nStyle) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAD6D0))(this, nStyle); +} + +void CPed::StopDancing() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD720))(this); +} + +BOOL CPed::DoesDancing() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD760))(this); +} + +const char* CPed::GetAnimationForDance(int nMove) { + return ((const char*(__thiscall*)(CPed*, int))GetAddress(0xAD770))(this, nMove); +} + +void CPed::DropStuff() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD800))(this); +} + +int CPed::GetStuff() { + return ((int(__thiscall*)(CPed*))GetAddress(0xAD890))(this); +} + +BOOL CPed::ApplyStuff() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAD8A0))(this); +} + +void CPed::ProcessDrunk() { + ((void(__thiscall*)(CPed*))GetAddress(0xAD9F0))(this); +} + +int CPed::GetDrunkLevel() { + return ((int(__thiscall*)(CPed*))GetAddress(0xADBA0))(this); +} + +void CPed::SetDrunkLevel(int nValue) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xADBB0))(this, nValue); +} + +void CPed::ApplyCommandTask(const char* szName, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11) { + ((void(__thiscall*)(CPed*, const char*, int, int, int, int, int, int, int, int, int))GetAddress(0xADBD0))(this, szName, a3, a4, a5, a6, a7, a8, a9, a10, a11); +} + +void CPed::DestroyCommandTask() { + ((void(__thiscall*)(CPed*))GetAddress(0xADC20))(this); +} + +void CPed::EnableCellphone(BOOL bEnable) { + ((void(__thiscall*)(CPed*, BOOL))GetAddress(0xADC70))(this, bEnable); +} + +BOOL CPed::UsingCellphone() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xADCA0))(this); +} + +void CPed::SetFightingStyle(int nStyle) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xADCD0))(this, nStyle); +} + +void CPed::StartUrinating() { + ((void(__thiscall*)(CPed*))GetAddress(0xADD00))(this); +} + +void CPed::StopUrinating() { + ((void(__thiscall*)(CPed*))GetAddress(0xADDE0))(this); +} + +BOOL CPed::DoesUrinating() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xADE60))(this); +} + +const char* CPed::GetLoadedShoppingDataSubsection() { + return ((const char*(__thiscall*)(CPed*))GetAddress(0xADEE0))(this); +} + +void CPed::LoadShoppingDataSubsection(const char* szName) { + ((void(__thiscall*)(CPed*, const char*))GetAddress(0xADF00))(this, szName); +} + +::CPed* CPed::GetAimedPed() { + return ((::CPed * (__thiscall*)(CPed*)) GetAddress(0xAEB60))(this); +} + +void CPed::SetKeys(short controllerState, short sLeftStickX, short sLeftStickY) { + ((void(__thiscall*)(CPed*, short, short, short))GetAddress(0xAEF40))(this, controllerState, sLeftStickX, sLeftStickY); +} + +short CPed::GetKeys(short* pLeftStickX, short* pLeftStickY) { + return ((short(__thiscall*)(CPed*, short*, short*))GetAddress(0xAF1D0))(this, pLeftStickX, pLeftStickY); +} + +void CPed::CreateArrow(int nColor) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAF330))(this, nColor); +} + +void CPed::SetModelIndex(int nModel) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAFB50))(this, nModel); +} + +void CPed::Kill() { + ((void(__thiscall*)(CPed*))GetAddress(0xAFBD0))(this); +} + +void CPed::SetWeaponAmmo(unsigned char nWeapon, unsigned short nAmmo) { + ((void(__thiscall*)(CPed*, unsigned char, unsigned short))GetAddress(0xAFC80))(this, nWeapon, nAmmo); +} + +void CPed::ProcessDancing() { + ((void(__thiscall*)(CPed*))GetAddress(0xAFCB0))(this); +} + +void CPed::GiveStuff(int nType) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAFED0))(this, nType); +} + +void CPed::Destroy() { + ((void(__thiscall*)(CPed*))GetAddress(0xB0BA0))(this); +} + +void CPed::SetCameraMode(char nMode) { + ((void(__thiscall*)(CPed*, char))GetAddress(0x141E0))(this, nMode); +} + +void CPed::SetCameraExtZoomAndAspectRatio(float fExtZoom, float fAspectRatio) { + ((void(__thiscall*)(CPed*, float, float))GetAddress(0x14200))(this, fExtZoom, fAspectRatio); +} + +BOOL CPed::HasAccessory() { + return ((BOOL(__thiscall*)(CPed*))GetAddress(0xAEA30))(this); +} + +void CPed::DeleteAccessory(int nSlot) { + ((void(__thiscall*)(CPed*, int))GetAddress(0xAEA50))(this, nSlot); +} + +BOOL CPed::GetAccessoryState(int nSlot) { + return ((BOOL(__thiscall*)(CPed*, int))GetAddress(0xAEAB0))(this, nSlot); +} + +void CPed::DeleteAllAccessories() { + ((void(__thiscall*)(CPed*))GetAddress(0xB06B0))(this); +} + +void CPed::AddAccessory(int nSlot, const Accessory* pInfo) { + ((void(__thiscall*)(CPed*, int, const Accessory*))GetAddress(0xB0710))(this, nSlot, pInfo); +} + +CObject* CPed::GetAccessory(int nSlot) { + return ((CObject * (__thiscall*)(CPed*, int)) GetAddress(0x13580))(this, nSlot); +} + +char CPed::GetCameraMode() { + return ((char(__thiscall*)(CPed*))GetAddress(0x2D00))(this); +} + +void CPed::GetBonePosition(unsigned int boneId, CVector *outPosition) { + ((void(__thiscall*)(CPed*, unsigned int, CVector*))GetAddress(0xAE080))(this, boneId, outPosition); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CPickupPool.cpp b/src/sampapi/0.3.DL-1/CPickupPool.cpp new file mode 100644 index 00000000..a07d20d7 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CPickupPool.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CPickupPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CPickupPool::CPickupPool() { + ((void(__thiscall*)(CPickupPool*))GetAddress(0x8190))(this); +} + +CPickupPool::~CPickupPool() { + ((void(__thiscall*)(CPickupPool*))GetAddress(0x13310))(this); +} + +void CPickupPool::Create(Pickup* pData, int nId) { + ((void(__thiscall*)(CPickupPool*, Pickup*, int))GetAddress(0x13170))(this, pData, nId); +} + +void CPickupPool::CreateWeapon(int nModel, CVector position, int nAmmo, ID nExOwner) { + ((void(__thiscall*)(CPickupPool*, int, CVector, int, ID))GetAddress(0x13080))(this, nModel, position, nAmmo, nExOwner); +} + +void CPickupPool::Delete(int nId) { + ((void(__thiscall*)(CPickupPool*, int))GetAddress(0x13220))(this, nId); +} + +void CPickupPool::DeleteWeapon(ID nExOwner) { + ((void(__thiscall*)(CPickupPool*, ID))GetAddress(0x13280))(this, nExOwner); +} + +int CPickupPool::GetIndex(int nId) { + return ((int(__thiscall*)(CPickupPool*, int))GetAddress(0x132E0))(this, nId); +} + +void CPickupPool::SendNotification(int nId) { + ((void(__thiscall*)(CPickupPool*, int))GetAddress(0x13340))(this, nId); +} + +void CPickupPool::Process() { + ((void(__thiscall*)(CPickupPool*))GetAddress(0x13420))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CPlayerInfo.cpp b/src/sampapi/0.3.DL-1/CPlayerInfo.cpp new file mode 100644 index 00000000..610b9ea3 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CPlayerInfo.cpp @@ -0,0 +1,22 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CPlayerInfo.h" + +SAMPAPI_BEGIN_V03DL_1 + +CPlayerInfo::CPlayerInfo(const char* szName, BOOL bIsNPC) { + ((void(__thiscall*)(CPlayerInfo*, const char*, BOOL))GetAddress(0x14060))(this, szName, bIsNPC); +} + +CPlayerInfo::~CPlayerInfo() { + ((void(__thiscall*)(CPlayerInfo*))GetAddress(0x13E10))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CPlayerPool.cpp b/src/sampapi/0.3.DL-1/CPlayerPool.cpp new file mode 100644 index 00000000..8649c169 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CPlayerPool.cpp @@ -0,0 +1,110 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CPlayerPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CPlayerPool::CPlayerPool() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13E80))(this); +} + +CPlayerPool::~CPlayerPool() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13FD0))(this); +} + +void CPlayerPool::UpdateLargestId() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13650))(this); +} + +void CPlayerPool::Process() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x136C0))(this); +} + +ID CPlayerPool::Find(::CPed* pGamePed) { + return ((ID(__thiscall*)(CPlayerPool*, ::CPed*))GetAddress(0x137C0))(this, pGamePed); +} + +void CPlayerPool::Deactivate() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x139F0))(this); +} + +void CPlayerPool::ForceCollision() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13B50))(this); +} + +void CPlayerPool::RestoreCollision() { + ((void(__thiscall*)(CPlayerPool*))GetAddress(0x13BD0))(this); +} + +BOOL CPlayerPool::Delete(ID nId, int nReason) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID, int))GetAddress(0x13F40))(this, nId, nReason); +} + +BOOL CPlayerPool::Create(ID nId, const char* szName, BOOL bIsNPC) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID, const char*, BOOL))GetAddress(0x14100))(this, nId, szName, bIsNPC); +} + +CRemotePlayer* CPlayerPool::GetPlayer(ID nId) { + return ((CRemotePlayer * (__thiscall*)(CPlayerPool*, ID)) GetAddress(0x10F0))(this, nId); +} + +const char* CPlayerPool::GetLocalPlayerName() { + return ((const char*(__thiscall*)(CPlayerPool*))GetAddress(0xA1D0))(this); +} + +BOOL CPlayerPool::IsDisconnected(ID nId) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID))GetAddress(0x10D0))(this, nId); +} + +BOOL CPlayerPool::IsConnected(ID nId) { + return ((BOOL(__thiscall*)(CPlayerPool*, ID))GetAddress(0x10B0))(this, nId); +} + +void CPlayerPool::SetLocalPlayerName(const char* szName) { + ((void(__thiscall*)(CPlayerPool*, const char*))GetAddress(0xB580))(this, szName); +} + +void CPlayerPool::SetAt(ID nId, CPlayerInfo* pObject) { + ((void(__thiscall*)(CPlayerPool*, ID, CPlayerInfo*))GetAddress(0x13630))(this, nId, pObject); +} + +int CPlayerPool::GetScore(ID nId) { + return ((int(__thiscall*)(CPlayerPool*, ID))GetAddress(0x6E290))(this, nId); +} + +int CPlayerPool::GetPing(ID nId) { + return ((int(__thiscall*)(CPlayerPool*, ID))GetAddress(0x6E2B0))(this, nId); +} + +const char* CPlayerPool::GetName(ID nId) { + return ((const char*(__thiscall*)(CPlayerPool*, ID))GetAddress(0x170D0))(this, nId); +} + +int CPlayerPool::GetLocalPlayerPing() { + return ((int(__thiscall*)(CPlayerPool*))GetAddress(0x6E2F0))(this); +} + +int CPlayerPool::GetLocalPlayerScore() { + return ((int(__thiscall*)(CPlayerPool*))GetAddress(0x6E2E0))(this); +} + +int CPlayerPool::GetCount(BOOL bIncludeNPC) { + return ((int(__thiscall*)(CPlayerPool*, BOOL))GetAddress(0x138C0))(this, bIncludeNPC); +} + +CLocalPlayer* CPlayerPool::GetLocalPlayer() { + return ((CLocalPlayer * (__thiscall*)(CPlayerPool*)) GetAddress(0x1A80))(this); +} + +CObject* CPlayerPool::FindAccessory(::CObject* pGameObject) { + return ((CObject * (__thiscall*)(CPlayerPool*, ::CObject*)) GetAddress(0x13A40))(this, pGameObject); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CPlayerTags.cpp b/src/sampapi/0.3.DL-1/CPlayerTags.cpp new file mode 100644 index 00000000..1e8238e1 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CPlayerTags.cpp @@ -0,0 +1,58 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CPlayerTags.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CPlayerTags*& RefPlayerTags() { + return *(CPlayerTags**)GetAddress(0x2AC9D8); +} + +CPlayerTags::CPlayerTags(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CPlayerTags*, IDirect3DDevice9*))GetAddress(0x6C730))(this, pDevice); +} + +CPlayerTags::~CPlayerTags() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6C760))(this); +} + +void CPlayerTags::EndHealthBar() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6C790))(this); +} + +void CPlayerTags::BeginLabel() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6C7C0))(this); +} + +void CPlayerTags::EndLabel() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6C7D0))(this); +} + +void CPlayerTags::DrawLabel(CVector* pPosition, const char* szText, D3DCOLOR color, float fDistanceToCamera, bool bDrawStatus, int nStatus) { + ((void(__thiscall*)(CPlayerTags*, CVector*, const char*, D3DCOLOR, float, bool, int))GetAddress(0x6C7E0))(this, pPosition, szText, color, fDistanceToCamera, bDrawStatus, nStatus); +} + +void CPlayerTags::DrawHealthBar(CVector* pPosition, float fHealth, float fArmour, float fDistanceToCamera) { + ((void(__thiscall*)(CPlayerTags*, CVector*, float, float, float))GetAddress(0x6CAE0))(this, pPosition, fHealth, fArmour, fDistanceToCamera); +} + +void CPlayerTags::OnLostDevice() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6D090))(this); +} + +void CPlayerTags::OnResetDevice() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6D0C0))(this); +} + +void CPlayerTags::BeginHealthBar() { + ((void(__thiscall*)(CPlayerTags*))GetAddress(0x6D0F0))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CRemotePlayer.cpp b/src/sampapi/0.3.DL-1/CRemotePlayer.cpp new file mode 100644 index 00000000..2a182340 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CRemotePlayer.cpp @@ -0,0 +1,178 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CRemotePlayer.h" + +SAMPAPI_BEGIN_V03DL_1 + +CRemotePlayer::CRemotePlayer() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x16250))(this); +} + +CRemotePlayer::~CRemotePlayer() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x162C0))(this); +} + +void CRemotePlayer::ProcessHead() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14240))(this); +} + +void CRemotePlayer::SetMarkerState(BOOL bState) { + ((void(__thiscall*)(CRemotePlayer*, BOOL))GetAddress(0x14390))(this, bState); +} + +void CRemotePlayer::SetMarkerPosition(int x, int y, int z) { + ((void(__thiscall*)(CRemotePlayer*, int, int, int))GetAddress(0x143D0))(this, x, y, z); +} + +BOOL CRemotePlayer::SurfingOnVehicle() { + return ((BOOL(__thiscall*)(CRemotePlayer*))GetAddress(0x14470))(this); +} + +BOOL CRemotePlayer::SurfingOnObject() { + return ((BOOL(__thiscall*)(CRemotePlayer*))GetAddress(0x144A0))(this); +} + +void CRemotePlayer::ProcessSurfing() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x144D0))(this); +} + +void CRemotePlayer::OnEnterVehicle() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14660))(this); +} + +void CRemotePlayer::OnExitVehicle() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14730))(this); +} + +void CRemotePlayer::ProcessSpecialAction() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14780))(this); +} + +void CRemotePlayer::UpdateOnfootSpeedAndPosition() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x149F0))(this); +} + +void CRemotePlayer::UpdateOnfootRotation() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14D80))(this); +} + +void CRemotePlayer::SetOnfootTargetSpeedAndPosition(CVector* pPosition, CVector* pSpeed) { + ((void(__thiscall*)(CRemotePlayer*, CVector*, CVector*))GetAddress(0x14E50))(this, pPosition, pSpeed); +} + +void CRemotePlayer::UpdateIncarSpeedAndPosition() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x14EC0))(this); +} + +void CRemotePlayer::UpdateIncarRotation() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x151C0))(this); +} + +void CRemotePlayer::SetIncarTargetSpeedAndPosition(CMatrix* pMatrix, CVector* pPosition, CVector* pSpeed) { + ((void(__thiscall*)(CRemotePlayer*, CMatrix*, CVector*, CVector*))GetAddress(0x15330))(this, pMatrix, pPosition, pSpeed); +} + +void CRemotePlayer::UpdateTrain(CMatrix* pMatrix, CVector* pSpeed, float fSpeed) { + ((void(__thiscall*)(CRemotePlayer*, CMatrix*, CVector*, float))GetAddress(0x153A0))(this, pMatrix, pSpeed, fSpeed); +} + +void CRemotePlayer::Update(Synchronization::AimData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::AimData*))GetAddress(0x154A0))(this, pData); +} + +void CRemotePlayer::Update(Synchronization::UnoccupiedData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::UnoccupiedData*))GetAddress(0x15600))(this, pData); +} + +void CRemotePlayer::Update(Synchronization::TrailerData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::TrailerData*))GetAddress(0x15950))(this, pData); +} + +void CRemotePlayer::ResetData() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x15C60))(this); +} + +float CRemotePlayer::GetDistanceToPlayer(CRemotePlayer* pPlayer) { + return ((float(__thiscall*)(CRemotePlayer*, CRemotePlayer*))GetAddress(0x15D50))(this, pPlayer); +} + +float CRemotePlayer::GetDistanceToLocalPlayer() { + return ((float(__thiscall*)(CRemotePlayer*))GetAddress(0x15DD0))(this); +} + +void CRemotePlayer::SetColor(D3DCOLOR color) { + ((void(__thiscall*)(CRemotePlayer*, D3DCOLOR))GetAddress(0x15E00))(this, color); +} + +D3DCOLOR CRemotePlayer::GetColorAsRGBA() { + return ((D3DCOLOR(__thiscall*)(CRemotePlayer*))GetAddress(0x15E20))(this); +} + +D3DCOLOR CRemotePlayer::GetColorAsARGB() { + return ((D3DCOLOR(__thiscall*)(CRemotePlayer*))GetAddress(0x15E30))(this); +} + +void CRemotePlayer::EnterVehicle(ID nId, BOOL bPassenger) { + ((void(__thiscall*)(CRemotePlayer*, ID, BOOL))GetAddress(0x15E50))(this, nId, bPassenger); +} + +void CRemotePlayer::ExitVehicle() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x15EE0))(this); +} + +void CRemotePlayer::ChangeState(char nOld, char nNew) { + ((void(__thiscall*)(CRemotePlayer*, char, char))GetAddress(0x15F10))(this, nOld, nNew); +} + +int CRemotePlayer::GetStatus() { + return ((int(__thiscall*)(CRemotePlayer*))GetAddress(0x15FD0))(this); +} + +void CRemotePlayer::Update(Synchronization::BulletData* pData) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::BulletData*))GetAddress(0x16010))(this, pData); +} + +void CRemotePlayer::Process() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x16310))(this); +} + +BOOL CRemotePlayer::Spawn(int a2, int nModel, int a4, CVector* pPosition, float fRotation, D3DCOLOR color, char nFightingStyle) { + return ((BOOL(__thiscall*)(CRemotePlayer*, int, int, int, CVector*, float, D3DCOLOR, char))GetAddress(0x16C50))(this, a2, nModel, a4, pPosition, fRotation, color, nFightingStyle); +} + +void CRemotePlayer::Update(Synchronization::OnfootData* pData, TICK timestamp) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::OnfootData*, TICK))GetAddress(0x16DA0))(this, pData, timestamp); +} + +void CRemotePlayer::Update(Synchronization::IncarData* pData, TICK timestamp) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::IncarData*, TICK))GetAddress(0x16E70))(this, pData, timestamp); +} + +void CRemotePlayer::Update(Synchronization::PassengerData* pData, TICK timestamp) { + ((void(__thiscall*)(CRemotePlayer*, Synchronization::PassengerData*, TICK))GetAddress(0x16F60))(this, pData, timestamp); +} + +void CRemotePlayer::Remove() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x17040))(this); +} + +void CRemotePlayer::Kill() { + ((void(__thiscall*)(CRemotePlayer*))GetAddress(0x17080))(this); +} + +void CRemotePlayer::Chat(const char* szText) { + ((void(__thiscall*)(CRemotePlayer*, const char*))GetAddress(0x17120))(this, szText); +} + +BOOL CRemotePlayer::DoesExist() { + return ((BOOL(__thiscall*)(CRemotePlayer*))GetAddress(0x1080))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CScoreboard.cpp b/src/sampapi/0.3.DL-1/CScoreboard.cpp new file mode 100644 index 00000000..16e22ef0 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CScoreboard.cpp @@ -0,0 +1,54 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CScoreboard.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CScoreboard*& RefScoreboard() { + return *(CScoreboard**)GetAddress(0x2AC9DC); +} + +CScoreboard::CScoreboard(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CScoreboard*, IDirect3DDevice9*))GetAddress(0x6E460))(this, pDevice); +} + +void CScoreboard::Recalc() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6E360))(this); +} + +void CScoreboard::GetRect(CRect* pRect) { + ((void(__thiscall*)(CScoreboard*, CRect*))GetAddress(0x6E3C0))(this, pRect); +} + +void CScoreboard::Close(bool bHideCursor) { + ((void(__thiscall*)(CScoreboard*, bool))GetAddress(0x6E410))(this, bHideCursor); +} + +void CScoreboard::ResetDialogControls(CDXUTDialog* pDialog) { + ((void(__thiscall*)(CScoreboard*, CDXUTDialog*))GetAddress(0x6E4E0))(this, pDialog); +} + +void CScoreboard::SendNotification() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6E640))(this); +} + +void CScoreboard::UpdateList() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6E760))(this); +} + +void CScoreboard::Draw() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6EAF0))(this); +} + +void CScoreboard::Enable() { + ((void(__thiscall*)(CScoreboard*))GetAddress(0x6EE10))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CSpawnScreen.cpp b/src/sampapi/0.3.DL-1/CSpawnScreen.cpp new file mode 100644 index 00000000..e5fd3040 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CSpawnScreen.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CSpawnScreen.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CSpawnScreen*& RefSpawnScreen() { + return *(CSpawnScreen**)GetAddress(0x2ACA20); +} + +CSpawnScreen::CSpawnScreen(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CSpawnScreen*, IDirect3DDevice9*))GetAddress(0x70990))(this, pDevice); +} + +CSpawnScreen::~CSpawnScreen() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x709D0))(this); +} + +void CSpawnScreen::SetText(const char* szString) { + ((void(__thiscall*)(CSpawnScreen*, const char*))GetAddress(0x70630))(this, szString); +} + +void CSpawnScreen::OnResetDevice() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70690))(this); +} + +void CSpawnScreen::OnLostDevice() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70940))(this); +} + +void CSpawnScreen::Draw() { + ((void(__thiscall*)(CSpawnScreen*))GetAddress(0x70A30))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CSrvNetStats.cpp b/src/sampapi/0.3.DL-1/CSrvNetStats.cpp new file mode 100644 index 00000000..13e74fcc --- /dev/null +++ b/src/sampapi/0.3.DL-1/CSrvNetStats.cpp @@ -0,0 +1,26 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CSrvNetStats.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CSrvNetStats*& RefServerNetStatistics() { + return *(CSrvNetStats**)GetAddress(0x2ACA00); +} + +CSrvNetStats::CSrvNetStats(IDirect3DDevice9* pDevice) { + ((void(__thiscall*)(CSrvNetStats*, IDirect3DDevice9*))GetAddress(0x70CC0))(this, pDevice); +} + +void CSrvNetStats::Draw() { + ((void(__thiscall*)(CSrvNetStats*))GetAddress(0x70D00))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CTextDraw.cpp b/src/sampapi/0.3.DL-1/CTextDraw.cpp new file mode 100644 index 00000000..d89e04d0 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CTextDraw.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CTextDraw.h" + +SAMPAPI_BEGIN_V03DL_1 + +CTextDraw::CTextDraw(Transmit* pData, const char* szText) { + ((void(__thiscall*)(CTextDraw*, Transmit*, const char*))GetAddress(0xB32E0))(this, pData, szText); +} + +CTextDraw::~CTextDraw() { + ((void(__thiscall*)(CTextDraw*))GetAddress(0xB2B50))(this); +} + +void CTextDraw::SetText(const char* szText) { + ((void(__thiscall*)(CTextDraw*, const char*))GetAddress(0xB2B60))(this, szText); +} + +void CTextDraw::Draw() { + ((void(__thiscall*)(CTextDraw*))GetAddress(0xB3080))(this); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CTextDrawPool.cpp b/src/sampapi/0.3.DL-1/CTextDrawPool.cpp new file mode 100644 index 00000000..1529acc5 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CTextDrawPool.cpp @@ -0,0 +1,34 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CTextDrawPool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CTextDrawPool::CTextDrawPool() { + ((void(__thiscall*)(CTextDrawPool*))GetAddress(0x1E260))(this); +} + +CTextDrawPool::~CTextDrawPool() { + ((void(__thiscall*)(CTextDrawPool*))GetAddress(0x1E390))(this); +} + +void CTextDrawPool::Delete(ID nId) { + ((void(__thiscall*)(CTextDrawPool*, ID))GetAddress(0x1E2B0))(this, nId); +} + +void CTextDrawPool::Draw() { + ((void(__thiscall*)(CTextDrawPool*))GetAddress(0x1E2F0))(this); +} + +CTextDraw* CTextDrawPool::Create(int nId, CTextDraw::Transmit* pData, const char* szText) { + return ((CTextDraw * (__thiscall*)(CTextDrawPool*, int, CTextDraw::Transmit*, const char*)) GetAddress(0x1E3D0))(this, nId, pData, szText); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CTextDrawSelection.cpp b/src/sampapi/0.3.DL-1/CTextDrawSelection.cpp new file mode 100644 index 00000000..69f34bfd --- /dev/null +++ b/src/sampapi/0.3.DL-1/CTextDrawSelection.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CTextDrawSelection.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CTextDrawSelection*& RefTextDrawSelection() { + return *(CTextDrawSelection**)GetAddress(0x2AC9F8); +} + +void CTextDrawSelection::ResetTextDraws() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x70D50))(this); +} + +void CTextDrawSelection::RawProcess() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x70DB0))(this); +} + +void CTextDrawSelection::Process() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x70EB0))(this); +} + +void CTextDrawSelection::Enable(D3DCOLOR hoveredColor) { + ((void(__thiscall*)(CTextDrawSelection*, D3DCOLOR))GetAddress(0x70EE0))(this, hoveredColor); +} + +void CTextDrawSelection::SendNotification() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x70F20))(this); +} + +void CTextDrawSelection::Disable() { + ((void(__thiscall*)(CTextDrawSelection*))GetAddress(0x70FC0))(this); +} + +BOOL CTextDrawSelection::MsgProc(int uMsg, int wParam, int lParam) { + return ((BOOL(__thiscall*)(CTextDrawSelection*, int, int, int))GetAddress(0x71010))(this, uMsg, wParam, lParam); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CVehicle.cpp b/src/sampapi/0.3.DL-1/CVehicle.cpp new file mode 100644 index 00000000..49c12fea --- /dev/null +++ b/src/sampapi/0.3.DL-1/CVehicle.cpp @@ -0,0 +1,249 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CVehicle.h" + +SAMPAPI_BEGIN_V03DL_1 + +CVehicle::CVehicle(int nModel, CVector position, float fRotation, BOOL bKeepModelLoaded, BOOL bHasSiren) { + ((void(__thiscall*)(CVehicle*, int, CVector, float, BOOL, BOOL))GetAddress(0xB7F00))(this, nModel, position, fRotation, bKeepModelLoaded, bHasSiren); +} + +CVehicle::~CVehicle() { +} + +void CVehicle::ChangeInterior(int nId) { + ((void(__thiscall*)(CVehicle*, int))GetAddress(0xB6BD0))(this, nId); +} + +void CVehicle::ResetPointers() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB6C00))(this); +} + +BOOL CVehicle::HasDriver() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6C20))(this); +} + +BOOL CVehicle::IsOccupied() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6C70))(this); +} + +void CVehicle::SetInvulnerable(BOOL bInv) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB6CD0))(this, bInv); +} + +void CVehicle::SetLocked(BOOL bLock) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB6D70))(this, bLock); +} + +float CVehicle::GetHealth() { + return ((float(__thiscall*)(CVehicle*))GetAddress(0xB6DE0))(this); +} + +void CVehicle::SetHealth(float fValue) { + ((void(__thiscall*)(CVehicle*, float))GetAddress(0xB6E00))(this, fValue); +} + +void CVehicle::SetColor(NUMBER nPrimary, NUMBER nSecondary) { + ((void(__thiscall*)(CVehicle*, NUMBER, NUMBER))GetAddress(0xB6E20))(this, nPrimary, nSecondary); +} + +void CVehicle::UpdateColor() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB6E70))(this); +} + +int CVehicle::GetSubtype() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB6ED0))(this); +} + +BOOL CVehicle::IsSunk() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6EF0))(this); +} + +BOOL CVehicle::IsWrecked() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6F10))(this); +} + +BOOL CVehicle::DriverIsPlayerPed() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6F30))(this); +} + +BOOL CVehicle::HasPlayerPed() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6F60))(this); +} + +BOOL CVehicle::IsTrainPart() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6FA0))(this); +} + +BOOL CVehicle::HasTurret() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB6FE0))(this); +} + +void CVehicle::EnableSiren(bool bEnable) { + ((void(__thiscall*)(CVehicle*, bool))GetAddress(0xB7080))(this, bEnable); +} + +BOOL CVehicle::SirenEnabled() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB70A0))(this); +} + +void CVehicle::SetLandingGearState(BOOL bHide) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB70E0))(this, bHide); +} + +BOOL CVehicle::GetLandingGearState() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7170))(this); +} + +void CVehicle::SetHydraThrusters(int nDirection) { + ((void(__thiscall*)(CVehicle*, int))GetAddress(0xB71E0))(this, nDirection); +} + +int CVehicle::GetHydraThrusters() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB7200))(this); +} + +void CVehicle::ProcessMarkers() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7220))(this); +} + +void CVehicle::Lock(BOOL bLock) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB7380))(this, bLock); +} + +BOOL CVehicle::UpdateLastDrivenTime() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB73B0))(this); +} + +float CVehicle::GetTrainSpeed() { + return ((float(__thiscall*)(CVehicle*))GetAddress(0xB7420))(this); +} + +void CVehicle::SetTrainSpeed(float fValue) { + ((void(__thiscall*)(CVehicle*, float))GetAddress(0xB7440))(this, fValue); +} + +void CVehicle::SetTires(char nState) { + ((void(__thiscall*)(CVehicle*, char))GetAddress(0xB7480))(this, nState); +} + +char CVehicle::GetTires() { + return ((char(__thiscall*)(CVehicle*))GetAddress(0xB7570))(this); +} + +void CVehicle::UpdateDamage(int nPanels, int nDoors, char nLights) { + ((void(__thiscall*)(CVehicle*, int, int, char))GetAddress(0xB7600))(this, nPanels, nDoors, nLights); +} + +int CVehicle::GetPanelsDamage() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB76C0))(this); +} + +int CVehicle::GetDoorsDamage() { + return ((int(__thiscall*)(CVehicle*))GetAddress(0xB76F0))(this); +} + +char CVehicle::GetLightsDamage() { + return ((char(__thiscall*)(CVehicle*))GetAddress(0xB7720))(this); +} + +void CVehicle::AttachTrailer() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7750))(this); +} + +void CVehicle::DetachTrailer() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7770))(this); +} + +void CVehicle::SetTrailer(CVehicle* pVehicle) { + ((void(__thiscall*)(CVehicle*, CVehicle*))GetAddress(0xB77C0))(this, pVehicle); +} + +CVehicle* CVehicle::GetTrailer() { + return ((CVehicle * (__thiscall*)(CVehicle*)) GetAddress(0xB77D0))(this); +} + +CVehicle* CVehicle::GetTractor() { + return ((CVehicle * (__thiscall*)(CVehicle*)) GetAddress(0xB7830))(this); +} + +BOOL CVehicle::IsTrailer() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB78B0))(this); +} + +BOOL CVehicle::IsTowtruck() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7910))(this); +} + +BOOL CVehicle::IsRC() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7940))(this); +} + +void CVehicle::EnableLights(bool bEnable) { + ((void(__thiscall*)(CVehicle*, bool))GetAddress(0xB7990))(this, bEnable); +} + +void CVehicle::RemovePassengers() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7A20))(this); +} + +BOOL CVehicle::AddComponent(unsigned short nId) { + return ((BOOL(__thiscall*)(CVehicle*, unsigned short))GetAddress(0xB7B00))(this, nId); +} + +BOOL CVehicle::RemoveComponent(unsigned short nId) { + return ((BOOL(__thiscall*)(CVehicle*, unsigned short))GetAddress(0xB7BE0))(this, nId); +} + +void CVehicle::SetPaintjob(NUMBER nId) { + ((void(__thiscall*)(CVehicle*, NUMBER))GetAddress(0xB7C20))(this, nId); +} + +BOOL CVehicle::DoesExist() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7C70))(this); +} + +void CVehicle::SetLicensePlateText(const char* szText) { + ((void(__thiscall*)(CVehicle*, const char*))GetAddress(0xB7C80))(this, szText); +} + +void CVehicle::SetRotation(float fValue) { + ((void(__thiscall*)(CVehicle*, float))GetAddress(0xB7CA0))(this, fValue); +} + +void CVehicle::ConstructLicensePlate() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7CD0))(this); +} + +void CVehicle::ShutdownLicensePlate() { + ((void(__thiscall*)(CVehicle*))GetAddress(0xB7D20))(this); +} + +BOOL CVehicle::HasSiren() { + return ((BOOL(__thiscall*)(CVehicle*))GetAddress(0xB7E60))(this); +} + +char CVehicle::GetMaxPassengers() { + return ((char(__thiscall*)(CVehicle*))GetAddress(0xB7E70))(this); +} + +void CVehicle::SetWindowOpenFlag(NUMBER nDoorId) { + ((void(__thiscall*)(CVehicle*, NUMBER))GetAddress(0xB7EA0))(this, nDoorId); +} + +void CVehicle::ClearWindowOpenFlag(NUMBER nDoorId) { + ((void(__thiscall*)(CVehicle*, NUMBER))GetAddress(0xB7ED0))(this, nDoorId); +} + +void CVehicle::EnableEngine(BOOL bEnable) { + ((void(__thiscall*)(CVehicle*, BOOL))GetAddress(0xB85A0))(this, bEnable); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/CVehiclePool.cpp b/src/sampapi/0.3.DL-1/CVehiclePool.cpp new file mode 100644 index 00000000..f3899b94 --- /dev/null +++ b/src/sampapi/0.3.DL-1/CVehiclePool.cpp @@ -0,0 +1,94 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/CVehiclePool.h" + +SAMPAPI_BEGIN_V03DL_1 + +CVehiclePool::CVehiclePool() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1E4D0))(this); +} + +CVehiclePool::~CVehiclePool() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1EB20))(this); +} + +void CVehiclePool::UpdateCount() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1E470))(this); +} + +BOOL CVehiclePool::Delete(ID nId) { + return ((BOOL(__thiscall*)(CVehiclePool*, ID))GetAddress(0x1E540))(this, nId); +} + +void CVehiclePool::ChangeInterior(ID nId, int nInteriorId) { + ((void(__thiscall*)(CVehiclePool*, ID, int))GetAddress(0x1E5C0))(this, nId, nInteriorId); +} + +void CVehiclePool::SetParams(ID nId, bool bIsObjective, bool bIsLocked) { + ((void(__thiscall*)(CVehiclePool*, ID, bool, bool))GetAddress(0x1E5F0))(this, nId, bIsObjective, bIsLocked); +} + +ID CVehiclePool::Find(::CVehicle* pGameObject) { + return ((ID(__thiscall*)(CVehiclePool*, ::CVehicle*))GetAddress(0x1E650))(this, pGameObject); +} + +GTAREF CVehiclePool::GetRef(int nId) { + return ((GTAREF(__thiscall*)(CVehiclePool*, int))GetAddress(0x1E680))(this, nId); +} + +GTAREF CVehiclePool::GetRef(::CVehicle* pGameObject) { + return ((GTAREF(__thiscall*)(CVehiclePool*, ::CVehicle*))GetAddress(0x1E6A0))(this, pGameObject); +} + +ID CVehiclePool::GetNearest() { + return ((ID(__thiscall*)(CVehiclePool*))GetAddress(0x1E6C0))(this); +} + +ID CVehiclePool::GetNearest(CVector point) { + return ((ID(__thiscall*)(CVehiclePool*, CVector))GetAddress(0x1E730))(this, point); +} + +void CVehiclePool::AddToWaitingList(const VehicleInfo* pInfo) { + ((void(__thiscall*)(CVehiclePool*, const VehicleInfo*))GetAddress(0x1E7D0))(this, pInfo); +} + +void CVehiclePool::ConstructLicensePlates() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1E830))(this); +} + +void CVehiclePool::ShutdownLicensePlates() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1E8A0))(this); +} + +BOOL CVehiclePool::Create(VehicleInfo* pInfo) { + return ((BOOL(__thiscall*)(CVehiclePool*, VehicleInfo*))GetAddress(0x1EB40))(this, pInfo); +} + +void CVehiclePool::SendDestroyNotification(ID nId) { + ((void(__thiscall*)(CVehiclePool*, ID))GetAddress(0x1ECF0))(this, nId); +} + +void CVehiclePool::ProcessWaitingList() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1EDC0))(this); +} + +void CVehiclePool::Process() { + ((void(__thiscall*)(CVehiclePool*))GetAddress(0x1EE80))(this); +} + +CVehicle* CVehiclePool::Get(ID nId) { + return ((CVehicle * (__thiscall*)(CVehiclePool*, ID)) GetAddress(0x1120))(this, nId); +} + +BOOL CVehiclePool::DoesExist(ID nId) { + return ((BOOL(__thiscall*)(CVehiclePool*, ID))GetAddress(0x1150))(this, nId); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/Commands.cpp b/src/sampapi/0.3.DL-1/Commands.cpp new file mode 100644 index 00000000..71523c0d --- /dev/null +++ b/src/sampapi/0.3.DL-1/Commands.cpp @@ -0,0 +1,143 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/Commands.h" + +SAMPAPI_BEGIN_V03DL_1 + +void Commands::Default(const char* params) { + CMDPROC(GetAddress(0x67F50)) + (params); +} + +void Commands::TestDeathWindow(const char* params) { + CMDPROC(GetAddress(0x67F70)) + (params); +} + +void Commands::ToggleCameraTargetLabels(const char* params) { + CMDPROC(GetAddress(0x68050)) + (params); +} + +void Commands::SetChatPageSize(const char* params) { + CMDPROC(GetAddress(0x68060)) + (params); +} + +void Commands::SetChatFontSize(const char* params) { + CMDPROC(GetAddress(0x680E0)) + (params); +} + +void Commands::DrawNameTagStatus(const char* params) { + CMDPROC(GetAddress(0x68190)) + (params); +} + +void Commands::DrawChatTimestamps(const char* params) { + CMDPROC(GetAddress(0x681A0)) + (params); +} + +void Commands::ToggleAudioStreamMessages(const char* params) { + CMDPROC(GetAddress(0x68200)) + (params); +} + +void Commands::ToggleURLMessages(const char* params) { + CMDPROC(GetAddress(0x68270)) + (params); +} + +void Commands::PrintMemory(const char* params) { + CMDPROC(GetAddress(0x682F0)) + (params); +} + +void Commands::SetFrameLimiter(const char* params) { + CMDPROC(GetAddress(0x68310)) + (params); +} + +void Commands::ToggleHeadMoves(const char* params) { + CMDPROC(GetAddress(0x683A0)) + (params); +} + +void Commands::Quit(const char* params) { + CMDPROC(GetAddress(0x68420)) + (params); +} + +void Commands::CmpStat(const char* params) { + CMDPROC(GetAddress(0x68430)) + (params); +} + +void Commands::SavePosition(const char* params) { + CMDPROC(GetAddress(0x68440)) + (params); +} + +void Commands::SavePositionOnly(const char* params) { + CMDPROC(GetAddress(0x685C0)) + (params); +} + +void Commands::PrintCurrentInterior(const char* params) { + CMDPROC(GetAddress(0x68A10)) + (params); +} + +void Commands::ToggleObjectsLight(const char* params) { + CMDPROC(GetAddress(0x68A40)) + (params); +} + +void Commands::ToggleDebugLabels(const char* params) { + CMDPROC(GetAddress(0x68A60)) + (params); +} + +void Commands::SendRconCommand(const char* params) { + CMDPROC(GetAddress(0x68A70)) + (params); +} + +void Commands::Debug::SetPlayerSkin(const char* params) { + CMDPROC(GetAddress(0x68740)) + (params); +} + +void Commands::Debug::CreateVehicle(const char* params) { + CMDPROC(GetAddress(0x687B0)) + (params); +} + +void Commands::Debug::EnableVehicleSelection(const char* params) { + CMDPROC(GetAddress(0x688F0)) + (params); +} + +void Commands::Debug::SetWorldWeather(const char* params) { + CMDPROC(GetAddress(0x68910)) + (params); +} + +void Commands::Debug::SetWorldTime(const char* params) { + CMDPROC(GetAddress(0x68960)) + (params); +} + +void Commands::Setup() { + ((void(__cdecl*)())GetAddress(0x68B50))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/DebugScript.cpp b/src/sampapi/0.3.DL-1/DebugScript.cpp new file mode 100644 index 00000000..aeec4c97 --- /dev/null +++ b/src/sampapi/0.3.DL-1/DebugScript.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/DebugScript.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CObjectPool*& DebugScript::RefPrivateObjectPool() { + return *(CObjectPool**)GetAddress(0x18DE44); +} + +SAMPAPI_VAR unsigned short& DebugScript::RefObjectCount() { + return *(unsigned short*)GetAddress(0x18DE48); +} + +SAMPAPI_VAR CVector& DebugScript::RefNewCameraPos() { + return *(CVector*)GetAddress(0x18DE38); +} + +void DebugScript::Initialize(const char* szFile) { + ((void(__cdecl*)(const char*))GetAddress(0x9E7F0))(szFile); +} + +void DebugScript::ProcessLine(const char* szLine) { + ((void(__cdecl*)(const char*))GetAddress(0x9E6E0))(szLine); +} + +char* DebugScript::GetCommandParams(char* szLine) { + return ((char*(__cdecl*)(char*))GetAddress(0x9E2F0))(szLine); +} + +void DebugScript::CreateVehicle(const char* szParams) { + ((void(__cdecl*)(const char*))GetAddress(0x9E450))(szParams); +} + +void DebugScript::CreateObject(const char* szParams) { + ((void(__cdecl*)(const char*))GetAddress(0x9E340))(szParams); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/Exception.cpp b/src/sampapi/0.3.DL-1/Exception.cpp new file mode 100644 index 00000000..63f830e6 --- /dev/null +++ b/src/sampapi/0.3.DL-1/Exception.cpp @@ -0,0 +1,46 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/Exception.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR int& Exception::RefCount() { + return *(int*)GetAddress(0x163A70); +} + +SAMPAPI_VAR void*& Exception::RefContextRecord() { + return *(void**)GetAddress(0x15FA68); +} + +SAMPAPI_VAR char* Exception::ArrayCrashDialogText() { + return (char*)GetAddress(0x15FA70); +} + +BOOL Exception::Print(int nCode, void* pExceptionPointers, const char* szWarning) { + return ((BOOL(__stdcall*)(int, void*, const char*))GetAddress(0x60470))(nCode, pExceptionPointers, szWarning); +} + +void Exception::SendCrashReport() { + ((void(__cdecl*)())GetAddress(0x60260))(); +} + +BOOL Exception::CrashDialogProc(void* hWnd, unsigned int uMsg, unsigned int wParam, long lParam) { + return ((BOOL(__stdcall*)(void*, unsigned int, unsigned int, long))GetAddress(0x60330))(hWnd, uMsg, wParam, lParam); +} + +void Exception::ConstructCrashDialogText(BOOL bModules) { + ((void(__cdecl*)(BOOL))GetAddress(0x60070))(bModules); +} + +long Exception::Handler(void* pExceptionPointers) { + return ((long(__stdcall*)(void*))GetAddress(0x60430))(pExceptionPointers); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/GUI.cpp b/src/sampapi/0.3.DL-1/GUI.cpp new file mode 100644 index 00000000..4377e048 --- /dev/null +++ b/src/sampapi/0.3.DL-1/GUI.cpp @@ -0,0 +1,70 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/GUI.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CDXUTDialogResourceManager*& GUI::RefResourceMgr() { + return *(CDXUTDialogResourceManager**)GetAddress(0x2ACAB0); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefGameUi() { + return *(CDXUTDialog**)GetAddress(0x2ACAB4); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefScoreboard() { + return *(CDXUTDialog**)GetAddress(0x2ACAB8); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefDialog() { + return *(CDXUTDialog**)GetAddress(0x2ACAC0); +} + +SAMPAPI_VAR CDXUTDialog*& GUI::RefClassSelection() { + return *(CDXUTDialog**)GetAddress(0x2ACABC); +} + +SAMPAPI_VAR IDirect3DSurface9*& GUI::RefCursor() { + return *(IDirect3DSurface9**)GetAddress(0x2ACACC); +} + +SAMPAPI_VAR IDirect3DDevice9*& GUI::RefDevice() { + return *(IDirect3DDevice9**)GetAddress(0x2AC9D0); +} + +void GUI::Initialize() { + ((void(__cdecl*)())GetAddress(0xC6CE0))(); +} + +void GUI::OnLostDevice() { + ((void(__cdecl*)())GetAddress(0xC5620))(); +} + +void GUI::OnResetDevice() { + ((void(__cdecl*)())GetAddress(0xC5880))(); +} + +void GUI::GameUIEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC6BF0))(nEvent, nControlId, pControl, pUserContext); +} + +void GUI::ScoreboardEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC6C30))(nEvent, nControlId, pControl, pUserContext); +} + +void GUI::DialogEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC6B60))(nEvent, nControlId, pControl, pUserContext); +} + +void GUI::ClassSelectionEventHandler(unsigned int nEvent, int nControlId, CDXUTControl* pControl, void* pUserContext) { + ((void(__stdcall*)(unsigned int, int, CDXUTControl*, void*))GetAddress(0xC6C60))(nEvent, nControlId, pControl, pUserContext); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/InputHandler.cpp b/src/sampapi/0.3.DL-1/InputHandler.cpp new file mode 100644 index 00000000..df092e4f --- /dev/null +++ b/src/sampapi/0.3.DL-1/InputHandler.cpp @@ -0,0 +1,42 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/InputHandler.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR void*& InputHandler::RefPrevWindowProc() { + return *(void**)GetAddress(0x16BE78); +} + +SAMPAPI_VAR unsigned int& InputHandler::RefAntiCheatDetectCount() { + return *(unsigned int*)GetAddress(0x2ACA60); +} + +int InputHandler::WindowProc(unsigned int uMsg, unsigned int wParam, long lParam) { + return ((int(__stdcall*)(unsigned int, unsigned int, long))GetAddress(0x610D0))(uMsg, wParam, lParam); +} + +BOOL InputHandler::KeyPressHandler(unsigned int nKey) { + return ((BOOL(__cdecl*)(unsigned int))GetAddress(0x60DE0))(nKey); +} + +BOOL InputHandler::CharInputHandler(unsigned int nChar) { + return ((BOOL(__cdecl*)(unsigned int))GetAddress(0x61010))(nChar); +} + +BOOL InputHandler::Initialize() { + return ((BOOL(__cdecl*)())GetAddress(0x61940))(); +} + +void SwitchWindowedMode() { + ((void(__cdecl*)())GetAddress(0x60D90))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/KeyStuff.cpp b/src/sampapi/0.3.DL-1/KeyStuff.cpp new file mode 100644 index 00000000..54b15889 --- /dev/null +++ b/src/sampapi/0.3.DL-1/KeyStuff.cpp @@ -0,0 +1,82 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/KeyStuff.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CPad& KeyStuff::RefLocalPlayerKeys() { + return *(CPad*)GetAddress(0x190660); +} + +SAMPAPI_VAR CPad* KeyStuff::ArrayPlayerKeys() { + return (CPad*)GetAddress(0x190798); +} + +SAMPAPI_VAR CPad*& KeyStuff::RefInternalKeys() { + return *(CPad**)GetAddress(0x152AC0); +} + +SAMPAPI_VAR bool*& KeyStuff::RefDriveByLeft() { + return *(bool**)GetAddress(0x152AC4); +} + +SAMPAPI_VAR bool*& KeyStuff::RefDriveByRight() { + return *(bool**)GetAddress(0x152AC8); +} + +SAMPAPI_VAR bool& KeyStuff::RefSavedDriveByLeft() { + return *(bool*)GetAddress(0x1A0440); +} + +SAMPAPI_VAR bool& KeyStuff::RefSavedDriveByRight() { + return *(bool*)GetAddress(0x1A0441); +} + +void KeyStuff::Initialize() { + ((void(__cdecl*)())GetAddress(0xA6FE0))(); +} + +void KeyStuff::UpdateKeys() { + ((void(__cdecl*)())GetAddress(0xA7000))(); +} + +void KeyStuff::ApplyKeys() { + ((void(__cdecl*)())GetAddress(0xA7040))(); +} + +void KeyStuff::SetKeys(int nPlayer, const CPad* pKeys) { + ((void(__cdecl*)(int, const CPad*))GetAddress(0xA7080))(nPlayer, pKeys); +} + +void KeyStuff::ApplyKeys(int nPlayer) { + ((void(__cdecl*)(int))GetAddress(0xA70A0))(nPlayer); +} + +CPad* KeyStuff::GetInternalKeys() { + return ((::CPad * (__cdecl*)()) GetAddress(0xA70F0))(); +} + +CPad* KeyStuff::GetKeys() { + return ((::CPad * (__cdecl*)()) GetAddress(0xA7100))(); +} + +CPad* KeyStuff::GetKeys(int nPlayer) { + return ((::CPad * (__cdecl*)(int)) GetAddress(0xA7110))(nPlayer); +} + +void KeyStuff::ResetKeys(int nPlayer) { + ((void(__cdecl*)(int))GetAddress(0xA7120))(nPlayer); +} + +void KeyStuff::ResetInternalKeys() { + ((void(__cdecl*)())GetAddress(0xA7140))(); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/RPCHandlers.cpp b/src/sampapi/0.3.DL-1/RPCHandlers.cpp new file mode 100644 index 00000000..398e21b9 --- /dev/null +++ b/src/sampapi/0.3.DL-1/RPCHandlers.cpp @@ -0,0 +1,546 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/RPCHandlers.h" + +SAMPAPI_BEGIN_V03DL_1 + +void RPCHandlers::ScrSetPlayerSkillLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF4B0))(pParams); +} + +void RPCHandlers::ScrCreate3DTextLabel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF5E0))(pParams); +} + +void RPCHandlers::ScrDestroy3DTextLabel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF790))(pParams); +} + +void RPCHandlers::ScrChatBubble(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF850))(pParams); +} + +void RPCHandlers::ScrShowDialog(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF9C0))(pParams); +} + +void RPCHandlers::ScrSetCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10040))(pParams); +} + +void RPCHandlers::ScrDisableCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE430))(pParams); +} + +void RPCHandlers::ScrSetRaceCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10150))(pParams); +} + +void RPCHandlers::ScrDisableRaceCheckpoint(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE440))(pParams); +} + +void RPCHandlers::UpdateScoresPingsIps(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x102B0))(pParams); +} + +void RPCHandlers::SrvNetStats(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE450))(pParams); +} + +void RPCHandlers::ScrGamemodeRestart(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE4E0))(pParams); +} + +void RPCHandlers::ConnectionRejected(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10410))(pParams); +} + +void RPCHandlers::ScrClientMessage(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEE60))(pParams); +} + +void RPCHandlers::ScrSetWorldTime(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEDC0))(pParams); +} + +void RPCHandlers::ScrCreatePickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xEF50))(pParams); +} + +void RPCHandlers::ScrDestroyPickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF010))(pParams); +} + +void RPCHandlers::ScrDestroyWeaponPickup(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF0B0))(pParams); +} + +void RPCHandlers::ScmEvent(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF150))(pParams); +} + +void RPCHandlers::ScrSetWeather(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF240))(pParams); +} + +void RPCHandlers::ScrSetPlayerTime(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF2F0))(pParams); +} + +void RPCHandlers::ScrToggleClock(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xF3D0))(pParams); +} + +void RPCHandlers::ScrSetIngameTimer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFE00))(pParams); +} + +void RPCHandlers::ScrWorldPlayerAdd(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x109D0))(pParams); +} + +void RPCHandlers::ScrWorldPlayerDeath(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10C20))(pParams); +} + +void RPCHandlers::ScrWorldPlayerRemove(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10CE0))(pParams); +} + +void RPCHandlers::ScrWorldVehicleAdd(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE500))(pParams); +} + +void RPCHandlers::ScrWorldVehicleRemove(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10DC0))(pParams); +} + +void RPCHandlers::DamageVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11090))(pParams); +} + +void RPCHandlers::ScrSetVehicleParamsEx(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x111C0))(pParams); +} + +void RPCHandlers::EnterVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x114A0))(pParams); +} + +void RPCHandlers::ExitVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x115C0))(pParams); +} + +void RPCHandlers::ScrServerJoin(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFBB0))(pParams); +} + +void RPCHandlers::ScrServerQuit(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFD40))(pParams); +} + +void RPCHandlers::ScrInitGame(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x10530))(pParams); +} + +void RPCHandlers::Chat(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x121C0))(pParams); +} + +void RPCHandlers::RequestClass(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFEA0))(pParams); +} + +void RPCHandlers::RequestSpawn(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xFF70))(pParams); +} + +void RPCHandlers::EditAttachedObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x116B0))(pParams); +} + +void RPCHandlers::EditObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11770))(pParams); +} + +void RPCHandlers::EnterEditObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE740))(pParams); +} + +void RPCHandlers::ScrCancelEdit(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE800))(pParams); +} + +void RPCHandlers::ScrUpdateCameraTarget(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE8B0))(pParams); +} + +void RPCHandlers::ClientCheck(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11930))(pParams); +} + +void RPCHandlers::ScrCreateActor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0xE940))(pParams); +} + +void RPCHandlers::ScrDestroyActor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x11CD0))(pParams); +} + +void RPCHandlers::ScrDisableVehicleCollisions(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x178F0))(pParams); +} + +void RPCHandlers::ScrSetPlayerMapIcon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A2C0))(pParams); +} + +void RPCHandlers::ScrRemovePlayerMapIcon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A3E0))(pParams); +} + +void RPCHandlers::ScrSetPlayerAmmo(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A740))(pParams); +} + +void RPCHandlers::ScrSetGravity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A800))(pParams); +} + +void RPCHandlers::ScrSetVehicleHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A8A0))(pParams); +} + +void RPCHandlers::ScrAttachTrailerToVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A980))(pParams); +} + +void RPCHandlers::ScrDetachTrailerFromVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AAC0))(pParams); +} + +void RPCHandlers::ScrCreateObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1AE70))(pParams); +} + +void RPCHandlers::ScrSetObjectPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B540))(pParams); +} + +void RPCHandlers::ScrSetObjectRotation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B650))(pParams); +} + +void RPCHandlers::ScrDestroyObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B750))(pParams); +} + +void RPCHandlers::ScrCreateExplosion(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B840))(pParams); +} + +void RPCHandlers::ScrShowPlayerNametagForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B950))(pParams); +} + +void RPCHandlers::ScrMoveObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BA30))(pParams); +} + +void RPCHandlers::ScrStopObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BBE0))(pParams); +} + +void RPCHandlers::ScrSetNumberPlate(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BD60))(pParams); +} + +void RPCHandlers::ScrTogglePlayerSpectating(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BE80))(pParams); +} + +void RPCHandlers::ScrPlayerSpectatePlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BF30))(pParams); +} + +void RPCHandlers::ScrPlayerSpectateVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C010))(pParams); +} + +void RPCHandlers::ScrMoveVehicleComponent(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C0F0))(pParams); +} + +void RPCHandlers::ScrForceClassSelection(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17BE0))(pParams); +} + +void RPCHandlers::ScrAttachObjectToPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C1D0))(pParams); +} + +void RPCHandlers::ScrSetPlayerWantedLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C7B0))(pParams); +} + +void RPCHandlers::ScrShowTextDraw(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C850))(pParams); +} + +void RPCHandlers::ScrHideTextDrawForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C980))(pParams); +} + +void RPCHandlers::ScrTextDrawSetString(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CF70))(pParams); +} + +void RPCHandlers::ScrGangZoneCreate(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CB40))(pParams); +} + +void RPCHandlers::ScrGangZoneDestroy(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CC60))(pParams); +} + +void RPCHandlers::ScrGangZoneFlash(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CD10))(pParams); +} + +void RPCHandlers::ScrGangZoneStopFlash(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CDD0))(pParams); +} + +void RPCHandlers::ScrApplyAnimation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A480))(pParams); +} + +void RPCHandlers::ScrClearAnimations(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18090))(pParams); +} + +void RPCHandlers::ScrSetPlayerSpecialAction(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x181A0))(pParams); +} + +void RPCHandlers::ScrEnableStuntBonusForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17860))(pParams); +} + +void RPCHandlers::ScrSetPlayerFightingStyle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18250))(pParams); +} + +void RPCHandlers::ScrSetPlayerVelocity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18350))(pParams); +} + +void RPCHandlers::ScrSetVehicleVelocity(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18450))(pParams); +} + +void RPCHandlers::ScrPlayCrimeReport(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18B40))(pParams); +} + +void RPCHandlers::ScrSetSpawnInfo(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17A60))(pParams); +} + +void RPCHandlers::ScrSetPlayerTeam(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19240))(pParams); +} + +void RPCHandlers::ScrSetPlayerSkin(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18C80))(pParams); +} + +void RPCHandlers::ScrSetPlayerName(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1DA90))(pParams); +} + +void RPCHandlers::ScrSetPlayerPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18E50))(pParams); +} + +void RPCHandlers::ScrSetPlayerPositionFindZ(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18F70))(pParams); +} + +void RPCHandlers::ScrSetPlayerHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19080))(pParams); +} + +void RPCHandlers::ScrPutPlayerInVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19130))(pParams); +} + +void RPCHandlers::ScrRemovePlayerFromVehicle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17B00))(pParams); +} + +void RPCHandlers::ScrSetPlayerColor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19330))(pParams); +} + +void RPCHandlers::ScrDisplayGametext(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19420))(pParams); +} + +void RPCHandlers::ScrSetPlayerInterior(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19530))(pParams); +} + +void RPCHandlers::ScrSetPlayerCameraPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x195D0))(pParams); +} + +void RPCHandlers::ScrSetPlayerCameraLookAt(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x196A0))(pParams); +} + +void RPCHandlers::ScrSetVehiclePosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x197A0))(pParams); +} + +void RPCHandlers::ScrSetVehicleZAngle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x198B0))(pParams); +} + +void RPCHandlers::ScrSetVehicleParamsForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19990))(pParams); +} + +void RPCHandlers::ScrSetCameraBehindPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17B90))(pParams); +} + +void RPCHandlers::ScrTogglePlayerControllable(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19DC0))(pParams); +} + +void RPCHandlers::ScrPlaySound(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19E60))(pParams); +} + +void RPCHandlers::ScrSetPlayerWorldBounds(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19F40))(pParams); +} + +void RPCHandlers::ScrGivePlayerMoney(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A030))(pParams); +} + +void RPCHandlers::ScrSetPlayerFacingAngle(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A0D0))(pParams); +} + +void RPCHandlers::ScrResetPlayerMoney(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17BA0))(pParams); +} + +void RPCHandlers::ScrResetPlayerWeapons(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17BB0))(pParams); +} + +void RPCHandlers::ScrGivePlayerWeapon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A170))(pParams); +} + +void RPCHandlers::ScrLinkVehicleToInterior(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19A60))(pParams); +} + +void RPCHandlers::ScrSetPlayerArmor(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1A690))(pParams); +} + +void RPCHandlers::ScrDeathMessage(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D830))(pParams); +} + +void RPCHandlers::ScrSetPlayerShopName(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17960))(pParams); +} + +void RPCHandlers::ScrSetPlayerDrunkLevel(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x188B0))(pParams); +} + +void RPCHandlers::ScrSetPlayerArmedWeapon(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18950))(pParams); +} + +void RPCHandlers::ScrSetPlayerAttachedObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x18A00))(pParams); +} + +void RPCHandlers::ScrPlayAudioStream(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CE80))(pParams); +} + +void RPCHandlers::ScrStopAudioStream(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x17C00))(pParams); +} + +void RPCHandlers::ScrRemoveBuildingForPlayer(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1CFF0))(pParams); +} + +void RPCHandlers::ScrAttachCameraToObject(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19B20))(pParams); +} + +void RPCHandlers::ScrInterpolateCamera(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x19C20))(pParams); +} + +void RPCHandlers::ClickTextDraw(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D110))(pParams); +} + +void RPCHandlers::ScrSetObjectMaterial(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1B1D0))(pParams); +} + +void RPCHandlers::ScrStopObjectCameraCollision(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1BCA0))(pParams); +} + +void RPCHandlers::ScrSetActorAnimation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D210))(pParams); +} + +void RPCHandlers::ScrSetActorRotation(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D4B0))(pParams); +} + +void RPCHandlers::ScrSetActorPosition(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D590))(pParams); +} + +void RPCHandlers::ScrSetActorHealth(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1D6A0))(pParams); +} + +void RPCHandlers::ScrInitMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C390))(pParams); +} + +void RPCHandlers::ScrShowMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C650))(pParams); +} + +void RPCHandlers::ScrHideMenu(RPCParameters* pParams) { + ((void(*)(RPCParameters*))GetAddress(0x1C700))(pParams); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/Scripting.cpp b/src/sampapi/0.3.DL-1/Scripting.cpp new file mode 100644 index 00000000..1ec5275c --- /dev/null +++ b/src/sampapi/0.3.DL-1/Scripting.cpp @@ -0,0 +1,50 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/Scripting.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR CRunningScript*& Scripting::RefThread() { + return *(CRunningScript**)GetAddress(0x2A93F0); +} + +SAMPAPI_VAR unsigned char* Scripting::ArrayBuffer() { + return (unsigned char*)GetAddress(0x2A92F0); +} + +SAMPAPI_VAR unsigned long& Scripting::RefLastUsedOpcode() { + return *(unsigned long*)GetAddress(0x2A93F4); +} + +SAMPAPI_VAR unsigned long** Scripting::ArrayThreadLocals() { + return (unsigned long**)GetAddress(0x2A92A8); +} + +SAMPAPI_VAR Scripting::ProcessOneCommandFn& Scripting::RefProcessOneCommand() { + return *(Scripting::ProcessOneCommandFn*)GetAddress(0x155390); +} + +SAMPAPI_VAR BOOL& Scripting::RefLocalDebug() { + return *(BOOL*)GetAddress(0x2A93F8); +} + +void Scripting::Initialize() { + ((void(__cdecl*)())GetAddress(0xB2150))(); +} + +int Scripting::ExecBuffer() { + return ((int(__cdecl*)())GetAddress(0xB1ED0))(); +} + +int(__cdecl* Scripting::FunctionProcessCommand())(const Scripting::OpcodeInfo*, ...) { + return (int(__cdecl*)(const OpcodeInfo*, ...))GetAddress(0xB1F10); +} + +SAMPAPI_END diff --git a/src/sampapi/0.3.DL-1/Settings.cpp b/src/sampapi/0.3.DL-1/Settings.cpp new file mode 100644 index 00000000..c4d592fa --- /dev/null +++ b/src/sampapi/0.3.DL-1/Settings.cpp @@ -0,0 +1,30 @@ +/* + This is a SAMP (0.3.DL-1) API project file. + Developers: LUCHARE , ARMOR + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/0.3.DL-1/Settings.h" + +SAMPAPI_BEGIN_V03DL_1 + +SAMPAPI_VAR Settings& RefSettings() { + return *(Settings*)GetAddress(0x2ABE78); +} + +void Settings::Initialize() { + ((void(__cdecl*)())GetAddress(0xC5C90))(); +} + +void Settings::GetFromCommandLine(const char* szLine, char* szBuffer) { + ((void(__cdecl*)(const char*, char*))GetAddress(0xC5590))(szLine, szBuffer); +} + +void Settings::GetFromQuotes(const char* szLine, char* szBuffer) { + ((void(__cdecl*)(const char*, char*))GetAddress(0xC55E0))(szLine, szBuffer); +} + +SAMPAPI_END diff --git a/src/sampapi/CMakeLists.txt b/src/sampapi/CMakeLists.txt index 9846d906..f025c30c 100644 --- a/src/sampapi/CMakeLists.txt +++ b/src/sampapi/CMakeLists.txt @@ -1,9 +1,12 @@ add_subdirectory(0.3.7-R1) add_subdirectory(0.3.7-R3-1) +add_subdirectory(0.3.7-R5-1) +add_subdirectory(0.3.DL-1) target_sources(sampapi PRIVATE sampapi.cpp CRect.cpp CVector.cpp + CPoint.cpp ) diff --git a/src/sampapi/CPoint.cpp b/src/sampapi/CPoint.cpp new file mode 100644 index 00000000..9466305f --- /dev/null +++ b/src/sampapi/CPoint.cpp @@ -0,0 +1,24 @@ +/* + This is a SAMP API project file. + Developer: LUCHARE + + See more here https://github.com/LUCHARE/SAMP-API + + Copyright (c) 2018 BlastHack Team . All rights reserved. +*/ + +#include "sampapi/CPoint.h" + +SAMPAPI_BEGIN_COMMON + +CPoint::CPoint() + : x(0), + y(0) { +} + +CPoint::CPoint(long x, long y) + : x(x), + y(y) { +} + +SAMPAPI_END_COMMON diff --git a/src/sampapi/sampapi.cpp b/src/sampapi/sampapi.cpp index 2d45f02f..87e30332 100644 --- a/src/sampapi/sampapi.cpp +++ b/src/sampapi/sampapi.cpp @@ -1,14 +1,14 @@ /* This is a SAMP API project file. Developer: LUCHARE - + See more here https://github.com/LUCHARE/SAMP-API - + Copyright (c) 2018 BlastHack Team . All rights reserved. */ #include "sampapi/sampapi.h" -#include +#include SAMPAPI_BEGIN_COMMON