Raised This Month: $32 Target: $400
 8% 

Solved [L4D2] - use command in another plugin ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
weffer
Member
Join Date: Oct 2020
Old 06-27-2021 , 15:39   [L4D2] - use command in another plugin ?
Reply With Quote #1

Hi guys :

how can you call a command inside another plugin example: plugin x I want to call the other plugin with your command: sm_light

Is it possible to do that ?

Last edited by weffer; 06-27-2021 at 23:54.
weffer is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 06-27-2021 , 16:46   Re: [L4D2] - use command in another plugin ?
Reply With Quote #2

Yeah that's possible and has been one of the core features of Amxx and Sourcemod alike. Look into forwards and how they work.

For example:

- Plugin A will fire the forward when the tank dies.
- Plugin B will use that forward as its trigger and change its body color to green.

Maybe a redundant example, but you get the idea.
__________________
Spirit_12 is offline
weffer
Member
Join Date: Oct 2020
Old 06-27-2021 , 17:45   Re: [L4D2] - use command in another plugin ?
Reply With Quote #3

Quote:
Originally Posted by Spirit_12 View Post
Yeah that's possible and has been one of the core features of Amxx and Sourcemod alike. Look into forwards and how they work.

For example:

- Plugin A will fire the forward when the tank dies.
- Plugin B will use that forward as its trigger and change its body color to green.

Maybe a redundant example, but you get the idea.


hello Spirit_12:

you will have an example of how to call a command from complement x in another complement Y
weffer is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-27-2021 , 21:28   Re: [L4D2] - use command in another plugin ?
Reply With Quote #4

ServerCommand() ?
__________________
Silvers is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 06-27-2021 , 22:06   Re: [L4D2] - use command in another plugin ?
Reply With Quote #5

Quote:
Originally Posted by weffer View Post
hello Spirit_12:

you will have an example of how to call a command from complement x in another complement Y
You can find examples on this page. https://wiki.alliedmods.net/Function...Mod_Scripting)

Also consider what Silver has said above. If all you are trying to do is execute a command then you can use ServerCommand() method as well.
__________________

Last edited by Spirit_12; 06-27-2021 at 22:07.
Spirit_12 is offline
weffer
Member
Join Date: Oct 2020
Old 06-27-2021 , 23:54   Re: [L4D2] - use command in another plugin ?
Reply With Quote #6

thanks Spirit_12, Silvers.
weffer 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 21:02.


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