Main 0 Posted December 11, 2013 Hello! i want to make a new command in atcommand.c but i'm afraid if each commands have unique number or something is it ok to put a new command anywhere in atcommand.c? Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted December 11, 2013 Commands are enclosed in ACMD() functions. While I wouldn't say you could typically add a new command anywhere in atcommand.c, you can add a new command before or after these functions. Example: ACMD(searchstore){ int val = atoi(message); switch( val ) { case 0://EFFECTTYPE_NORMAL case 1://EFFECTTYPE_CASH break; default: val = 0; break; } searchstore->open(sd, 99, val); return true;}ACMD(mynewcommand){//...} 1 jaBote reacted to this Quote Share this post Link to post Share on other sites
0 Main 0 Posted December 11, 2013 Commands are enclosed in ACMD() functions. While I wouldn't say you could typically add a new command anywhere in atcommand.c, you can add a new command before or after these functions. Example: ACMD(searchstore){ int val = atoi(message); switch( val ) { case 0://EFFECTTYPE_NORMAL case 1://EFFECTTYPE_CASH break; default: val = 0; break; } searchstore->open(sd, 99, val); return true;}ACMD(mynewcommand){//...} Thank you sir! Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted December 12, 2013 you can also use plugins read this http://herc.ws/wiki/HPM and for the example of atcommand you can take a look in http://herc.ws/board/files/category/10-plugins/ Quote Share this post Link to post Share on other sites
Hello!
i want to make a new command in atcommand.c
but i'm afraid if each commands have unique number or something
is it ok to put a new command anywhere in atcommand.c?
Share this post
Link to post
Share on other sites