Raised This Month: $51 Target: $400
 12% 

how to run a command through other plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BackStats
Senior Member
Join Date: Oct 2008
Old 01-09-2011 , 15:29   how to run a command through other plugin
Reply With Quote #1

I need the plugin1 execute the command of plugin2.

cmd plugin2:
PHP Code:
register_concmd"say topmap" "TopMap" ); 
plugin1:
????

the plugin1 will be called by another plugin and when that happens the plugin1 must run the command plugin2
BackStats is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 01-09-2011 , 15:34   Re: how to run a command through other plugin
Reply With Quote #2

Not possible, only if you will register command in plugin2, such a register_clcmd("lala")

then in plugin1 use client_cmd(id, "lala")
reinert is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-09-2011 , 15:40   Re: how to run a command through other plugin
Reply With Quote #3

Quote:
Originally Posted by reinert View Post
Not possible, only if you will register command in plugin2, such a register_clcmd("lala")

then in plugin1 use client_cmd(id, "lala")
Yes it is.

server_cmd( "command" ) executes commands from the console.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
BackStats
Senior Member
Join Date: Oct 2008
Old 01-09-2011 , 15:53   Re: how to run a command through other plugin
Reply With Quote #4

then in plugin2 I should change to:
PHP Code:
register_srvcmd"topmap" "TopMap" ); 
and use in plugin1:
PHP Code:
server_cmd ("topmap"
??

I should just put this in plugin1? it will execute the command?
BackStats is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-09-2011 , 16:00   Re: how to run a command through other plugin
Reply With Quote #5

Quote:
Originally Posted by BackStats View Post
then in plugin2 I should change to:
PHP Code:
register_srvcmd"topmap" "TopMap" ); 
and use in plugin1:
PHP Code:
server_cmd ("topmap"
??

I should just put this in plugin1? it will execute the command?
If you want anyone to be able to type topmap, then you can use:

Code:
register_clcmd( "topmap", "TopMap" );

and execute it from the plugin:

Code:
server_cmd( "topmap" )
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2011 , 16:02   Re: how to run a command through other plugin
Reply With Quote #6

No.

It depends on what you are doing. What does the "TopMap" function do and how is it defined?
__________________
fysiks 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 18:46.


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