Skip to content

Commit d8a8c3f

Browse files
committed
fix sm 1.10 compile
1 parent 0b207be commit d8a8c3f

File tree

3 files changed

+61
-57
lines changed

3 files changed

+61
-57
lines changed

scripting/VIP-Core/API.sp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ void CallForward_OnVIPLoaded()
149149
if(g_eServerData.DB_Type != DB_None)
150150
{
151151
char sDriverName[64];
152-
SQL_ReadDriver(g_eServerData.DB).GetProduct(sDriverName, sizeof(sDriverName));
152+
//SQL_ReadDriver(g_eServerData.DB).GetProduct(sDriverName, sizeof(sDriverName));
153+
SQL_GetDriverProduct(SQL_ReadDriver(g_eServerData.DB), sDriverName, sizeof(sDriverName));
153154
PrintToServer("Database Type: %s", sDriverName);
154155
}
155156

scripting/VIP-Core/Database.sp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ void OnConnect(Database db, const char[] error, any data)
4949
}
5050

5151
g_eServerData.DB = db;
52-
DBDriver driver = SQL_ReadDriver(db);
52+
//DBDriver driver = SQL_ReadDriver(db);
53+
Handle driver = SQL_ReadDriver(db);
5354

5455
char sDriverName[64];
5556
//driver.GetProduct(sDriverName, sizeof(sDriverName));
56-
driver.GetIdentifier(sDriverName, sizeof(sDriverName));
57+
58+
//driver.GetIdentifier(sDriverName, sizeof(sDriverName));
59+
SQL_GetDriverIdent(driver, sDriverName, sizeof(sDriverName));
5760

5861
if(error[0])
5962
{

scripting/include/vip_core.inc

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -124,60 +124,6 @@ native void VIP_UnregisterFeature(const char[] szFeature);
124124
*/
125125
native void VIP_UnregisterMe();
126126

127-
//
128-
enum struct VIP_Feature
129-
{
130-
char Name[256];
131-
132-
void Register( VIP_ValueType eValType = VIP_NULL,
133-
VIP_FeatureType eType = TOGGLABLE,
134-
ItemSelectCallback Item_select_callback = INVALID_FUNCTION,
135-
ItemDisplayCallback Item_display_callback = INVALID_FUNCTION,
136-
ItemDrawCallback Item_draw_callback = INVALID_FUNCTION,
137-
VIP_ToggleState eDefStatus = NO_ACCESS,
138-
bool bCookie = false)
139-
{
140-
VIP_RegisterFeature(this.Name, eValType, eType, Item_select_callback, Item_display_callback, Item_draw_callback, eDefStatus, bCookie);
141-
}
142-
143-
void UnRegister()
144-
{
145-
VIP_UnregisterFeature(this.Name);
146-
}
147-
148-
bool GetString(iClient, char[] sBuffer, int iMaxLen)
149-
{
150-
return VIP_GetClientFeatureString(iClient, this.Name, sBuffer, iMaxLen);
151-
}
152-
153-
int GetInt(int iClient)
154-
{
155-
return VIP_GetClientFeatureInt(iClient, this.Name);
156-
}
157-
158-
bool GetBool(int iClient)
159-
{
160-
return VIP_GetClientFeatureBool(iClient, this.Name);
161-
}
162-
163-
// TODO
164-
// bool IsUse(int iClient)
165-
// {
166-
// return VIP_IsClientFeatureUse(iClient, this.Name);
167-
// }
168-
169-
// VIP_ToggleState GetStatus(int iClient)
170-
// {
171-
// return VIP_GetClientFeatureStatus(iClient, this.Name);
172-
// }
173-
174-
// bool SetStatus(int iClient, VIP_ToggleState eStatus, bool bCallback = true, bool bSave = false)
175-
// {
176-
// return VIP_SetClientFeatureStatus(iClient, this.Name, eStatus, bCallback, bSave);
177-
// }
178-
}
179-
//VIP_Feature hFeature = {"hp"};
180-
181127
/**
182128
* Возвращает статус VIP-функции у игрока.
183129
*
@@ -560,6 +506,60 @@ stock bool IsVipCoreAvailable()
560506
return CanTestFeatures() && GetFeatureStatus(FeatureType_Native, "VIP_UnregisterFeature") == FeatureStatus_Available;
561507
}
562508

509+
//
510+
enum struct VIP_Feature
511+
{
512+
char Name[256];
513+
514+
void Register( VIP_ValueType eValType = VIP_NULL,
515+
VIP_FeatureType eType = TOGGLABLE,
516+
ItemSelectCallback Item_select_callback = INVALID_FUNCTION,
517+
ItemDisplayCallback Item_display_callback = INVALID_FUNCTION,
518+
ItemDrawCallback Item_draw_callback = INVALID_FUNCTION,
519+
VIP_ToggleState eDefStatus = NO_ACCESS,
520+
bool bCookie = false)
521+
{
522+
VIP_RegisterFeature(this.Name, eValType, eType, Item_select_callback, Item_display_callback, Item_draw_callback, eDefStatus, bCookie);
523+
}
524+
525+
void UnRegister()
526+
{
527+
VIP_UnregisterFeature(this.Name);
528+
}
529+
530+
bool GetString(int iClient, char[] sBuffer, int iMaxLen)
531+
{
532+
return VIP_GetClientFeatureString(iClient, this.Name, sBuffer, iMaxLen);
533+
}
534+
535+
int GetInt(int iClient)
536+
{
537+
return VIP_GetClientFeatureInt(iClient, this.Name);
538+
}
539+
540+
bool GetBool(int iClient)
541+
{
542+
return VIP_GetClientFeatureBool(iClient, this.Name);
543+
}
544+
545+
// TODO
546+
// bool IsUse(int iClient)
547+
// {
548+
// return VIP_IsClientFeatureUse(iClient, this.Name);
549+
// }
550+
551+
// VIP_ToggleState GetStatus(int iClient)
552+
// {
553+
// return VIP_GetClientFeatureStatus(iClient, this.Name);
554+
// }
555+
556+
// bool SetStatus(int iClient, VIP_ToggleState eStatus, bool bCallback = true, bool bSave = false)
557+
// {
558+
// return VIP_SetClientFeatureStatus(iClient, this.Name, eStatus, bCallback, bSave);
559+
// }
560+
}
561+
//VIP_Feature hFeature = {"hp"};
562+
563563
public SharedPlugin __pl_vip_core=
564564
{
565565
name = "vip_core",

0 commit comments

Comments
 (0)