Thats normal because there is no check for precentage when player disconnect. It only checks if a player has vote the rock and remove players count from RTV count.
Add these line in client_disconnect()
PHP Code:
if(!g_pauseMapEndVoteTask)
{
g_pauseMapEndVoteTask = 1;
set_task(3.0, "check_rtv");
}
and add the new funktion after the client_disconnect() Block
PHP Code:
check_rtv()
{
new rocksNeeded = vote_getRocksNeeded();
if (task_exists(TASKID_REMINDER))
{
remove_task(TASKID_REMINDER);
}
// determine if there have been enough rocks for a vote yet
if (g_rockedVoteCnt >= rocksNeeded)
{
// announce that the vote has been rocked
client_print(0, print_chat, "%L", LANG_PLAYER, "GAL_ROCK_ENOUGH");
// start up the vote director
vote_startDirector(true);
}
else
{
g_pauseMapEndVoteTask = 0;
// let the players know how many more rocks are needed
rtv_remind(TASKID_REMINDER);
if (get_pcvar_num(cvar_rtvReminder))
{
// initialize the rtv reminder timer to repeat how many rocks are still needed, at regular intervals
set_task(get_pcvar_float(cvar_rtvReminder) * 60.0, "rtv_remind", TASKID_REMINDER, _, _, "b");
}
}
}
and recompile the plugin.
That should solve the problem...i think..
@Brad:
For better reason why the vote is now rocked make a new Multilangvariable with text that calls that the vote is rocked because some players that want vote the rock have leave the server and now RTV are enough...
Greetz,
Matze
__________________