Advertisement
Guest User

ScriptClasses.h

a guest
Jan 21st, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.34 KB | None | 0 0
  1. /*
  2. file:
  3. ScriptClasses.h
  4. desc:
  5. Header file for ScriptClasses.cpp
  6. */
  7.  
  8. #ifndef SCRIPTCLASSES_H
  9. #define SCRIPTCLASSES_H
  10.  
  11. // Includes
  12. #include "GameScripting.h"
  13. #include "MissionHook.h"
  14.  
  15.  
  16. //Class definitions
  17. class ScriptScript
  18. {
  19. public:
  20. ScriptScript();
  21. ~ScriptScript();
  22.  
  23. bool ModelAvailable(DWORD dwModel);
  24.  
  25. void CreateThread(int StartIP);
  26. void TerminateThread();
  27. void NameThread(char ThreadName[8]);
  28. void Wait(int msTime);
  29. };
  30.  
  31. class ScriptGame
  32. {
  33. public:
  34. ScriptGame();
  35. ~ScriptGame();
  36.  
  37. bool Fading();
  38.  
  39. void Fade(int Time, int InOut);
  40. void SetMaxWantedLevel(int MaxLevel);
  41. void SetWastedBustedCheck(bool Check);
  42. void SetCurrentTime(int Hours, int Minutes);
  43. void RefreshScreen(float fX, float fY);
  44. void SetCamera(float fX, float fY, float fZ);
  45. void SetWeather(int Weather);
  46. void SelectInterior(int Interior);
  47. void PlayMusic(int iMusic);
  48. void TextStyledOneNumber(char Text[8], int iNumber, int iTime, int iStyle);
  49. void TextStyled(char Text[8], int iTime, int iStyle);
  50. void TextNow(char Text[8], int iTime, int iStyle);
  51. void SetWidescreen(bool bWidescreen);
  52. void SetCameraBehindPlayer();
  53. void SetCameraOnVehicle(DWORD* pdwVehicle);
  54. void PointCamera(float fX, float fY, float fZ, int iType);
  55. void RestoreCameraJumpcut();
  56. void SetCameraPosition(float fX1, float fY1, float fZ1, float fX2, float fY2, float fZ2);
  57. void SetWastedSpawnPosition(float fX, float fY, float fZ, float fZAngle);
  58. void SetBustedSpawnPosition(float fX, float fY, float fZ, float fZAngle);
  59. };
  60.  
  61. class ScriptPlayer
  62. {
  63. private:
  64. DWORD m_dwChar;
  65. DWORD m_dwActor;
  66. public:
  67. ScriptPlayer(float fX, float fY, float fZ);
  68. ~ScriptPlayer();
  69.  
  70. DWORD* GetChar();
  71. DWORD* GetActor();
  72.  
  73. bool NearPoint(float fX, float fY, float fZ, float fRX, float fRY, float fRZ, bool bSphere);
  74. bool NearPointOnFoot(float fX, float fY, float fZ, float fRX, float fRY, float fRZ, bool bSphere);
  75.  
  76. void SetSkin(char Model[8]);
  77. void Freeze(bool bFrozen);
  78. void ClearWantedLevel();
  79. void SetWantedLevel(int iLevel);
  80. void SetHealth(int iHealth);
  81. void SetZAngle(float fAngle);
  82. void GiveWeapon(SCRIPT_MISSION* m_pMission, DWORD dwIDWeapon, DWORD dwWeapon, DWORD dwAmmo);
  83. void GiveMoney(int iMoney);
  84. };
  85.  
  86. class ScriptActor
  87. {
  88. private:
  89. DWORD m_dwActor;
  90. SCRIPT_MISSION* m_pMission;
  91. bool m_bKeepOnDestroy;
  92. bool m_bSpawned;
  93. public:
  94. ScriptActor(SCRIPT_MISSION* pMission, bool bKeepOnDestroy = true);
  95. ~ScriptActor();
  96.  
  97. DWORD* GetActor();
  98. bool Dead();
  99. bool NearPoint(float fX, float fY, float fZ, float fRX, float fRY, float fRZ, bool bSphere);
  100.  
  101. void Spawn(int iPedType, DWORD dwModel, float fX, float fY, float fZ);
  102. void SpawnInPassengerSeat(DWORD* pdwVehicle, int iPedType, DWORD dwModel, int iSeat);
  103. void SpawnInDriverSeat(DWORD* pdwVehicle, int iPedType, DWORD dwModel);
  104. void GiveWeapon(DWORD dwIDWeapon, DWORD dwWeapon, DWORD dwAmmo);
  105. void ResetFlags();
  106. void SetPedStats(DWORD dwPedStats);
  107. void SetWander(bool bWander);
  108. void TieToPlayer(DWORD* pdwPlayer);
  109. void LeaveVehicle();
  110. void KillActor(DWORD* pdwActor);
  111. void KillPlayer(DWORD* pdwPlayer);
  112. };
  113.  
  114. class ScriptSpecialActor
  115. {
  116. private:
  117. SCRIPT_MISSION* m_pMission;
  118. ScriptActor* m_pActor;
  119. int m_iSlot;
  120. public:
  121. ScriptSpecialActor(SCRIPT_MISSION* pMission, int iSlot, char Model[8]);
  122. ~ScriptSpecialActor();
  123.  
  124. DWORD* GetActor();
  125. bool Dead();
  126. bool NearPoint(float fX, float fY, float fZ, float fRX, float fRY, float fRZ, bool bSphere);
  127.  
  128. void Spawn(int iPedType, float fX, float fY, float fZ);
  129. void SpawnInPassengerSeat(DWORD* pdwVehicle, int iPedType, int iSeat);
  130. void SpawnInDriverSeat(DWORD* pdwVehicle, int iPedType);
  131. void TieToPlayer(DWORD* pdwPlayer);
  132. void LeaveVehicle();
  133. void SetWander(bool bWander);
  134. };
  135.  
  136. class ScriptVehicle
  137. {
  138. private:
  139. DWORD m_dwVehicle;
  140. SCRIPT_MISSION* m_pMission;
  141. bool m_bKeepOnDestroy;
  142. public:
  143. ScriptVehicle(SCRIPT_MISSION* pMission, DWORD dwModel, float fX, float fY, float fZ, bool bKeepOnDestroy = true);
  144. ~ScriptVehicle();
  145.  
  146. DWORD* GetVehicle();
  147. int GetHealth();
  148. bool NearPoint(float fX, float fY, float fZ, float fRX, float fRY, float fRZ, bool bSphere);
  149.  
  150. void SetColour(int iPrimary, int iSecondary);
  151. void SetZAngle(float fAngle);
  152. void GetRelativeCoordinates(float fX, float fY, float fZ, float* pfX, float* pfY, float* pfZ);
  153. void DriveToOnRoad(float fX, float fY, float fZ);
  154. void SetMaxSpeed(float fSpeed);
  155. void IgnoreTraffic(int iFlag);
  156. void SetImmuneToNonplayer(bool bImmune);
  157. void SetDoorStatus(int iStatus);
  158. void SetSiren(bool bSiren);
  159. void SetBehaviour(int iBehaviour);
  160. };
  161.  
  162. class ScriptMarker
  163. {
  164. private:
  165. DWORD m_dwMarker;
  166. bool m_bCreated;
  167. public:
  168. ScriptMarker();
  169. ~ScriptMarker();
  170.  
  171. void TieToActor(DWORD* pdwActor, int iSize, int iType);
  172. void TieToVehicle(DWORD* pdwVehicle, int iSize, int iType);
  173. void SphereAndIcon(float x, float y, float z, int iIcon);
  174. void ShowOnRadar(int iSize);
  175. void SetColor(int iColour);
  176. };
  177.  
  178. class ScriptPickUp
  179. {
  180. private:
  181. DWORD m_dwPickUp;
  182. SCRIPT_MISSION* m_pMission;
  183. bool m_bCreated;
  184. bool m_bKeepForeever;
  185.  
  186. public:
  187. ScriptPickUp(SCRIPT_MISSION* pMission);
  188. ~ScriptPickUp();
  189.  
  190. void CreatePickUp(DWORD dwModel, int iType, float fx, float fy, float fz);
  191. void CreateWeaponPickUp(DWORD dwIDWeapon, DWORD dwWeapon, int iType,DWORD dwAmmo, float fx, float fy, float fz);
  192. bool IsPickedUp();
  193. void Keep(bool bKeepForever); //Use for only Weapons
  194. };
  195.  
  196. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement