Raised This Month: $ Target: $400
 0% 

Can I call another plugins commands?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KRiMoRaL
New Member
Join Date: Feb 2005
Old 02-24-2005 , 01:49   Can I call another plugins commands?
Reply With Quote #1

I'm wondering if there is a way to call another plugins command from within a plugin i'm writing(trying to)

I currently have the plugins on the server that allow me to use amx_godmode, and amx_noclip..

What I'm trying to do is create a plugin that will allow me to do "amx_zeus <player>" and it will execute "amx_godmode <player> 1" on them. I don't want to call to the includes that use the functions like set_user_godmode(id,1) or whatever.. I specifically want to call to the commands offered by plugins already on the server.

Also, I know that there are probably other Zeus Plugins out there, but this is mostly for me to learn how to do and stuff.. that's why I'm doing it myself.

Here's kind of what I have: Which is just the basic outside

Code:
#include <amxmodx> #include <amxmisc> new PLUGIN[]="Zeus" new AUTHOR[]="KRiMoRaL" new VERSION[]="1.0" public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("amx_zeus", "cmd_zeus", ADMIN_LEVEL_A, " ")         register_concmd("amx_unzeus", "cmd_unzeus", ADMIN_LEVEL_A, " ") } cmd_zeus(id, level, cid) {     if (!cmd_access(id, level, cid, 3))             return PLUGIN_HANDLED               //I don't know how to call "amx_godmode <player> 1"     //I don't know how to call "amx_noclip <player> 1" } cmd_unzeus(id, level, cid) {     if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED     //Same as above, but to set to 0. }
KRiMoRaL is offline
 



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 14:17.


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