|
在char/char_talk.c加入下面這些文字
//世界頻道 指令控制
#ifdef _WORLD_CHANNAL
if(messageeraseescape[0] == '/'
&& (messageeraseescape[1] == 'W' && messageeraseescape[2] == 'D'))
{
int i;
int playernum = CHAR_getPlayerMaxNum();
char buff[255];
if(messageeraseescape[3] == ' '){
easyGetTokenFromString( messageeraseescape , 2 , buff, sizeof(buff));
for( i = 0 ; i < playernum ; i++) {
if( CHAR_getCharUse(i) != FALSE ){
char token[256];
sprintf(token, "[世]%s:%s", CHAR_getChar( index , CHAR_NAME), buff);
CHAR_talkToCli( i, -1, token, color); }}
return;
}
CHAR_talkToCli( index, -1,"指令錯誤! 正確指令為:/WD 要說的話", CHAR_COLORRED );
return;
}
#endif |
|