Raised This Month: $32 Target: $400
 8% 

RTV needs to add a vote only from those who are in the team (s)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mewbie222
Senior Member
Join Date: May 2018
Old 06-22-2021 , 07:17   RTV needs to add a vote only from those who are in the team (s)
Reply With Quote #1

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<= MAXPLAYERS++)
{
if (
GetClientTeam (client)> 1g_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=1i<=MAXPLAYERSi++)
    {
        if (
GetClientTeam(client) > 1g_Votes++;
    } 
но вот где это лучше сделать , пока не пойму и не знаю как и где это сделать правильно.
Версия соурсмод: SourceMod v1.10.0.6499

Last edited by mewbie222; 06-22-2021 at 12:08.
mewbie222 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode