This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

How to get the Extension ID?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 05-12-2024 , 11:31   How to get the Extension ID?
Reply With Quote #1

In the forum header for plugins there is a field for dependencies. I know how to get a Plugin ID to put in the dependency field, but...

How do I get an Extension ID?

As an example, I have a plugin that requires:

https://forums.alliedmods.net/showthread.php?t=336374
https://forums.alliedmods.net/showthread.php?t=317175
https://forums.alliedmods.net/showthread.php?t=321696

That last link is plugin id 6954.
How do I get the extension id for the first two links to put in the dependency field?
Does the dependency field even work with extensions?
__________________

Last edited by Mystik Spiral; 05-12-2024 at 14:59.
Mystik Spiral is offline
Solar1234
Junior Member
Join Date: Nov 2021
Old 05-13-2024 , 02:36   Re: How to get the Extension ID?
Reply With Quote #2

Quote:
Originally Posted by Mystik Spiral View Post
In the forum header for plugins there is a field for dependencies. I know how to get a Plugin ID to put in the dependency field, but...

How do I get an Extension ID?

As an example, I have a plugin that requires:

https://forums.alliedmods.net/showthread.php?t=336374
https://forums.alliedmods.net/showthread.php?t=317175
https://forums.alliedmods.net/showthread.php?t=321696

That last link is plugin id 6954.
How do I get the extension id for the first two links to put in the dependency field?
Does the dependency field even work with extensions?

PHP Code:
void UnloadAccelerator()
{
    
int extid = -1;

    
char sBuffer[512];
    
ServerCommandEx(sBuffersizeof sBuffer"sm exts list");

    if(
SplitString(sBuffer"] Accelerator ("sBuffersizeof sBuffer) != -1)
    {
        for(
int i strlen(sBuffer); >= 0i--) if(sBuffer[i] == '['extid StringToInt(sBuffer[1]);
    }

    if(
extid != -1)
    {
        
ServerCommand("sm exts unload %i"extid);
        
ServerExecute();
    }

try?
Solar1234 is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 05-13-2024 , 07:16   Re: How to get the Extension ID?
Reply With Quote #3

Thank you @Solar1234, I appreciate your reply. However, I am not trying to get the loaded extension id, I am trying to get the AlliedModders extension id that would go in the dependency section when creating/editing the header of a plugin thread. For example, if you look at the plugin I posted here, at the top left you can see "Plugin ID: 8701". In the header for that plugin I entered "6954" into the "Dependencies" field so it would know Left 4 DHooks Direct is a dependency, and you can see that displayed for "Plugin Dependencies" between "Plugin Category" and "Plugin Description".

At this point, I suspect the "Dependencies" field only supports Plugin IDs and does not track/support Extension IDs.

To any moderators reading this, it would be a nice forum upgrade to just use thread ids in the dependency section instead of plugin ids so an author could mark any AlliedModders thread as a dependency and the forum could provide a link to that thread just like it does now with plugin ids.
__________________
Mystik Spiral is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode