Thread: [Solved] Optional VPhysics extension
View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-26-2020 , 15:09   Re: Optional VPhysics extension
Reply With Quote #2

I faced same issue in our 'sound attenuation' plugin. The only official way I know is:

PHP Code:
if (GetExtensionFileStatus("VoiceHook.ext") == 1
but it is not reliable since heavily depends on filename. Easily can break your plugin by next extension update (or admin can decide to rename).
And that's bad sm doesn't expose more functions for such check, at least to retrieve extension's name by index.

There is one walkaround: you can send ServerCommandEx cmd:
Spoiler

to intercept server answer.
So, by parsing that you can surely identify whether extension of your interest is loaded.
Again, until somebody patch sm exts command to hide output.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline