[Source] Printing a message when join a room.

Results 1 to 8 of 8
  1. #1
    Novice xRyujix is offline
    MemberRank
    Dec 2011 Join Date
    4Posts

    [Source] Printing a message when join a room.

    I want to print a message when I join a room in case a conditional is valid.
    For example:
    Code:
    if (ZGetGameClient()->GetMatchStageSetting()->GetStageSetting()->bIsTraining)
    		{
    			ZTransMsg(szText, MSG_TRAINING_ON, 1, szTmp);
    			ZChatOutput(szText, ZChat::CMT_SYSTEM, ZChat::CL_STAGE);
    		}
    		else
    		{
    			ZTransMsg(szText, MSG_TRAINING_OFF, 1, szTmp);
    			ZChatOutput(szText, ZChat::CMT_SYSTEM, ZChat::CL_STAGE);
    		}
    Since I had the Training mode as an stage option.
    I don't know if I'm doing it right but I was writting that down "ZChatOutput(szText, ZChat::CMT_SYSTEM, ZChat::CL_STAGE);" on ZGameClient.cpp line 760, it prints the message but always as if it's the default value (false) and if the room master change the option to "ON" and I rejoin it stills printing as if it's false :/. Any idea of how can I get done this?


  2. #2
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: [Source] Printing a message when join a room.

    == true
    == false
    What about them?
    bIsTraining == true / false

  3. #3
    Novice xRyujix is offline
    MemberRank
    Dec 2011 Join Date
    4Posts

    Re: [Source] Printing a message when join a room.

    Even if I do that stills just printing the default value.

  4. #4
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: [Source] Printing a message when join a room.

    Quote Originally Posted by xRyujix View Post
    Even if I do that stills just printing the default value.
    Oh you, lol.
    If you are the master, and it prints only when you join, it won't update for you, because you are the master ?? try with one more player lol.
    Edit: lol didn't read the whole...

    Quote Originally Posted by xRyujix View Post
    Even if I do that stills just printing the default value.
    Show me the code, and i suggest to add it in "void ZGameClient::OnStageChat(const MUID& uidChar, const MUID& uidStage, char* szChat)"

  5. #5
    Novice xRyujix is offline
    MemberRank
    Dec 2011 Join Date
    4Posts

    Re: [Source] Printing a message when join a room.

    Quote Originally Posted by qet123 View Post
    Show me the code, and i suggest to add it in "void ZGameClient::OnStageChat(const MUID& uidChar, const MUID& uidStage, char* szChat)"
    Nvm, it works, but to see the text I need to write something in the stagechat, how to do it automatically when I join a stage?

  6. #6
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: [Source] Printing a message when join a room.

    Quote Originally Posted by xRyujix View Post
    Nvm, it works, but to see the text I need to write something in the stagechat, how to do it automatically when I join a stage?
    Can I suggest aomething first? I wanted to do like you but, you can do a command /stageinfo and it will show the details, anyway in order to auto print it should work in every place, i mean if it's true it will print, so it doesn't matter.

  7. #7
    Novice xRyujix is offline
    MemberRank
    Dec 2011 Join Date
    4Posts

    Re: [Source] Printing a message when join a room.

    Quote Originally Posted by qet123 View Post
    Can I suggest aomething first? I wanted to do like you but, you can do a command /stageinfo and it will show the details, anyway in order to auto print it should work in every place, i mean if it's true it will print, so it doesn't matter.
    I was thinking on the same haha.

  8. #8
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    Re: [Source] Printing a message when join a room.

    SImple way,

    Erase the line you want from message.xml !



Advertisement