How to connect two plugins? Or Make subplugins.
For example i have a ak47 skin menu plugin and another m4a1 skin menu plugin and i want to combine both without merging the code and making one big plugin.
I want to make a main plugin, which calls any plugin from those two when called. Any help appreciated. The Spaniard. |
Re: How to connect two plugins? Or Make subplugins.
U can use native.
|
Re: How to connect two plugins? Or Make subplugins.
Quote:
|
Re: How to connect two plugins? Or Make subplugins.
read this: https://forums.alliedmods.net/showthread.php?t=41251 and then test countless amount of times
|
Re: How to connect two plugins? Or Make subplugins.
Quote:
|
Re: How to connect two plugins? Or Make subplugins.
Quote:
i want it like this - Main Plugin- A menu to call the first and second plugin. First plugin- ak47 skins menu. Second plugin- m4a1 skins menu. EDIT:- Now i get it. the whole plugin in an dynamic native and then calling it in the main plugin as a function. Brilliant. EDIT2:- i think coding a whole big plugin in a native is a bad idea. too much work. working with a predefined function is ok. but this is insane almost 200 lines of simple code and making it into an native double it i think 400 line just to make one plugin another 400 lines to make another plugin and another 100 lines for the main plugin. its better to merge two of the plugin. Any alternative way? |
Re: How to connect two plugins? Or Make subplugins.
Create a clcmd for each menu and on the main one just call them.
Or create the hole menu in a header and call it whenever you want.(no data saves)[if the code is way to huge, don't follow this] |
Re: How to connect two plugins? Or Make subplugins.
in plugin for m4 you create a native player_equip_special_m4 or whatever
in plugin for ak47 you make player_equip_special_ak47 plugins only do what is needed for weapons like setting skin, sounds animations etc, maybe also remove on death or round end in 3rd plugin, the actual menu, shop, or whatever plugin, you create your menus, all other logic (money price or XP or whatever) and when you need to give the player the weapon you just call the native all info needed to do this is in the tutorial you were given above; but you can look at how natives work in a real example, just search for any AMXX API (like cs_set_player_team) |
Re: How to connect two plugins? Or Make subplugins.
Quote:
|
Re: How to connect two plugins? Or Make subplugins.
Quote:
EDIT:- I am a dumbass I got it i have to link them by the dynamic native |
All times are GMT -4. The time now is 18:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.