Jump to content

Day mode is activated


Pascal S

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   2
  • Joined:  04/15/14
  • Last Seen:  

Wie kann ich die bennachrichtigung ausstellen? (aber day & night mode behalten)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

src/map/pc.c

 

suche :

int map_day_timer(int tid, unsigned int tick, int id, intptr_t data)
{
    char tmp_soutput[1024];
 
    if (data == 0 && battle_config.day_duration <= 0)    // if we want a day
        return 0;
 
    if (!night_flag)
        return 0; //Already day.
 
    night_flag = 0; // 0=day, 1=night [Yor]
    map_foreachpc(pc_daynight_timer_sub);
    strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,502) : msg_txt(NULL,60)); // The day has arrived!
    intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0);
    return 0;
}
/*================================================
 * timer to do the night [Yor]
 * data: 0 = called by timer, 1 = gmcommand/script
 *------------------------------------------------*/
int map_night_timer(int tid, unsigned int tick, int id, intptr_t data)
{
    char tmp_soutput[1024];
 
    if (data == 0 && battle_config.night_duration <= 0)    // if we want a night
        return 0;
 
    if (night_flag)
        return 0; //Already nigth.
 
    night_flag = 1; // 0=day, 1=night [Yor]
    map_foreachpc(pc_daynight_timer_sub);
    strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,503) : msg_txt(NULL,59)); // The night has fallen...
    intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0);
    return 0;
}

Ersetzen durch :

int map_day_timer(int tid, unsigned int tick, int id, intptr_t data)
{
//    char tmp_soutput[1024];
 
    if (data == 0 && battle_config.day_duration <= 0)    // if we want a day
        return 0;
 
    if (!night_flag)
        return 0; //Already day.
 
    night_flag = 0; // 0=day, 1=night [Yor]
    map_foreachpc(pc_daynight_timer_sub);
//    strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,502) : msg_txt(NULL,60)); // The day has arrived!
//    intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0);
    return 0;
}
/*================================================
 * timer to do the night [Yor]
 * data: 0 = called by timer, 1 = gmcommand/script
 *------------------------------------------------*/
int map_night_timer(int tid, unsigned int tick, int id, intptr_t data)
{
//    char tmp_soutput[1024];
 
    if (data == 0 && battle_config.night_duration <= 0)    // if we want a night
        return 0;
 
    if (night_flag)
        return 0; //Already nigth.
 
    night_flag = 1; // 0=day, 1=night [Yor]
    map_foreachpc(pc_daynight_timer_sub);
//    strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,503) : msg_txt(NULL,59)); // The night has fallen...
//    intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0);
    return 0;
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   2
  • Joined:  04/15/14
  • Last Seen:  

\pc.c(9276): error C2065: 'night_flag': nichtdeklarierter Bezeichner

\pc.c(9279): error C2065: 'night_flag': nichtdeklarierter Bezeichner

\pc.c(9280): warning C4013: 'map_foreachpc' undefiniert; Annahme: extern mit Rückgabetyp int

\pc.c(9296): error C2065: 'night_flag': nichtdeklarierter Bezeichner

\pc.c(9299): error C2065: 'night_flag': nichtdeklarierter Bezeichner

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

such mal in pc.c nach

strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived!

strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen...

 und mach beides raus , danach sollte es eigentlich gehen , nicht vergessen den Server neu zu konfigurieren 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...