Hello.
On my Windows server (6153) with AMXX 1.9.0 5229 i have next problem:
The code below doesn't work:
PHP Code:
// iNewTime = 30
new Float:fRoundStartTime = get_gamerules_float("CHalfLifeMultiplay", "m_fRoundCount")
new Float:fCurrentGameTime = get_gametime()
set_gamerules_int( "CHalfLifeMultiplay", "m_iRoundTimeSecs", floatround(iNewTime + fCurrentGameTime - fRoundStartTime) )
#if defined DEBUG
new iTime = get_gamerules_int("CHalfLifeMultiplay", "m_iRoundTimeSecs")
server_print( "* iNewTime = %d | iTime = %d", iNewTime, iTime ) // output: 30 34 (because mp_freezetime = 4)
#endif
if( message_begin(MSG_ALL, g_Msg_RoundTime) )
{
write_short(iNewTime)
message_end()
}
This code runs in register_logevent( "On_Round_Start", 2, "1=Round_Start" ) function.
In game i see 00;30 on timer, but when it reaches 00:00 the round doesn't end and continues for another 30 seconds (because mp_roundtime = 1.0).
Any suggestions?
__________________