Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to unload the plugin after being loaded? #3

Closed
danylopez123 opened this issue Feb 1, 2021 · 6 comments
Closed

Possible to unload the plugin after being loaded? #3

danylopez123 opened this issue Feb 1, 2021 · 6 comments

Comments

@danylopez123
Copy link

I know this is too soon for me to post another issue but i've been trying to figure that out and i cant.

I know here is this thing of either you load the plugin for all the maps using the default_plugins.txt or load the plugin on specific maps you want by adding the map script but.. so far with what i had with this, this breaks a bit the uboa_rampage maps not being able to select certain weapons from the maps.

What i wanted to do is to see if i can add something for the uboa_rampage maps config files to disable the cs16 weapons but, it just did not worked.

That's why im asking if its possible to disable that plugin once its loaded from the default_plugins.txt for specific maps that breaks some other weapons.

If there is no way for that, then ill have to avoid loading those maps.

@KernCore91
Copy link
Owner

KernCore91 commented Feb 1, 2021

Certain weapons from uboa rampage have iPositions that conflict with the 1.6 plugin.
When loading CS1.6 as a plugin, I do specific changes to the iPosition of each weapon here so they don't conflict with custom map weapons (if they're using 4 to 9).
What you could try doing is modifying the map's weapon iPositions so they don't conflict with the plugin anymore.

If you want to completely disable weapon registering in that map then you should add some code to ignore the map after this line:

if( string(g_Engine.mapname) == "uboa_rampage" )
    return;

@danylopez123
Copy link
Author

Which file do i need to put that code?

@KernCore91
Copy link
Owner

KernCore91 commented Feb 1, 2021

After this line in the cs16_register file

@danylopez123
Copy link
Author

That did the trick, thanks!
Before i close this post, can you give me an example if i want to add more than 1 map? Because i have more maps that uses custom weapons and uboa_rampage its not the only one.

@KernCore91
Copy link
Owner

if( string(g_Engine.mapname) == "uboa_rampage" || string(g_Engine.mapname) == "dis_beta" )
    return;

I used dis_beta as an example || string(g_Engine.mapname) == "dis_beta" this part is the one that matters.

@danylopez123
Copy link
Author

Alright, thanks for the example!
Now i can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants