Raised This Month: $ Target: $400
 0% 

register_concmd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hyphen
Senior Member
Join Date: Aug 2011
Old 06-15-2012 , 08:06   register_concmd
Reply With Quote #1

If proper argument does not being pass while executing a command "Command Info" should be printed, but I need to manually check the argument count and print message. Kindly correct me with my following code snippet.

Code:
register_concmd("amx_cmd", "FnCommands", ADMIN_IMMUNITY, "Command Info")

public FnCommands(id, level, cid)
{
	if(!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	if(read_argc() != 2)
	{
		console_print(id, "Usage: Command Info")
		return PLUGIN_HANDLED
	}
}

Last edited by hyphen; 06-15-2012 at 08:08.
hyphen is offline
 


Thread Tools
Display Modes

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 06:07.


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