Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Опубликовано:
How to get the current used .dsr filename in InfinityScript?

Are you actually trying to get the gametype or do you want the filename of the actual dsr loaded?

If you want just the gametype then there is a dvar called "gametype" which contains this info.

Опубликовано:
  • Автор
How to get the current used .dsr filename in InfinityScript?

Are you actually trying to get the gametype or do you want the filename of the actual dsr loaded?

If you want just the gametype then there is a dvar called "gametype" which contains this info.

The actual dsr loaded

Опубликовано:
  • Автор

Thanks for your help I've already found a way to get it but it's a little bit heavy for CPU and I found it after I asked.. I don't ask unless I don't really know..

Thank you all again for replying.. :)

Опубликовано:

Are you using a pattern scanner?

 

Here is the code for a hook:

        [DllImport("kernel32.dll", SetLastError = true)]
       static extern IntPtr VirtualAlloc(IntPtr lpAddress, UIntPtr dwSize,
          uint flAllocationType, uint flProtect);

       private delegate void DSRHandler(IntPtr DSRptr);

       public Class1()
       {
           if (!IsPatched())
               ApplyPatch();
       }

       private static unsafe void ApplyPatch()
       {
           uint alloc = (uint)VirtualAlloc(IntPtr.Zero, (UIntPtr)32, 0x1000, 0x40);
           DSRHandler funcHandle = new DSRHandler(RegisterDSR);
           uint funcPtr = (uint)Marshal.GetFunctionPointerForDelegate(funcHandle);
           //pushad, push ecx, call
           *(uint*)alloc = 0x00E85160;
           //ptr for call
           *(uint*)(alloc + 3) = funcPtr - (alloc + 7);
           //popad
           *(byte*)(alloc + 7) = 0x61;
           //old code
           //push 006F6140
           *(byte*)(alloc + 8) = 0x68; *(uint*)(alloc + 9) = 0x6F6140;
           //jmp back
           *(byte*)(alloc + 13) = 0xE9; *(uint*)(alloc + 14) = 0x4E429E - (alloc + 18);
           //place jmp to hook
           *(byte*)0x4E4299 = 0xE9; *(uint*)0x4E429A = alloc - 0x4E429E;
       }

       private static void RegisterDSR(IntPtr DSRptr)
       {
           string DSRFilename = Marshal.PtrToStringAnsi(DSRptr);
           //do stuff here
           Log.Write(LogLevel.Info, "Current DSR File is " + DSRFilename);
       }

       private static unsafe bool IsPatched()
       {
           return !(*(byte*)0x4E4298 == 0x51);
       }

Опубликовано:
  • Автор
Are you using a pattern scanner?

Nope, I'm not genius enough to make such codes :) (I don't even know what pattern scanner is :lol: )

I have a text file that stores maprotations line by line like :

mp_dome,ACR,1

mp_dome,PM-9-KS,1

etc..

And I have a .dspl file that stores one maprotation at a time from the text file. When game is ended, .dspl file gets the next maprotation from the textfile based on the current index that is saved in a dvar.

So, if I want to retrieve the current .dsr all what I need to do is to read the .dspl file and get the value between the two commas. That's it.

 

PS: Your code could be useful to me for later uses.. thank you :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.