Advertisement
Guest User

Untitled

a guest
Sep 9th, 2012
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.20 KB | None | 0 0
  1. /*
  2. Project: Vice City Multiplayer 0.4 Server / Plugin kit
  3. File: plugin.h
  4.  
  5. Copyright 2011 Ago Allikmaa (maxorator)
  6.  
  7. Licensed under the Apache License, Version 2.0 (the "License");
  8. you may not use this file except in compliance with the License.
  9. You may obtain a copy of the License at
  10.  
  11. http://www.apache.org/licenses/LICENSE-2.0
  12.  
  13. Unless required by applicable law or agreed to in writing, software
  14. distributed under the License is distributed on an "AS IS" BASIS,
  15. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. See the License for the specific language governing permissions and
  17. limitations under the License.
  18. */
  19.  
  20. #pragma once
  21. #include <stdint.h>
  22.  
  23. struct ServerSettings {
  24. unsigned int uStructSize;
  25. char szServerName[128];
  26. unsigned int uMaxPlayers;
  27. unsigned int uPort;
  28. unsigned int uFlags;
  29. };
  30.  
  31. struct PluginInfo {
  32. unsigned int uStructSize;
  33. int nPluginId;
  34. char szName[32];
  35. unsigned int uPluginVer;
  36. };
  37.  
  38. //PLUGIN SYSTEM
  39. typedef unsigned int (*PFunc_GetServerVersion) (void);
  40. typedef unsigned int (*PFunc_GetServerSettings) (ServerSettings* pstSettings);
  41. typedef unsigned int (*PFunc_ExportFunctions) (int nPluginId, void** ppFunctionList, unsigned int uSize);
  42. typedef unsigned int (*PFunc_GetNumberOfPlugins) (void);
  43. typedef unsigned int (*PFunc_GetPluginInfo) (int nPluginId, PluginInfo* pstPluginInfo);
  44. typedef int (*PFunc_FindPlugin) (char* pszPluginName);
  45. typedef void** (*PFunc_GetPluginExports) (int nPluginId, unsigned int* puSize);
  46. typedef int (*PFunc_GetTime) (uint64_t* pullTime);
  47.  
  48. //MESSAGES
  49. typedef int (*PFunc_printf) (const char* pszFormat, ...);
  50. typedef int (*PFunc_SendCustomCommand) (unsigned int uCmdType, const char* pszFormat, ...);
  51. typedef int (*PFunc_SendClientMessage) (int nPlayerId, unsigned int uColour, const char* pszFormat, ...);
  52. typedef int (*PFunc_SendGameMessage) (int nPlayerId, int nType, const char* pszFormat, ... );
  53.  
  54. //SERVER SETTINGS
  55. typedef int (*PFunc_SetServerName) (const char* pszText);
  56. typedef int (*PFunc_GetServerName) (char* pszBuffer, int nBufferLen);
  57. typedef int (*PFunc_SetMaxPlayers) (int nMaxPlayers);
  58. typedef int (*PFunc_GetMaxPlayers) (void);
  59. typedef int (*PFunc_SetServerPassword) (char* pszBuffer);
  60. typedef int (*PFunc_GetServerPassword) (char* pszBuffer, int nBufferLen);
  61. typedef int (*PFunc_SetGameModeText) (const char* pszText);
  62. typedef int (*PFunc_GetGameModeText) (char* pszBuffer, int nBufferLen);
  63.  
  64. //WORLD: settings
  65. typedef int (*PFunc_SetWorldBounds) (float fMaxX, float fMinX, float fMaxY, float fMinY);
  66. typedef int (*PFunc_GetWorldBounds) (float* pfMaxX, float* pfMinX, float* pfMaxY, float* pfMinY);
  67. typedef int (*PFunc_SetWastedSettings) (unsigned int dwDeathTimer, unsigned int dwFadeTimer, float fFadeInSpeed, float fFadeOutSpeed, unsigned int dwFadeColour, unsigned int dwCorpseFadeStart, unsigned int dwCorpseFadeTime);
  68. typedef int (*PFunc_GetWastedSettings) (unsigned int* pdwDeathTimer, unsigned int* pdwFadeTimer, float* pfFadeInSpeed, float* pfFadeOutSpeed, unsigned int* pdwFadeColour, unsigned int* pdwCorpseFadeStart, unsigned int* pdwCorpseFadeTime);
  69. typedef int (*PFunc_SetTimeRate) (unsigned int uTimeRate);
  70. typedef unsigned int (*PFunc_GetTimeRate) (void);
  71. typedef int (*PFunc_SetHour) (int nHour);
  72. typedef int (*PFunc_GetHour) (void);
  73. typedef int (*PFunc_SetMinute) (int nMinute);
  74. typedef int (*PFunc_GetMinute) (void);
  75. typedef int (*PFunc_SetWeather) (int nWeather);
  76. typedef int (*PFunc_GetWeather) (void);
  77. typedef int (*PFunc_SetGravity) (float fGravity);
  78. typedef float (*PFunc_GetGravity) (void);
  79. typedef int (*PFunc_SetGamespeed) (float fGamespeed);
  80. typedef float (*PFunc_GetGamespeed) (void);
  81. typedef int (*PFunc_SetWaterLevel) (float fWaterLevel);
  82. typedef float (*PFunc_GetWaterLevel) (void);
  83. typedef int (*PFunc_SetMaxHeight) (float fHeight);
  84. typedef float (*PFunc_GetMaxHeight) (void);
  85.  
  86. //WORLD: toggles
  87. typedef int (*PFunc_ToggleSyncFrameLimiter) (unsigned int bToggle);
  88. typedef unsigned int (*PFunc_EnabledSyncFrameLimiter) (void);
  89. typedef int (*PFunc_ToggleFrameLimiter) (unsigned int bToggle);
  90. typedef unsigned int (*PFunc_EnabledFrameLimiter) (void);
  91. typedef int (*PFunc_ToggleTaxiBoostJump) (unsigned int bToggle);
  92. typedef unsigned int (*PFunc_EnabledTaxiBoostJump) (void);
  93. typedef int (*PFunc_ToggleDriveOnWater) (unsigned int bToggle);
  94. typedef unsigned int (*PFunc_EnabledDriveOnWater) (void);
  95. typedef int (*PFunc_ToggleFastSwitch) (unsigned int bToggle);
  96. typedef unsigned int (*PFunc_EnabledFastSwitch) (void);
  97. typedef int (*PFunc_ToggleFriendlyFire) (unsigned int bToggle);
  98. typedef unsigned int (*PFunc_EnabledFriendlyFire) (void);
  99. typedef int (*PFunc_ToggleDisableDriveby) (unsigned int bToggle);
  100. typedef unsigned int (*PFunc_EnabledDisableDriveby) (void);
  101. typedef int (*PFunc_TogglePerfectHandling) (unsigned int bToggle);
  102. typedef unsigned int (*PFunc_EnabledPerfectHandling) (void);
  103. typedef int (*PFunc_ToggleFlyingCars) (unsigned int bToggle);
  104. typedef unsigned int (*PFunc_EnabledFlyingCars) (void);
  105. typedef int (*PFunc_ToggleJumpSwitch) (unsigned int bToggle);
  106. typedef unsigned int (*PFunc_EnabledJumpSwitch) (void);
  107. typedef int (*PFunc_ToggleShowOnRadar) (unsigned int bToggle);
  108. typedef unsigned int (*PFunc_EnabledShowOnRadar) (void);
  109. typedef int (*PFunc_ToggleStuntBike) (unsigned int bToggle);
  110. typedef unsigned int (*PFunc_EnabledStuntBike) (void);
  111. typedef int (*PFunc_ToggleShootInAir) (unsigned int bToggle);
  112. typedef unsigned int (*PFunc_EnabledShootInAir) (void);
  113. typedef int (*PFunc_ToggleShowNametags) (unsigned int bToggle);
  114. typedef unsigned int (*PFunc_EnabledShowNametags) (void);
  115. typedef int (*PFunc_ToggleJoinMessages) (unsigned int bToggle);
  116. typedef unsigned int (*PFunc_EnabledJoinMessages) (void);
  117. typedef int (*PFunc_ToggleDeathMessages) (unsigned int bToggle);
  118. typedef unsigned int (*PFunc_EnabledDeathMessages) (void);
  119.  
  120. //MISC
  121. typedef int (*PFunc_CreateExplosion) (int nWorldId, int nType, float fPosX, float fPosY, float fPosZ, int nSourcePlayerId, unsigned int bGroundLevel);
  122. typedef int (*PFunc_PlaySound) (int nWorldId, int nSoundId, float fPosX, float fPosY, float fPosZ);
  123.  
  124. //CLASSES
  125. typedef int (*PFunc_SetUseClasses) (unsigned int bToggle);
  126. typedef unsigned int (*PFunc_GetUseClasses) (void);
  127. typedef int (*PFunc_GetPlayerClass) (int nPlayerId);
  128. typedef int (*PFunc_AddPlayerClass) (int nTeamId, unsigned int uColour, int nModelId, float fSpawnX, float fSpawnY, float fSpawnZ, float fAngleZ, int nWep1, int nWep1Ammo, int nWep2, int nWep2Ammo, int nWep3, int nWep3Ammo);
  129. typedef int (*PFunc_SetSpawnPlayerPos) (float fPosX, float fPosY, float fPosZ);
  130. typedef int (*PFunc_SetSpawnCameraPos) (float fPosX, float fPosY, float fPosZ);
  131. typedef int (*PFunc_SetSpawnCameraLookAt) (float fPosX, float fPosY, float fPosZ);
  132.  
  133. //ADMIN
  134. typedef unsigned int (*PFunc_IsPlayerAdmin) (int nPlayerId);
  135. typedef int (*PFunc_SetPlayerAdmin) (int nPlayerId, unsigned int bToggle);
  136. typedef int (*PFunc_GetPlayerIP) (int nPlayerId, char* pszBuffer, int nBufferLen);
  137. typedef int (*PFunc_KickPlayer) (int nPlayerId);
  138. typedef int (*PFunc_BanPlayer) (int nPlayerId);
  139. typedef int (*PFunc_BanIP) (char* pszIPAddress);
  140. typedef int (*PFunc_UnbanIP) (char* pszIPAddress);
  141. typedef unsigned int (*PFunc_IsIPBanned) (char* pszIPAddress);
  142.  
  143. //PLAYERS: basic
  144. typedef int (*PFunc_GetPlayerIDFromName) (char* pszName);
  145. typedef unsigned int (*PFunc_IsPlayerConnected) (int nPlayerId);
  146. typedef unsigned int (*PFunc_IsPlayerSpawned) (int nPlayerId);
  147. typedef unsigned int (*PFunc_GetPlayerKey) (int nPlayerId);
  148. typedef int (*PFunc_SetPlayerWorld) (int nPlayerId, int nWorld);
  149. typedef int (*PFunc_GetPlayerWorld) (int nPlayerId);
  150. typedef int (*PFunc_SetPlayerSecWorld) (int nPlayerId, int nSecWorld);
  151. typedef int (*PFunc_GetPlayerSecWorld) (int nPlayerId);
  152. typedef int (*PFunc_GetPlayerUniqueWorld) (int nPlayerId);
  153. typedef unsigned int (*PFunc_IsPlayerWorldCompatible) (int nPlayerId, int nWorld);
  154. typedef int (*PFunc_GetPlayerState) (int nPlayerId);
  155. typedef int (*PFunc_GetPlayerName) (int nPlayerId, char* szBuffer, int nBufferLen);
  156. typedef int (*PFunc_SetPlayerTeam) (int nPlayerId, int nTeamId);
  157. typedef int (*PFunc_GetPlayerTeam) (int nPlayerId);
  158. typedef int (*PFunc_SetPlayerSkin) (int nPlayerId, int nSkinId);
  159. typedef int (*PFunc_GetPlayerSkin) (int nPlayerId);
  160. typedef int (*PFunc_SetPlayerColour) (int nPlayerId, unsigned int uColour);
  161. typedef unsigned int (*PFunc_GetPlayerColour) (int nPlayerId);
  162. typedef int (*PFunc_ForceSpawn) (int nPlayerId);
  163.  
  164. //PLAYERS: score, ping, money, typing
  165. typedef int (*PFunc_GivePlayerMoney) (int nPlayerId, int nAmount);
  166. typedef int (*PFunc_SetPlayerMoney) (int nPlayerId, int nAmount);
  167. typedef int (*PFunc_GetPlayerMoney) (int nPlayerId);
  168. typedef int (*PFunc_SetPlayerScore) (int nPlayerId, int nScore);
  169. typedef int (*PFunc_GetPlayerScore) (int nPlayerId);
  170. typedef int (*PFunc_GetPlayerPing) (int nPlayerId);
  171. typedef unsigned int (*PFunc_IsPlayerTyping) (int nPlayerId);
  172.  
  173. //PLAYERS: health and location
  174. typedef int (*PFunc_SetPlayerHealth) (int nPlayerId, float fHealth);
  175. typedef float (*PFunc_GetPlayerHealth) (int nPlayerId);
  176. typedef int (*PFunc_SetPlayerArmour) (int nPlayerId, float fArmour);
  177. typedef float (*PFunc_GetPlayerArmour) (int nPlayerId);
  178. typedef int (*PFunc_SetPlayerImmunityFlags) (int nPlayerId, int nFlags);
  179. typedef int (*PFunc_GetPlayerImmunityFlags) (int nPlayerId);
  180. typedef int (*PFunc_SetPlayerPos) (int nPlayerId, float fPosX, float fPosY, float fPosZ);
  181. typedef int (*PFunc_GetPlayerPos) (int nPlayerId, float* pfPosX, float* pfPosY, float* pfPosZ);
  182. typedef int (*PFunc_SetPlayerSpeed) (int nPlayerId, float fSpeedX, float fSpeedY, float fSpeedZ);
  183. typedef int (*PFunc_GetPlayerSpeed) (int nPlayerId, float* pfSpeedX, float* pfSpeedY, float* pfSpeedZ);
  184. typedef int (*PFunc_AddPlayerSpeed) (int nPlayerId, float fSpeedX, float fSpeedY, float fSpeedZ);
  185. typedef int (*PFunc_SetPlayerHeading) (int nPlayerId, float fAngleZ);
  186. typedef float (*PFunc_GetPlayerHeading) (int nPlayerId);
  187. typedef int (*PFunc_SetPlayerInterior) (int nPlayerId, int nInterior);
  188. typedef int (*PFunc_SetPlayerAlpha) (int nPlayerId, int nAlpha, int nFadeTime);
  189. typedef int (*PFunc_GetPlayerAlpha) (int nPlayerId);
  190.  
  191. //PLAYERS: vehicle
  192. typedef int (*PFunc_PutPlayerInVehicle) (int nPlayerId, int nVehicleId, int nSlot, unsigned int bMakeRoom, unsigned int bWarp);
  193. typedef int (*PFunc_RemovePlayerFromVehicle) (int nPlayerId);
  194. typedef int (*PFunc_GetPlayerInVehicleStatus) (int nPlayerId);
  195. typedef int (*PFunc_GetPlayerInVehicleSlot) (int nPlayerId);
  196. typedef int (*PFunc_GetPlayerVehicleID) (int nPlayerId);
  197.  
  198. //PLAYERS: toggles
  199. typedef int (*PFunc_TogglePlayerControllable) (int nPlayerId, unsigned int bToggle);
  200. typedef unsigned int (*PFunc_EnabledPlayerControllable) (int nPlayerId);
  201. typedef int (*PFunc_TogglePlayerDriveby) (int nPlayerId, unsigned int bToggle);
  202. typedef unsigned int (*PFunc_EnabledPlayerDriveby) (int nPlayerId);
  203. typedef int (*PFunc_TogglePlayerWhiteScanlines) (int nPlayerId, unsigned int bToggle);
  204. typedef unsigned int (*PFunc_EnabledPlayerWhiteScanlines) (int nPlayerId);
  205. typedef int (*PFunc_TogglePlayerGreenScanlines) (int nPlayerId, unsigned int bToggle);
  206. typedef unsigned int (*PFunc_EnabledPlayerGreenScanlines) (int nPlayerId);
  207. typedef int (*PFunc_TogglePlayerWidescreen) (int nPlayerId, unsigned int bToggle);
  208. typedef unsigned int (*PFunc_EnabledPlayerWidescreen) (int nPlayerId);
  209. typedef int (*PFunc_TogglePlayerShowOnRadar) (int nPlayerId, unsigned int bToggle);
  210. typedef unsigned int (*PFunc_EnabledPlayerShowOnRadar) (int nPlayerId);
  211. typedef int (*PFunc_TogglePlayerAttackPriv) (int nPlayerId, unsigned int bToggle);
  212. typedef unsigned int (*PFunc_EnabledPlayerAttackPriv) (int nPlayerId);
  213.  
  214. //PLAYERS: weapons
  215. typedef int (*PFunc_GivePlayerWeapon) (int nPlayerId, int nWeaponId, int nAmmo);
  216. typedef int (*PFunc_SetPlayerWeapon) (int nPlayerId, int nWeaponId, int nAmmo);
  217. typedef int (*PFunc_GetPlayerWeapon) (int nPlayerId);
  218. typedef int (*PFunc_GetPlayerWeaponAmmo) (int nPlayerId);
  219. typedef int (*PFunc_SetPlayerWeaponSlot) (int nPlayerId, int nSlot);
  220. typedef int (*PFunc_GetPlayerWeaponSlot) (int nPlayerId);
  221. typedef int (*PFunc_GetPlayerWeaponAtSlot) (int nPlayerId, int nSlot);
  222. typedef int (*PFunc_GetPlayerAmmoAtSlot) (int nPlayerId, int nSlot);
  223. typedef int (*PFunc_RemovePlayerWeapon) (int nPlayerId, int nWeaponId);
  224. typedef int (*PFunc_RemoveAllWeapons) (int nPlayerId);
  225.  
  226. //PLAYERS: camera
  227. typedef int (*PFunc_TogglePlayerCameraFollow) (int nPlayerId, unsigned int bToggle);
  228. typedef unsigned int (*PFunc_EnabledPlayerCameraFollow) (int nPlayerId);
  229. typedef int (*PFunc_SetCameraPosition) (int nPlayerId, float fPosX, float fPosY, float fPosZ, float fLookX, float fLookY, float fLookZ);
  230.  
  231. //PLAYERS: misc
  232. typedef int (*PFunc_SetPlayerAnimation) (int nPlayerId, int nAnimationId);
  233. typedef int (*PFunc_PlayerLaySpikes) (int nPlayerId);
  234. typedef int (*PFunc_SetPlayerWantedLevel) (int nPlayerId, int nLevel);
  235. typedef int (*PFunc_GetPlayerStandingOnVehicle) (int nPlayerId);
  236. typedef int (*PFunc_GetPlayerStandingOnObject) (int nPlayerId);
  237.  
  238. //VEHICLES
  239. typedef int (*PFunc_CreateVehicle) (int nModelId, int nWorld, float fPosX, float fPosY, float fPosZ, float fAngleZ, int nColour1, int nColour2);
  240. typedef int (*PFunc_DeleteVehicle) (int nVehicleId);
  241. typedef int (*PFunc_SetVehicleWorld) (int nVehicleId, int nWorld);
  242. typedef int (*PFunc_GetVehicleWorld) (int nVehicleId);
  243. typedef int (*PFunc_GetVehicleModel) (int nVehicleId);
  244. typedef int (*PFunc_RespawnVehicle) (int nVehicleId);
  245. typedef int (*PFunc_SetVehicleImmunityFlags) (int nVehicleId, int nImmuFlags);
  246. typedef int (*PFunc_GetVehicleImmunityFlags) (int nVehicleId);
  247. typedef int (*PFunc_KillVehicle) (int nVehicleId);
  248. typedef int (*PFunc_SetVehiclePos) (int nVehicleId, float fPosX, float fPosY, float fPosZ, float fAngleZ);
  249. typedef int (*PFunc_GetVehiclePos) (int nVehicleId, float* pfPosX, float* pfPosY, float* pfPosZ);
  250. typedef int (*PFunc_SetVehicleSpawnPos) (int nVehicleId, float fPosX, float fPosY, float fPosZ, float fAngleZ);
  251. typedef int (*PFunc_GetVehicleSpawnPos) (int nVehicleId, float* pfPosX, float* pfPosY, float* pfPosZ, float* pfAngleZ);
  252. typedef int (*PFunc_SetVehicleIdleRespawnTimer) (int nVehicleId, unsigned int uTimer);
  253. typedef unsigned int (*PFunc_GetVehicleIdleRespawnTimer) (int nVehicleId);
  254. typedef int (*PFunc_SetVehicleHealth) (int nVehicleId, float fHealth);
  255. typedef float (*PFunc_GetVehicleHealth) (int nVehicleId);
  256. typedef int (*PFunc_SetVehicleColour) (int nVehicleId, int nColour1, int nColour2);
  257. typedef int (*PFunc_GetVehicleColour) (int nVehicleId, int* pnColour1, int* pnColour2);
  258. typedef int (*PFunc_SetVehicleDoorsLocked) (int nVehicleId, unsigned int bToggle);
  259. typedef unsigned int (*PFunc_GetVehicleDoorsLocked) (int nVehicleId);
  260. typedef int (*PFunc_SetVehiclePartStatus) (int nVehicleId, int nPartId, int nStatus);
  261. typedef int (*PFunc_GetVehiclePartStatus) (int nVehicleId, int nPartId);
  262. typedef int (*PFunc_SetVehicleTyreStatus) (int nVehicleId, int nTyreId, int nStatus);
  263. typedef int (*PFunc_GetVehicleTyreStatus) (int nVehicleId, int nTyreId);
  264. typedef int (*PFunc_SetVehicleDamageData) (int nVehicleId, unsigned int uDamageData);
  265. typedef unsigned int (*PFunc_GetVehicleDamageData) (int nVehicleId);
  266. typedef int (*PFunc_SetVehicleAlarm) (int nVehicleId, unsigned int bToggle);
  267. typedef unsigned int (*PFunc_GetVehicleAlarm) (int nVehicleId);
  268. typedef int (*PFunc_SetVehicleLights) (int nVehicleId, unsigned int bToggle);
  269. typedef unsigned int (*PFunc_GetVehicleLights) (int nVehicleId);
  270.  
  271. //PICKUPS
  272. typedef int (*PFunc_CreatePickup) (int nModel, int nWorld, int nQuantity, float fPosX, float fPosY, float fPosZ, int nAlpha, unsigned int bAutomatic);
  273. typedef int (*PFunc_DeletePickup) (int nPickupId);
  274. typedef int (*PFunc_SetPickupWorld) (int nPickupId, int nWorld);
  275. typedef int (*PFunc_GetPickupWorld) (int nPickupId);
  276. typedef int (*PFunc_PickupGetAlpha) (int nPickupId);
  277. typedef int (*PFunc_PickupSetAlpha) (int nPickupId, int nAlpha);
  278. typedef unsigned int (*PFunc_PickupIsAutomatic) (int nPickupId);
  279. typedef int (*PFunc_PickupSetAutomatic) (int nPickupId, unsigned int bToggle);
  280. typedef int (*PFunc_SetPickupAutoTimer) (int nPickupId, int nTimer);
  281. typedef int (*PFunc_GetPickupAutoTimer) (int nPickupId);
  282. typedef int (*PFunc_PickupRefresh) (int nPickupId);
  283. typedef int (*PFunc_PickupGetPos) (int nPickupId, float* pfPosX, float* pfPosY, float* pfPosZ);
  284. typedef int (*PFunc_PickupSetPos) (int nPickupId, float fPosX, float fPosY, float fPosZ);
  285. typedef int (*PFunc_PickupGetModel) (int nPickupId);
  286. typedef int (*PFunc_PickupGetQuantity) (int nPickupId);
  287.  
  288. //OBJECTS
  289. typedef int (*PFunc_CreateObject) (int nModelId, int nWorld, float fPosX, float fPosY, float fPosZ, int nAlpha);
  290. typedef int (*PFunc_DeleteObject) (int nObjectId);
  291. typedef int (*PFunc_GetObjectModel) (int nObjectId);
  292. typedef int (*PFunc_SetObjectWorld) (int nObjectId, int nWorld);
  293. typedef int (*PFunc_GetObjectWorld) (int nObjectId);
  294. typedef int (*PFunc_SetObjectAlpha) (int nObjectId, int nAlpha, int nTime);
  295. typedef int (*PFunc_GetObjectAlpha) (int nObjectId);
  296. typedef int (*PFunc_MoveObjectTo) (int nObjectId, float fX, float fY, float fZ, int nTime);
  297. typedef int (*PFunc_MoveObjectBy) (int nObjectId, float fX, float fY, float fZ, int nTime);
  298. typedef int (*PFunc_SetObjectPos) (int nObjectId, float fX, float fY, float fZ);
  299. typedef int (*PFunc_GetObjectPos) (int nObjectId, float* pfPosX, float* pfPosY, float* pfPosZ);
  300. typedef int (*PFunc_RotObjectTo) (int nObjectId, float fX, float fY, float fZ, float fW, int nTime);
  301. typedef int (*PFunc_RotObjectToEuler) (int nObjectId, float fX, float fY, float fZ, int nTime);
  302. typedef int (*PFunc_RotObjectBy) (int nObjectId, float fX, float fY, float fZ, float fW, int nTime);
  303. typedef int (*PFunc_RotObjectByEuler) (int nObjectId, float fX, float fY, float fZ, int nTime);
  304. typedef int (*PFunc_GetObjectRot) (int nObjectId, float* pfX, float* pfY, float *pfZ, float *pfW);
  305. typedef int (*PFunc_GetObjectRotEuler) (int nObjectId, float* pfX, float* pfY, float *pfZ);
  306.  
  307. struct PluginFuncs {
  308. unsigned int uStructSize;
  309.  
  310. PFunc_GetServerVersion GetServerVersion;
  311. PFunc_GetServerSettings GetServerSettings;
  312. PFunc_ExportFunctions ExportFunctions;
  313. PFunc_GetNumberOfPlugins GetNumberOfPlugins;
  314. PFunc_GetPluginInfo GetPluginInfo;
  315. PFunc_FindPlugin FindPlugin;
  316. PFunc_GetPluginExports GetPluginExports;
  317. PFunc_GetTime GetTime;
  318.  
  319. PFunc_printf printf;
  320. PFunc_SendCustomCommand SendCustomCommand;
  321. PFunc_SendClientMessage SendClientMessage;
  322. PFunc_SendGameMessage SendGameMessage;
  323.  
  324. PFunc_SetServerName SetServerName;
  325. PFunc_GetServerName GetServerName;
  326. PFunc_SetMaxPlayers SetMaxPlayers;
  327. PFunc_GetMaxPlayers GetMaxPlayers;
  328. PFunc_SetServerPassword SetServerPassword;
  329. PFunc_GetServerPassword GetServerPassword;
  330. PFunc_SetGameModeText SetGameModeText;
  331. PFunc_GetGameModeText GetGameModeText;
  332.  
  333. PFunc_SetWorldBounds SetWorldBounds;
  334. PFunc_GetWorldBounds GetWorldBounds;
  335. PFunc_SetWastedSettings SetWastedSettings;
  336. PFunc_GetWastedSettings GetWastedSettings;
  337. PFunc_SetTimeRate SetTimeRate;
  338. PFunc_GetTimeRate GetTimeRate;
  339. PFunc_SetHour SetHour;
  340. PFunc_GetHour GetHour;
  341. PFunc_SetMinute SetMinute;
  342. PFunc_GetMinute GetMinute;
  343. PFunc_SetWeather SetWeather;
  344. PFunc_GetWeather GetWeather;
  345. PFunc_SetGravity SetGravity;
  346. PFunc_GetGravity GetGravity;
  347. PFunc_SetGamespeed SetGamespeed;
  348. PFunc_GetGamespeed GetGamespeed;
  349. PFunc_SetWaterLevel SetWaterLevel;
  350. PFunc_GetWaterLevel GetWaterLevel;
  351. PFunc_SetMaxHeight SetMaxHeight;
  352. PFunc_GetMaxHeight GetMaxHeight;
  353.  
  354. PFunc_ToggleSyncFrameLimiter ToggleSyncFrameLimiter;
  355. PFunc_EnabledSyncFrameLimiter EnabledSyncFrameLimiter;
  356. PFunc_ToggleFrameLimiter ToggleFrameLimiter;
  357. PFunc_EnabledFrameLimiter EnabledFrameLimiter;
  358. PFunc_ToggleTaxiBoostJump ToggleTaxiBoostJump;
  359. PFunc_EnabledTaxiBoostJump EnabledTaxiBoostJump;
  360. PFunc_ToggleDriveOnWater ToggleDriveOnWater;
  361. PFunc_EnabledDriveOnWater EnabledDriveOnWater;
  362. PFunc_ToggleFastSwitch ToggleFastSwitch;
  363. PFunc_EnabledFastSwitch EnabledFastSwitch;
  364. PFunc_ToggleFriendlyFire ToggleFriendlyFire;
  365. PFunc_EnabledFriendlyFire EnabledFriendlyFire;
  366. PFunc_ToggleDisableDriveby ToggleDisableDriveby;
  367. PFunc_EnabledDisableDriveby EnabledDisableDriveby;
  368. PFunc_TogglePerfectHandling TogglePerfectHandling;
  369. PFunc_EnabledPerfectHandling EnabledPerfectHandling;
  370. PFunc_ToggleFlyingCars ToggleFlyingCars;
  371. PFunc_EnabledFlyingCars EnabledFlyingCars;
  372. PFunc_ToggleJumpSwitch ToggleJumpSwitch;
  373. PFunc_EnabledJumpSwitch EnabledJumpSwitch;
  374. PFunc_ToggleShowOnRadar ToggleShowOnRadar;
  375. PFunc_EnabledShowOnRadar EnabledShowOnRadar;
  376. PFunc_ToggleStuntBike ToggleStuntBike;
  377. PFunc_EnabledStuntBike EnabledStuntBike;
  378. PFunc_ToggleShootInAir ToggleShootInAir;
  379. PFunc_EnabledShootInAir EnabledShootInAir;
  380. PFunc_ToggleShowNametags ToggleShowNametags;
  381. PFunc_EnabledShowNametags EnabledShowNametags;
  382. PFunc_ToggleJoinMessages ToggleJoinMessages;
  383. PFunc_EnabledJoinMessages EnabledJoinMessages;
  384. PFunc_ToggleDeathMessages ToggleDeathMessages;
  385. PFunc_EnabledDeathMessages EnabledDeathMessages;
  386.  
  387. PFunc_CreateExplosion CreateExplosion;
  388. PFunc_PlaySound PlaySound;
  389.  
  390. PFunc_SetUseClasses SetUseClasses;
  391. PFunc_GetUseClasses GetUseClasses;
  392. PFunc_GetPlayerClass GetPlayerClass;
  393. PFunc_AddPlayerClass AddPlayerClass;
  394. PFunc_SetSpawnPlayerPos SetSpawnPlayerPos;
  395. PFunc_SetSpawnCameraPos SetSpawnCameraPos;
  396. PFunc_SetSpawnCameraLookAt SetSpawnCameraLookAt;
  397.  
  398. PFunc_IsPlayerAdmin IsPlayerAdmin;
  399. PFunc_SetPlayerAdmin SetPlayerAdmin;
  400. PFunc_GetPlayerIP GetPlayerIP;
  401. PFunc_KickPlayer KickPlayer;
  402. PFunc_BanPlayer BanPlayer;
  403. PFunc_BanIP BanIP;
  404. PFunc_UnbanIP UnbanIP;
  405. PFunc_IsIPBanned IsIPBanned;
  406.  
  407. PFunc_GetPlayerIDFromName GetPlayerIDFromName;
  408. PFunc_IsPlayerConnected IsPlayerConnected;
  409. PFunc_IsPlayerSpawned IsPlayerSpawned;
  410. PFunc_GetPlayerKey GetPlayerKey;
  411. PFunc_SetPlayerWorld SetPlayerWorld;
  412. PFunc_GetPlayerWorld GetPlayerWorld;
  413. PFunc_SetPlayerSecWorld SetPlayerSecWorld;
  414. PFunc_GetPlayerSecWorld GetPlayerSecWorld;
  415. PFunc_GetPlayerUniqueWorld GetPlayerUniqueWorld;
  416. PFunc_IsPlayerWorldCompatible IsPlayerWorldCompatible;
  417. PFunc_GetPlayerState GetPlayerState;
  418. PFunc_GetPlayerName GetPlayerName;
  419. PFunc_SetPlayerTeam SetPlayerTeam;
  420. PFunc_GetPlayerTeam GetPlayerTeam;
  421. PFunc_SetPlayerSkin SetPlayerSkin;
  422. PFunc_GetPlayerSkin GetPlayerSkin;
  423. PFunc_SetPlayerColour SetPlayerColour;
  424. PFunc_GetPlayerColour GetPlayerColour;
  425. PFunc_ForceSpawn ForceSpawn;
  426.  
  427. PFunc_GivePlayerMoney GivePlayerMoney;
  428. PFunc_SetPlayerMoney SetPlayerMoney;
  429. PFunc_GetPlayerMoney GetPlayerMoney;
  430. PFunc_SetPlayerScore SetPlayerScore;
  431. PFunc_GetPlayerScore GetPlayerScore;
  432. PFunc_GetPlayerPing GetPlayerPing;
  433. PFunc_IsPlayerTyping IsPlayerTyping;
  434.  
  435. PFunc_SetPlayerHealth SetPlayerHealth;
  436. PFunc_GetPlayerHealth GetPlayerHealth;
  437. PFunc_SetPlayerArmour SetPlayerArmour;
  438. PFunc_GetPlayerArmour GetPlayerArmour;
  439. PFunc_SetPlayerImmunityFlags SetPlayerImmunityFlags;
  440. PFunc_GetPlayerImmunityFlags GetPlayerImmunityFlags;
  441. PFunc_SetPlayerPos SetPlayerPos;
  442. PFunc_GetPlayerPos GetPlayerPos;
  443. PFunc_SetPlayerSpeed SetPlayerSpeed;
  444. PFunc_GetPlayerSpeed GetPlayerSpeed;
  445. PFunc_AddPlayerSpeed AddPlayerSpeed;
  446. PFunc_SetPlayerHeading SetPlayerHeading;
  447. PFunc_GetPlayerHeading GetPlayerHeading;
  448. PFunc_SetPlayerInterior SetPlayerInterior;
  449. PFunc_GetPlayerAlpha GetPlayerAlpha;
  450. PFunc_SetPlayerAlpha SetPlayerAlpha;
  451.  
  452. PFunc_PutPlayerInVehicle PutPlayerInVehicle;
  453. PFunc_RemovePlayerFromVehicle RemovePlayerFromVehicle;
  454. PFunc_GetPlayerInVehicleStatus GetPlayerInVehicleStatus;
  455. PFunc_GetPlayerInVehicleSlot GetPlayerInVehicleSlot;
  456. PFunc_GetPlayerVehicleID GetPlayerVehicleID;
  457.  
  458. PFunc_TogglePlayerControllable TogglePlayerControllable;
  459. PFunc_EnabledPlayerControllable EnabledPlayerControllable;
  460. PFunc_TogglePlayerDriveby TogglePlayerDriveby;
  461. PFunc_EnabledPlayerDriveby EnabledPlayerDriveby;
  462. PFunc_TogglePlayerWhiteScanlines TogglePlayerWhiteScanlines;
  463. PFunc_EnabledPlayerWhiteScanlines EnabledPlayerWhiteScanlines;
  464. PFunc_TogglePlayerGreenScanlines TogglePlayerGreenScanlines;
  465. PFunc_EnabledPlayerGreenScanlines EnabledPlayerGreenScanlines;
  466. PFunc_TogglePlayerWidescreen TogglePlayerWidescreen;
  467. PFunc_EnabledPlayerWidescreen EnabledPlayerWidescreen;
  468. PFunc_TogglePlayerShowOnRadar TogglePlayerShowOnRadar;
  469. PFunc_EnabledPlayerShowOnRadar EnabledPlayerShowOnRadar;
  470. PFunc_TogglePlayerAttackPriv TogglePlayerAttackPriv;
  471. PFunc_EnabledPlayerAttackPriv EnabledPlayerAttackPriv;
  472.  
  473. PFunc_GivePlayerWeapon GivePlayerWeapon;
  474. PFunc_SetPlayerWeapon SetPlayerWeapon;
  475. PFunc_GetPlayerWeapon GetPlayerWeapon;
  476. PFunc_GetPlayerWeaponAmmo GetPlayerWeaponAmmo;
  477. PFunc_SetPlayerWeaponSlot SetPlayerWeaponSlot;
  478. PFunc_GetPlayerWeaponSlot GetPlayerWeaponSlot;
  479. PFunc_GetPlayerWeaponAtSlot GetPlayerWeaponAtSlot;
  480. PFunc_GetPlayerAmmoAtSlot GetPlayerAmmoAtSlot;
  481. PFunc_RemovePlayerWeapon RemovePlayerWeapon;
  482. PFunc_RemoveAllWeapons RemoveAllWeapons;
  483.  
  484. PFunc_TogglePlayerCameraFollow TogglePlayerCameraFollow;
  485. PFunc_EnabledPlayerCameraFollow EnabledPlayerCameraFollow;
  486. PFunc_SetCameraPosition SetCameraPosition;
  487.  
  488. PFunc_SetPlayerAnimation SetPlayerAnimation;
  489. PFunc_PlayerLaySpikes PlayerLaySpikes;
  490. PFunc_SetPlayerWantedLevel SetPlayerWantedLevel;
  491. PFunc_GetPlayerStandingOnVehicle GetPlayerStandingOnVehicle;
  492. PFunc_GetPlayerStandingOnObject GetPlayerStandingOnObject;
  493.  
  494. PFunc_CreateVehicle CreateVehicle;
  495. PFunc_DeleteVehicle DeleteVehicle;
  496. PFunc_SetVehicleWorld SetVehicleWorld;
  497. PFunc_GetVehicleWorld GetVehicleWorld;
  498. PFunc_GetVehicleModel GetVehicleModel;
  499. PFunc_RespawnVehicle RespawnVehicle;
  500. PFunc_SetVehicleImmunityFlags SetVehicleImmunityFlags;
  501. PFunc_GetVehicleImmunityFlags GetVehicleImmunityFlags;
  502. PFunc_KillVehicle KillVehicle;
  503. PFunc_SetVehiclePos SetVehiclePos;
  504. PFunc_GetVehiclePos GetVehiclePos;
  505. PFunc_SetVehicleSpawnPos SetVehicleSpawnPos;
  506. PFunc_GetVehicleSpawnPos GetVehicleSpawnPos;
  507. PFunc_SetVehicleIdleRespawnTimer SetVehicleIdleRespawnTimer;
  508. PFunc_GetVehicleIdleRespawnTimer GetVehicleIdleRespawnTimer;
  509. PFunc_SetVehicleHealth SetVehicleHealth;
  510. PFunc_GetVehicleHealth GetVehicleHealth;
  511. PFunc_SetVehicleColour SetVehicleColour;
  512. PFunc_GetVehicleColour GetVehicleColour;
  513. PFunc_SetVehicleDoorsLocked SetVehicleDoorsLocked;
  514. PFunc_GetVehicleDoorsLocked GetVehicleDoorsLocked;
  515. PFunc_SetVehiclePartStatus SetVehiclePartStatus;
  516. PFunc_GetVehiclePartStatus GetVehiclePartStatus;
  517. PFunc_SetVehicleTyreStatus SetVehicleTyreStatus;
  518. PFunc_GetVehicleTyreStatus GetVehicleTyreStatus;
  519. PFunc_SetVehicleDamageData SetVehicleDamageData;
  520. PFunc_GetVehicleDamageData GetVehicleDamageData;
  521. PFunc_SetVehicleAlarm SetVehicleAlarm;
  522. PFunc_GetVehicleAlarm GetVehicleAlarm;
  523. PFunc_SetVehicleLights SetVehicleLights;
  524. PFunc_GetVehicleLights GetVehicleLights;
  525.  
  526. PFunc_CreatePickup CreatePickup;
  527. PFunc_DeletePickup DeletePickup;
  528. PFunc_SetPickupWorld SetPickupWorld;
  529. PFunc_GetPickupWorld GetPickupWorld;
  530. PFunc_PickupGetAlpha PickupGetAlpha;
  531. PFunc_PickupSetAlpha PickupSetAlpha;
  532. PFunc_PickupIsAutomatic PickupIsAutomatic;
  533. PFunc_PickupSetAutomatic PickupSetAutomatic;
  534. PFunc_SetPickupAutoTimer SetPickupAutoTimer;
  535. PFunc_GetPickupAutoTimer GetPickupAutoTimer;
  536. PFunc_PickupRefresh PickupRefresh;
  537. PFunc_PickupGetPos PickupGetPos;
  538. PFunc_PickupSetPos PickupSetPos;
  539. PFunc_PickupGetModel PickupGetModel;
  540. PFunc_PickupGetQuantity PickupGetQuantity;
  541.  
  542. PFunc_CreateObject CreateObject;
  543. PFunc_DeleteObject DeleteObject;
  544. PFunc_GetObjectModel GetObjectModel;
  545. PFunc_SetObjectWorld SetObjectWorld;
  546. PFunc_GetObjectWorld GetObjectWorld;
  547. PFunc_SetObjectAlpha SetObjectAlpha;
  548. PFunc_GetObjectAlpha GetObjectAlpha;
  549. PFunc_MoveObjectTo MoveObjectTo;
  550. PFunc_MoveObjectBy MoveObjectBy;
  551. PFunc_SetObjectPos SetObjectPos;
  552. PFunc_GetObjectPos GetObjectPos;
  553. PFunc_RotObjectTo RotObjectTo;
  554. PFunc_RotObjectToEuler RotObjectToEuler;
  555. PFunc_RotObjectBy RotObjectBy;
  556. PFunc_RotObjectByEuler RotObjectByEuler;
  557. PFunc_GetObjectRot GetObjectRot;
  558. PFunc_GetObjectRotEuler GetObjectRotEuler;
  559. };
  560.  
  561. typedef int (*PCback_OnInitServer) (void);
  562. typedef void (*PCback_OnShutdownServer) (void);
  563. typedef void (*PCback_OnFrame) (float fElapsedTime);
  564. typedef void (*PCback_OnPlayerConnect) (int nPlayerId);
  565. typedef void (*PCback_OnPlayerDisconnect) (int nPlayerId, int nReason);
  566. typedef void (*PCback_OnPlayerBeginTyping) (int nPlayerId);
  567. typedef void (*PCback_OnPlayerEndTyping) (int nPlayerId);
  568. typedef int (*PCback_OnPlayerRequestClass) (int nPlayerId, int nOffset);
  569. typedef int (*PCback_OnPlayerRequestSpawn) (int nPlayerId);
  570. typedef void (*PCback_OnPlayerSpawn) (int nPlayerId);
  571. typedef void (*PCback_OnPlayerDeath) (int nPlayerId, int nKillerId, int nReason, int nBodyPart);
  572. typedef void (*PCback_OnPlayerUpdate) (int nPlayerId, int nUpdateType);
  573. typedef int (*PCback_OnPlayerRequestEnter) (int nPlayerId, int nVehicleId, int nSlotId);
  574. typedef void (*PCback_OnPlayerEnterVehicle) (int nPlayerId, int nVehicleId, int nSlotId);
  575. typedef void (*PCback_OnPlayerExitVehicle) (int nPlayerId, int nVehicleId);
  576. typedef int (*PCback_OnPickupClaimPicked) (int nPickupId, int nPlayerId);
  577. typedef void (*PCback_OnPickupPickedUp) (int nPickupId, int nPlayerId);
  578. typedef void (*PCback_OnPickupRespawn) (int nPickupId);
  579. typedef void (*PCback_OnVehicleUpdate) (int nVehicleId, int nUpdateType);
  580. typedef void (*PCback_OnVehicleExplode) (int nVehicleId);
  581. typedef void (*PCback_OnVehicleRespawn) (int nVehicleId);
  582. typedef int (*PCback_OnPublicMessage) (int nPlayerId, const char* pszText);
  583. typedef int (*PCback_OnCommandMessage) (int nPlayerId, const char* pszText);
  584. typedef int (*PCback_OnPrivateMessage) (int nPlayerId, int nTargetId, const char* pszText);
  585. typedef int (*PCback_OnInternalCommand) (unsigned int uCmdType, const char* pszText);
  586. typedef int (*PCback_OnLoginAttempt) (char* pszPlayerName, const char* pszUserPassword, const char* pszIpAddress);
  587.  
  588. struct PluginCallbacks {
  589. unsigned int uStructSize;
  590.  
  591. PCback_OnInitServer OnInitServer;
  592. PCback_OnShutdownServer OnShutdownServer;
  593. PCback_OnFrame OnFrame;
  594. PCback_OnPlayerConnect OnPlayerConnect;
  595. PCback_OnPlayerDisconnect OnPlayerDisconnect;
  596. PCback_OnPlayerBeginTyping OnPlayerBeginTyping;
  597. PCback_OnPlayerEndTyping OnPlayerEndTyping;
  598. PCback_OnPlayerRequestClass OnPlayerRequestClass;
  599. PCback_OnPlayerRequestSpawn OnPlayerRequestSpawn;
  600. PCback_OnPlayerSpawn OnPlayerSpawn;
  601. PCback_OnPlayerDeath OnPlayerDeath;
  602. PCback_OnPlayerUpdate OnPlayerUpdate;
  603. PCback_OnPlayerRequestEnter OnPlayerRequestEnter;
  604. PCback_OnPlayerEnterVehicle OnPlayerEnterVehicle;
  605. PCback_OnPlayerExitVehicle OnPlayerExitVehicle;
  606. PCback_OnPickupClaimPicked OnPickupClaimPicked;
  607. PCback_OnPickupPickedUp OnPickupPickedUp;
  608. PCback_OnPickupRespawn OnPickupRespawn;
  609. PCback_OnVehicleUpdate OnVehicleUpdate;
  610. PCback_OnVehicleExplode OnVehicleExplode;
  611. PCback_OnVehicleRespawn OnVehicleRespawn;
  612. PCback_OnPublicMessage OnPublicMessage;
  613. PCback_OnCommandMessage OnCommandMessage;
  614. PCback_OnPrivateMessage OnPrivateMessage;
  615. PCback_OnInternalCommand OnInternalCommand;
  616. PCback_OnLoginAttempt OnLoginAttempt;
  617. };
  618.  
  619.  
  620. #ifdef WIN32
  621. #define WIN32_LEANANDMEAN
  622. #include <Windows.h>
  623.  
  624. #define EXPORT __declspec(dllexport)
  625. #else
  626. #define EXPORT
  627. #endif
  628.  
  629. #include "VCMP.h"
  630.  
  631. #include <math.h>
  632. #include <stdarg.h>
  633. #include <stdio.h>
  634. #include <stdlib.h>
  635. #include <stdint.h>
  636. #include <string.h>
  637. #include <wchar.h>
  638.  
  639. #include <iostream>
  640. #include <map>
  641.  
  642. // Squirrel
  643. extern "C"
  644. {
  645. #include "squirrel/squirrel.h"
  646. #include "squirrel/sqstdaux.h"
  647. #include "squirrel/sqstdio.h"
  648. }
  649.  
  650. // A definition needed for Squirrel's print function
  651. #ifdef SQUNICODE
  652. #define scvprintf vwprintf
  653. #else
  654. #define scvprintf vprintf
  655. #endif
  656.  
  657. // Sqrat
  658. #include "sqrat/sqrat.h"
  659.  
  660. // Use the Sqrat namespace.
  661. using namespace Sqrat;
  662.  
  663. // Forward our classes
  664. class CObject;
  665. class CPickup;
  666. class CPlayer;
  667. class CVehicle;
  668.  
  669. // Structure definitions
  670. #ifndef types
  671. class Vector
  672. {
  673. public:
  674. Vector( float x, float y, float z ) { this->x = x; this->y = y; this->z = z; }
  675. Vector() { }
  676. float x;
  677. float y;
  678. float z;
  679. };
  680.  
  681. class Quaternion
  682. {
  683. public:
  684. Quaternion( float w, float x, float y, float z ) { this->w = w; this->x = x; this->y = y; this->z = z; }
  685. Quaternion() { }
  686. float w;
  687. float x;
  688. float y;
  689. float z;
  690. };
  691.  
  692. class RGBa
  693. {
  694. public:
  695. RGBa( int r, int g, int b, int a ) { this->r = r; this->g = g; this->b = b; this->a = a; }
  696. RGBa() { }
  697.  
  698. int r;
  699. int g;
  700. int b;
  701. int a;
  702. };
  703.  
  704. class cRGB
  705. {
  706. public:
  707. cRGB( int r, int g, int b ) { this->r = r; this->g = g; this->b = b; }
  708. cRGB() { }
  709.  
  710. int r;
  711. int g;
  712. int b;
  713. };
  714.  
  715. class ARGB
  716. {
  717. public:
  718. ARGB( int a, int r, int g, int b ) { this->r = r; this->g = g; this->b = b; this->a = a; }
  719. ARGB() { }
  720.  
  721. int a;
  722. int r;
  723. int g;
  724. int b;
  725. };
  726.  
  727. class Bounds
  728. {
  729. public:
  730. Bounds( float maxX, float minX, float maxY, float minY )
  731. {
  732. this->maxX = maxX;
  733. this->minX = minX;
  734. this->maxY = maxY;
  735. this->minY = minY;
  736. }
  737.  
  738. Bounds() { }
  739.  
  740. float maxX;
  741. float minX;
  742. float maxY;
  743. float minY;
  744. };
  745.  
  746. class WastedSettings
  747. {
  748. public:
  749. WastedSettings
  750. (
  751. int deathTime,
  752. int fadeTime,
  753. float fadeInSpeed,
  754. float fadeOutSpeed,
  755. cRGB fadeColour,
  756. int corpseFadeDelay,
  757. int corpseFadeTime
  758. )
  759. {
  760. this->deathTime = deathTime;
  761. this->fadeTime = fadeTime;
  762. this->fadeInSpeed = fadeInSpeed;
  763. this->fadeOutSpeed = fadeOutSpeed;
  764. this->fadeColour = fadeColour;
  765. this->corpseFadeDelay = corpseFadeDelay;
  766. this->corpseFadeTime = corpseFadeTime;
  767. }
  768.  
  769. WastedSettings() { }
  770.  
  771. int deathTime;
  772. int fadeTime;
  773. float fadeInSpeed;
  774. float fadeOutSpeed;
  775. cRGB fadeColour;
  776. int corpseFadeDelay;
  777. int corpseFadeTime;
  778. };
  779.  
  780. #define types
  781. #endif
  782.  
  783. // Definitions
  784. #define _SQ( x ) SQInteger x( HSQUIRRELVM v )
  785.  
  786. extern PluginFuncs* functions;
  787. extern HSQUIRRELVM v;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement