@@ -124,60 +124,6 @@ native void VIP_UnregisterFeature(const char[] szFeature);
124124*/
125125native 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+
563563public SharedPlugin __pl_vip_core =
564564{
565565 name = " vip_core" ,
0 commit comments