Beispiel #1
0
        public ChatAPI()
        {
            this.API_addBufferMessage = (API_AddBufferMessage)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?AddBufferMessage@Chat@SAMP@API@@YAXPB_W@Z"), typeof(API_AddBufferMessage));

            this.API_addMessage         = (API_AddMessage)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?AddMessage@Chat@SAMP@API@@YAXPB_W@Z"), typeof(API_AddMessage));
            this.API_clear              = (API_Clear)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?Clear@Chat@SAMP@API@@YAXXZ"), typeof(API_Clear));
            this.API_getText            = (API_GetText)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?GetText@Chat@SAMP@API@@YAXPA_WH@Z"), typeof(API_GetText));
            this.API_setText            = (API_SetText)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?SetText@Chat@SAMP@API@@YAXPB_W@Z"), typeof(API_SetText));
            this.API_isOpen             = (API_IsOpen)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?IsOpen@Chat@SAMP@API@@YA_NXZ"), typeof(API_IsOpen));
            this.API_toggle             = (API_Toggle)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?Toggle@Chat@SAMP@API@@YAX_N@Z"), typeof(API_Toggle));
            this.API_send               = (API_Send)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?Send@Chat@SAMP@API@@YAXPB_W@Z"), typeof(API_Send));
            this.API_setCursorPosition1 = (API_SetCursorPosition1)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?SetCursorPosition@Chat@SAMP@API@@YAXH@Z"), typeof(API_SetCursorPosition1));
            this.API_setCursorPosition2 = (API_SetCursorPosition2)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?SetCursorPosition@Chat@SAMP@API@@YAXHH@Z"), typeof(API_SetCursorPosition2));
        }
Beispiel #2
0
        public DialogAPI()
        {
            this.API_isOpen = (API_IsOpen)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?IsOpen@Dialog@SAMP@API@@YA_NXZ"), typeof(API_IsOpen));

            this.API_close                 = (API_Close)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?Close@Dialog@SAMP@API@@YAXH@Z"), typeof(API_Close));
            this.API_getID                 = (API_GetID)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?GetID@Dialog@SAMP@API@@YAHXZ"), typeof(API_GetID));
            this.API_getText               = (API_GetText)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?GetText@Dialog@SAMP@API@@YAXPA_WH@Z"), typeof(API_GetText));
            this.API_setText               = (API_SetText)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?SetText@Dialog@SAMP@API@@YAXPB_W@Z"), typeof(API_SetText));
            this.API_selectIndex           = (API_SelectIndex)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?SelectIndex@Dialog@SAMP@API@@YAXH@Z"), typeof(API_SelectIndex));
            this.API_getStringCount        = (API_GetStringCount)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?GetStringCount@Dialog@SAMP@API@@YAHXZ"), typeof(API_GetStringCount));
            this.API_getStringByIndex      = (API_GetStringByIndex)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?GetStringByIndex@Dialog@SAMP@API@@YAXHPA_WH@Z"), typeof(API_GetStringByIndex));
            this.API_block                 = (API_Block)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?Block@Dialog@SAMP@API@@YAXHPB_W@Z"), typeof(API_Block));
            this.API_blockHasBlockedDialog = (API_BlockHasBlockedDialog)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?BlockHasBlockedDialog@Dialog@SAMP@API@@YA_NXZ"), typeof(API_BlockHasBlockedDialog));
            this.API_blockNeedBlocking     = (API_BlockNeedBlocking)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?BlockHasNeedBlocking@Dialog@SAMP@API@@YA_NXZ"), typeof(API_BlockNeedBlocking));
            this.API_blockGetCaption       = (API_BlockGetCaption)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?BlockGetCaption@Dialog@SAMP@API@@YAXPA_WH@Z"), typeof(API_BlockGetCaption));
            this.API_blockGetText          = (API_BlockGetText)Marshal.GetDelegateForFunctionPointer(GeneralAPI.Instance.GetFunctionPointer("?BlockGetText@Dialog@SAMP@API@@YAXPA_WH@Z"), typeof(API_BlockGetText));
        }