English:
RTV needs to add a vote only from those who are in the team(s).
how to add to the rtv, so that those who are in the spectators are not taken into account. Found a few pieces of code in
rockthevote.sp, and noticed that the plugin is counting everyone connected. Found a way, I decided to add this: "
PHP Code:
if (GetClientTeam (client)> 1)
" but got confused where it is better to do it.
There are a couple of places where you can add:
void AttemptRTV (int client) or here
public Action Command_RTV (int client, int args).
The idea came to just replace the value of g_Voters like this:
PHP Code:
for (int i = 1; i <= MAXPLAYERS; i ++)
{
if (GetClientTeam (client)> 1) g_Votes ++;
}
but here is where it is better to do it, until I understand and don’t know how and where to do it correctly.
version Sourcemod :
SourceMod v1.10.0.6499
P.s. Sorry for bad English.
Russian:
RTV нужно добавить голосование только от тех кто находится в команде(ах), чтоб не учитывались те кто в спектаторах. Нашел несколько кусочков кода в
rockthevote.sp , и заметил что плагин подсчитывает всех подключившихся. Нашел способ, решил добавить вот это : "if (GetClientTeam(client) > 1)" но запутался где это лучше сделать .
Есть пару мест где можно добавить :
void AttemptRTV(int client) или здесь public Action Command_RTV(int client, int args) .
Идея пришла просто заменить значение
g_Voters , типа этого :
PHP Code:
for (int i=1; i<=MAXPLAYERS; i++)
{
if (GetClientTeam(client) > 1) g_Votes++;
}
но вот где это лучше сделать , пока не пойму и не знаю как и где это сделать правильно.
Версия соурсмод:
SourceMod v1.10.0.6499