[req] Day/night Change
make a code that checks the time, then send the proper msg to client...kahn wrote: i duno if any 1 else noticed this but in privet servers the time of day does not seam to change how can this be fixed thx
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
The Day/Night does not change because of a wrong variable type.
Open game.h, find:
BOOL m_cDayOrNight;
Replace with:
That's all folks...
Open game.h, find:
BOOL m_cDayOrNight;
Replace with:
Code: Select all
char m_cDayOrNight;
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
Nice pickup snoopy.snoopy81 wrote: The Day/Night does not change because of a wrong variable type.
Open game.h, find:
BOOL m_cDayOrNight;
Replace with:That's all folks...Code: Select all
char m_cDayOrNight;
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Lolz
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
it seems so easy when you say it... thank yousnoopy81 wrote: The Day/Night does not change because of a wrong variable type.
Open game.h, find:
BOOL m_cDayOrNight;
Replace with:That's all folks...Code: Select all
char m_cDayOrNight;
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
snoopy kick ass +1
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code: Select all
if (memcmp(cp,"/time ", 6) == 0) // m_iAdminLevelTime
{ AdminOrder_Time(iClientH, cp, dwMsgSize - 21);
return;
}
Code: Select all
void CGame::AdminOrder_Time(int iClientH, char * pData, DWORD dwMsgSize)
{ // Time command By ACiDx Last edit on Sept,06,04
//SNOOPY removed! it's a global variable
// BOOL m_bManualTime;
char seps[] = "= \t\n";
char * token, cBuff[256];
class CStrTok * pStrTok;
int i;
if ((dwMsgSize) <= 0) return;
if (m_pClientList[iClientH] == NULL) return;
if (m_pClientList[iClientH]->m_iAdminUserLevel < m_iAdminLevelTime) {
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ADMINUSERLEVELLOW, NULL, NULL, NULL, NULL);
return;
}
ZeroMemory(cBuff, sizeof(cBuff));
memcpy(cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok(cBuff, seps);
token = pStrTok->pGet();
token = pStrTok->pGet();
if (token != NULL)
{ if (token[0] == '2')
{ m_cDayOrNight = (char) 2;
wsprintf(G_cTxt, "GM Order(%-10s): Forces night mode", m_pClientList[iClientH]->m_cCharName);
bSendMsgToLS(MSGID_GAMEMASTERLOG, iClientH, FALSE, G_cTxt);
m_bManualTime = TRUE;
}else if (token[0] == '1')
{ m_cDayOrNight = (char) 1;
wsprintf(G_cTxt, "GM Order(%-10s): Forces day mode", m_pClientList[iClientH]->m_cCharName);
bSendMsgToLS(MSGID_GAMEMASTERLOG, iClientH, FALSE, G_cTxt);
m_bManualTime = TRUE;
}else if (token[0] == '0')
{ bSendMsgToLS(MSGID_GAMEMASTERLOG, iClientH, FALSE, G_cTxt);
wsprintf(G_cTxt, "GM Order(%-10s): Disable force time mode", m_pClientList[iClientH]->m_cCharName);
m_bManualTime = FALSE;
CheckDayOrNightMode();
}
for (i = 1; i < DEF_MAXCLIENTS; i++)
if ((m_pClientList[i] != NULL) && (m_pClientList[i]->m_bIsInitComplete == TRUE)) {
if ((m_pClientList[i]->m_cMapIndex >= 0) &&
(m_pMapList[m_pClientList[i]->m_cMapIndex] != NULL) &&
(m_pMapList[m_pClientList[i]->m_cMapIndex]->m_bIsFixedDayMode == FALSE))
SendNotifyMsg(NULL, i, DEF_NOTIFY_TIMECHANGE, m_cDayOrNight, NULL, NULL, NULL);
}
}
delete pStrTok;
}
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I