Hey Guys,
So I will basically do anything to have a foolproof system to force the round to end once the roundtime reaches 0:00 I currently have a deathmatch server and well since the round doesn't end the time will still be 0:00 on the ingame clock at this time tomorrow!!
Heres the code I used if its any help
PHP Code:
public Action:CheckRemainingTime(Handle:timer)
{
new Handle:hTmp;
hTmp = FindConVar("mp_timelimit");
new iTimeLimit = GetConVarInt(hTmp);
if (hTmp != INVALID_HANDLE)
CloseHandle(hTmp);
if (iTimeLimit > 0)
{
new timeleft;
GetMapTimeLeft(timeleft);
switch(timeleft)
{
case 60: CPrintToChatAll("Time Remaining: \x0460 seconds\x01");
case 30: CPrintToChatAll("Time Remaining: \x0430 seconds\x01");
case 15: CPrintToChatAll("Time Remaining: \x0415 seconds\x01");
case -1: CPrintToChatAll("\x023..");
case -2: CPrintToChatAll("\x022..");
case -3: CPrintToChatAll("\x021..");
}
if(timeleft < -3 && !g_bAllowRoundEnd)
{
g_bAllowRoundEnd = true;
CS_TerminateRound(0.5, CSRoundEnd_TerroristWin, true);
}
}
}
__________________
Feel Free to PM me about any questions, I'll do my best to help