Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class commandscript_example : public CommandScript
- {
- public:
- commandscript_example() : CommandScript("commandscript_example") { }
- ChatCommand* GetCommands()
- {
- static ChatCommand HelloWorldCommandTable[] =
- {
- { "hello", SEC_PLAYER, false, &ChatHandler::HandleHelloWorldCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
- return HelloWorldCommandTable;
- }
- bool ChatHandler::HandleHelloWorldCommand(const char* /*args*/)
- {
- PSendSysMessage("Hello World");
- return true;
- }
- void AddSC_commandscript_scripts()
- {
- new commandscript_example();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement