Raised This Month: $ Target: $400
 0% 

Invalid command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 08-03-2010 , 08:49   Re: Invalid command
Reply With Quote #1

Code:
//header public plugin_init() {     //register stuff     register_clcmd("amx_vmm", "cmdVmm", ...) } public cmdVmm(...) {     //my flashy code         return PLUGIN_HANDLED }

In short, return PLUGIN_HANDLED at the end of the command function.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-03-2010 , 10:45   Re: Invalid command
Reply With Quote #2

register_clcmd() should be register_concmd().

Correct me if I'm wrong.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-03-2010 , 19:10   Re: Invalid command
Reply With Quote #3

Quote:
Originally Posted by Devil259 View Post
register_clcmd() should be register_concmd().

Correct me if I'm wrong.
That depends on what is in the function. You use register_clcmd() for things that can ONLY be use in-game. Menus is one example. You use register_concmd() when you want it to be able to be executed from in-game AND in the server console. amx_kick, amx_ban, etc.
__________________
fysiks is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 08-03-2010 , 20:15   Re: Invalid command
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
That depends on what is in the function. You use register_clcmd() for things that can ONLY be use in-game. Menus is one example. You use register_concmd() when you want it to be able to be executed from in-game AND in the server console. amx_kick, amx_ban, etc.
when u say "server console" im guessing that means other external consoles aswell yea?
e.g. HLSW, web based things and such like
__________________
minimiller is offline
Send a message via MSN to minimiller
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-04-2010 , 00:21   Re: Invalid command
Reply With Quote #5

Quote:
Originally Posted by minimiller View Post
when u say "server console" im guessing that means other external consoles aswell yea?
e.g. HLSW, web based things and such like
Yes, HLSW uses the server console.
__________________
fysiks is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-04-2010 , 05:03   Re: Invalid command
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
That depends on what is in the function. You use register_clcmd() for things that can ONLY be use in-game. Menus is one example. You use register_concmd() when you want it to be able to be executed from in-game AND in the server console. amx_kick, amx_ban, etc.
Ok thank you.
__________________
You can do anything you set your mind to, man.

Devil259 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 00:13.


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