mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-03 23:47:12 +02:00
Candidate for backwards compatibility.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
Project: Vice City Multiplayer 0.4 Server / Plugin Kit
|
||||
File: plugin.h
|
||||
|
||||
Copyright 2011-2019 Ago Allikmaa (maxorator)
|
||||
Copyright 2011-2016 Ago Allikmaa (maxorator)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -31,7 +31,7 @@ typedef struct {
|
||||
} ServerSettings;
|
||||
|
||||
#define PLUGIN_API_MAJOR 2
|
||||
#define PLUGIN_API_MINOR 1
|
||||
#define PLUGIN_API_MINOR 0
|
||||
|
||||
typedef struct {
|
||||
uint32_t structSize;
|
||||
@ -60,8 +60,6 @@ typedef enum {
|
||||
vcmpEntityPoolObject = 2,
|
||||
vcmpEntityPoolPickup = 3,
|
||||
vcmpEntityPoolRadio = 4,
|
||||
vcmpEntityPoolPlayer = 5,
|
||||
vcmpEntityReserved1 = 6,
|
||||
vcmpEntityPoolBlip = 7,
|
||||
vcmpEntityPoolCheckPoint = 8,
|
||||
forceSizeVcmpEntityPool = INT32_MAX
|
||||
@ -103,7 +101,7 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
vcmpPlayerUpdateNormal = 0,
|
||||
vcmpPlayerUpdateAimingDeprecated = 1,
|
||||
vcmpPlayerUpdateAiming = 1,
|
||||
vcmpPlayerUpdateDriver = 2,
|
||||
vcmpPlayerUpdatePassenger = 3,
|
||||
forceSizeVcmpPlayerUpdate = INT32_MAX
|
||||
@ -158,7 +156,6 @@ typedef enum {
|
||||
vcmpServerOptionWallGlitch = 19,
|
||||
vcmpServerOptionDisableBackfaceCulling = 20,
|
||||
vcmpServerOptionDisableHeliBladeDamage = 21,
|
||||
vcmpServerOptionDisableCrouch = 22,
|
||||
forceSizeVcmpServerOption = INT32_MAX
|
||||
} vcmpServerOption;
|
||||
|
||||
@ -172,8 +169,7 @@ typedef enum {
|
||||
vcmpPlayerOptionCanAttack = 6,
|
||||
vcmpPlayerOptionHasMarker = 7,
|
||||
vcmpPlayerOptionChatTagsEnabled = 8,
|
||||
vcmpPlayerOptionDrunkEffectsDeprecated = 9,
|
||||
vcmpPlayerOptionBleeding = 10,
|
||||
vcmpPlayerOptionDrunkEffects = 9,
|
||||
forceSizeVcmpPlayerOption = INT32_MAX
|
||||
} vcmpPlayerOption;
|
||||
|
||||
@ -185,9 +181,6 @@ typedef enum {
|
||||
vcmpVehicleOptionGhost = 4,
|
||||
vcmpVehicleOptionSiren = 5,
|
||||
vcmpVehicleOptionSingleUse = 6,
|
||||
vcmpVehicleOptionEngineDisabled = 7,
|
||||
vcmpVehicleOptionBootOpen = 8,
|
||||
vcmpVehicleOptionBonnetOpen = 9,
|
||||
forceSizeVcmpVehicleOption = INT32_MAX
|
||||
} vcmpVehicleOption;
|
||||
|
||||
@ -196,31 +189,6 @@ typedef enum {
|
||||
forceSizeVcmpPickupOption = INT32_MAX
|
||||
} vcmpPickupOption;
|
||||
|
||||
typedef enum {
|
||||
vcmpNetworkStatisticsOptionDataSentPerSecond = 0,
|
||||
vcmpNetworkStatisticsOptionDataResentPerSecond = 1,
|
||||
vcmpNetworkStatisticsOptionDataReceivedPerSecond = 2,
|
||||
vcmpNetworkStatisticsOptionDataDiscardedPerSecond = 3,
|
||||
vcmpNetworkStatisticsOptionAllBytesSentPerSecond = 4,
|
||||
vcmpNetworkStatisticsOptionAllBytesReceivedPerSecond = 5,
|
||||
|
||||
vcmpNetworkStatisticsOptionDataSentTotal = 6,
|
||||
vcmpNetworkStatisticsOptionDataResentTotal = 7,
|
||||
vcmpNetworkStatisticsOptionDataReceivedTotal = 8,
|
||||
vcmpNetworkStatisticsOptionDataDiscardedTotal = 9,
|
||||
vcmpNetworkStatisticsOptionAllBytesSentTotal = 10,
|
||||
vcmpNetworkStatisticsOptionAllBytesReceivedTotal = 11,
|
||||
|
||||
vcmpNetworkStatisticsOptionMessagesWaiting = 12,
|
||||
vcmpNetworkStatisticsOptionMessagesResending = 13,
|
||||
vcmpNetworkStatisticsOptionBytesResending = 14,
|
||||
|
||||
vcmpNetworkStatisticsOptionPacketLossPerSecond = 15,
|
||||
vcmpNetworkStatisticsOptionPacketLossTotal = 16,
|
||||
|
||||
forceSizeVcmpNetworkStatisticsOption = INT32_MAX
|
||||
} vcmpNetworkStatisticsOption;
|
||||
|
||||
typedef struct {
|
||||
uint32_t structSize;
|
||||
|
||||
@ -238,7 +206,7 @@ typedef struct {
|
||||
uint32_t (*GetNumberOfPlugins) (void);
|
||||
/* vcmpErrorNoSuchEntity, vcmpErrorNullArgument */
|
||||
vcmpError (*GetPluginInfo) (int32_t pluginId, PluginInfo* pluginInfo);
|
||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
||||
/* -1 == vcmpEntityNone */
|
||||
int32_t (*FindPlugin) (const char* pluginName);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
const void** (*GetPluginExports) (int32_t pluginId, size_t* exportCount);
|
||||
@ -378,7 +346,7 @@ typedef struct {
|
||||
* Key binds
|
||||
*/
|
||||
|
||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
||||
/* -1 == vcmpEntityNone */
|
||||
int32_t (*GetKeyBindUnusedSlot) (void);
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*GetKeyBindData) (int32_t bindId, uint8_t* isCalledOnReleaseOut, int32_t* keyOneOut, int32_t* keyTwoOut, int32_t* keyThreeOut);
|
||||
@ -451,7 +419,7 @@ typedef struct {
|
||||
* Player access and basic info
|
||||
*/
|
||||
|
||||
/* Return value of -1 indicates vcmpErrorNoSuchEntity */
|
||||
/* -1 == vcmpEntityNone */
|
||||
int32_t (*GetPlayerIdFromName) (const char* name);
|
||||
/* success */
|
||||
uint8_t (*IsPlayerConnected) (int32_t playerId);
|
||||
@ -921,8 +889,7 @@ typedef struct {
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*IsObjectTouchedReportEnabled) (int32_t objectId);
|
||||
|
||||
/* 04rel005 SDK functions */
|
||||
/* ---------------------------------------------------------- */
|
||||
// TODO: MOVE LATER
|
||||
vcmpError (*GetPlayerModuleList) (int32_t playerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity, vcmpErrorArgumentOutOfBounds */
|
||||
@ -936,38 +903,9 @@ typedef struct {
|
||||
uint16_t (*GetFallTimer) (void);
|
||||
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetVehicleLightsData) (int32_t vehicleId, uint32_t lightsData);
|
||||
vcmpError(*SetVehicleLightsData) (int32_t vehicleId, uint32_t lightsData);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint32_t (*GetVehicleLightsData) (int32_t vehicleId);
|
||||
|
||||
/* 04rel007 SDK functions */
|
||||
/* ---------------------------------------------------------- */
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*KillPlayer) (int32_t playerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetVehicle3DArrowForPlayer) (int32_t vehicleId, int32_t targetPlayerId, uint8_t isEnabled);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*GetVehicle3DArrowForPlayer) (int32_t vehicleId, int32_t targetPlayerId);
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetPlayer3DArrowForPlayer) (int32_t playerId, int32_t targetPlayerId, uint8_t isEnabled);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*GetPlayer3DArrowForPlayer) (int32_t playerId, int32_t targetPlayerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetPlayerDrunkHandling) (int32_t playerId, uint32_t drunkLevel);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint32_t (*GetPlayerDrunkHandling) (int32_t playerId);
|
||||
/* vcmpErrorNoSuchEntity */
|
||||
vcmpError (*SetPlayerDrunkVisuals) (int32_t playerId, uint8_t drunkLevel);
|
||||
/* GetLastError: vcmpErrorNoSuchEntity */
|
||||
uint8_t (*GetPlayerDrunkVisuals) (int32_t playerId);
|
||||
|
||||
/* vcmpErrorNoSuchEntity, vcmpErrorRequestDenied */
|
||||
vcmpError (*InterpolateCameraLookAt) (int32_t playerId, float lookX, float lookY, float lookZ, uint32_t interpTimeMS);
|
||||
|
||||
/* GetLastError: vcmpErrorNoSuchEntity, vcmpErrorArgumentOutOfBounds */
|
||||
double (*GetNetworkStatistics) (int32_t playerId, vcmpNetworkStatisticsOption option);
|
||||
uint32_t(*GetVehicleLightsData) (int32_t vehicleId);
|
||||
|
||||
} PluginFuncs;
|
||||
|
||||
@ -1031,12 +969,7 @@ typedef struct {
|
||||
void (*OnEntityPoolChange) (vcmpEntityPool entityType, int32_t entityId, uint8_t isDeleted);
|
||||
void (*OnServerPerformanceReport) (size_t entryCount, const char** descriptions, uint64_t* times);
|
||||
|
||||
/* 04rel005 SDK functions */
|
||||
/* ---------------------------------------------------------- */
|
||||
void (*OnPlayerModuleList) (int32_t playerId, const char* list);
|
||||
// TODO: MOVE LATER
|
||||
void(*OnPlayerModuleList) (int32_t playerId, const char* list);
|
||||
|
||||
/* 04rel007 SDK functions */
|
||||
/* ---------------------------------------------------------- */
|
||||
void (*OnEntityStreamingChange) (int32_t playerId, int32_t entityId, vcmpEntityPool entityType, uint8_t isDeleted);
|
||||
|
||||
} PluginCallbacks;
|
||||
} PluginCallbacks;
|
1042
include/vcmp.new.h
Normal file
1042
include/vcmp.new.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user