Raised This Month: $51 Target: $400
 12% 

Galileo v5.9.1-925 (a feature rich map voting plugin) | Last Update: 2018-07-16


Post New Thread Reply   
 
Thread Tools Display Modes
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-18-2017 , 11:37   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #771

Quote:
Originally Posted by Papuszek View Post
When there is one person + HLTV, you can turn on RTV, how to turn it off? It is only when another person gets to use the RTV you can use after the appointed time.
You can set the cvars `gal_rtv_commands` to 15 and the cvar `gal_server_players_count` to 1:
Code:
// Indicates which say commands can be used to rock the vote. // The flags are additive. A value of 0 will disable this feature. // // 1  - Standard "rockthevote" command // // 2  - Shorthand "rtv" command // // 4  - Dynamic "rockthe<anything>vote" command (allows a player to type //     any one word (i.e. no spaces) that starts with "rockthe" and ends //     with "vote". Some examples might be: "rockthedamnvote", //     "rockthesillylittlevote", or "rockthefreakingvote". The total //     length of the word can not be longer than 31 characters. That //     leaves 20 characters for creativeness once you factor in the //     lengths of "rockthe" and "vote") // // 8  - Disable the RTV when there is only a single player on the server. // // 16 - Do not wait again the `gal_rtv_wait` time after the map extension. // // For example, if you want to use the options 1 and 2, use 1 + 2: // gal_rtv_commands 3 // // Instead of: // gal_rtv_commands 0 // // Default: 0 gal_rtv_commands 15 // If enabled, it will ignore players on the spectator team. This will have effect // when the plugin need counting the server players. Only works for Counter-Strike/CZ mod. // // If you also enabled the cvar `gal_emptyserver_change`, it will cause the empty-cycle // feature to work when there are spectators on server. // // 0 - disabled this feature. // 1 - enable this feature. // // Default: 0 gal_server_players_count 1

Quote:
Originally Posted by GoRiLliAz View Post
Because this function was in me have old plugins votemap but I replaced them with yours.
The other plugin was also a mapchooser? Which plugin is it?

Quote:
Originally Posted by D3XT3R View Post
hmm
first im using yours mapchooser til end and if bugged and i will stay use it becuase its the best one
and secound whitch logs you talking about? (of plugin or server or what!?)
They are mentioned on the support section https://forums.alliedmods.net/showthread.php?p=2351892#Support
  • To enable the Galileo logging, editing the `galileo.sma` changing the `DEBUG_LEVEL` variable.
    You need to set the DEBUG_LEVEL to 16, instead of the level 0 as default. See here where to do it.

    After that, to compile, install the plugin, restart your server and let your server run until the problem
    you are experiencing happens and after that send me by PM or post on the forum the log file '_galileo_log.txt'.
    The log file '_galileo_log.txt' will be at the folder 'addons/amxmodx/logs'.

    The file '_galileo_log.txt' will be very helpful to find out why it is not working.
    You current plugin is not creating the file log file '_galileo_log.txt', only the one with the debugging
    log enabled, as I explained above with the DEBUG_LEVEL 16 constant inside the plugin.
The galileo at this post already has the debug enabled, you can install it: https://forums.alliedmods.net/showpost.php?p=2527423&postcount=756

Also, I do not think Galileo is randomly changing the cvar `mp_friendlyfire`.
To know for sure, you need to record a log as asked on the support section.
Enable the server cvars logging. To do that, enter on your server console and run the commands:
Code:
condebug
log on
You should see something like this output on your server console after entering these commands:
Code:
condebug
condebug enabled
log on
Server logging data to file logs\L0618002.log
L 06/18/2017 - 12:00:30: Log file started (file "logs\L0618002.log") (game "czero") (version "48/1.0.0.3/6153")
Later let you server run, and when the bug happens, send me the log file 'qconsole.log',
which will be on the 'Half-File' folder or on your Game Mod' folder as `cstrike` or `czero`.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 09-26-2017 at 15:16. Reason: fixed support section link
addons_zz is offline
GoRiLliAz
Senior Member
Join Date: May 2013
Old 06-18-2017 , 12:16   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #772

Quote:
Originally Posted by addons_zz View Post
The other plugin was also a mapchooser? Which plugin is it?
Arkshine had modified for me the official mapchooser plugins
__________________

GoRiLliAz is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-18-2017 , 12:35   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #773

Quote:
Originally Posted by GoRiLliAz View Post
Arkshine had modified for me the official mapchooser plugins
Is one of these, the plugin he modified?
  1. https://forums.alliedmods.net/showthread.php?t=99503 changer les sons vote map sur Counter-Strike 1.6
  2. https://forums.alliedmods.net/showthread.php?t=66320 cycle map aléatoire
If not, can you share?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
GoRiLliAz
Senior Member
Join Date: May 2013
Old 06-18-2017 , 12:43   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #774

It was a private plugin only for us. I give it to you.

PHP Code:
// vim: set ts=4 sw=4 tw=99 noet:
//
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
// Copyright (C) The AMX Mod X Development Team.
//
// This software is licensed under the GNU General Public License, version 3 or higher.
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
//     https://alliedmods.net/amxmodx-license

//
// Nextmap Chooser Plugin
//

#include <amxmodx>
#include <amxmisc>

#define SELECTMAPS  5

new Array:DefaultMapsList;
new Array:
MinPlayersMapsList;
new Array:
MaxPlayersMapsList;
new Array:
CurrentMapsList;

new 
Float:ResetTime;
new 
Float:NextForcedVotemap;
new 
VotemapDirectCount 1

new 
g_nextName[SELECTMAPS]
new 
g_voteCount[SELECTMAPS 2]
new 
g_mapVoteNum
new g_teamScore[2]
new 
g_lastMap[32]

new 
g_coloredMenus
new bool:VotemapRunning;
new 
bool:VotemapDirectRunning;
new 
bool:IsDeDust2;

new 
CvarMinPlayersDirect;
new 
CvarMinPlayersDirectCooldown;
new 
CvarMinPlayersDirectMaxCount;
new 
CvarMinPlayers;
new 
CvarMinPlayersMapCycle[PLATFORM_MAX_PATH];
new 
CvarMaxPlayers;
new 
CvarMaxPlayersMapCycle[PLATFORM_MAX_PATH];
new 
CvarVoteCountBot;

new 
CurrentMap[32];

public 
plugin_init()
{
    
register_plugin("Nextmap Chooser"AMXX_VERSION_STR"1.2")
    
    
register_dictionary("mapchooser.txt")
    
register_dictionary("nextmap.txt")
    
register_dictionary("common.txt")
    
    new 
MenuName[64]
    
    
format(MenuNamecharsmax(MenuName), "%L""en""CHOOSE_NEXTM")
    
register_menucmd(register_menuid(MenuName), (-1^(-1<<(SELECTMAPS+2))), "countVote")
    
register_cvar("amx_extendmap_max""90")
    
register_cvar("amx_extendmap_step""15")

    
bind_pcvar_num(register_cvar("amx_vote_countbot""0"), CvarVoteCountBot);

    
bind_pcvar_num(register_cvar("amx_vote_minplayers_direct""1"), CvarMinPlayersDirect);
    
bind_pcvar_num(register_cvar("amx_vote_minplayers_direct_cooldown""120"), CvarMinPlayersDirectCooldown);
    
bind_pcvar_num(register_cvar("amx_vote_minplayers_direct_maxcount""2"), CvarMinPlayersDirectMaxCount);
    
bind_pcvar_num(register_cvar("amx_vote_minplayers""10"), CvarMinPlayers);
    
bind_pcvar_string(register_cvar("amx_vote_minplayers_mapcycle""maps_minplayers.ini"), CvarMinPlayersMapCyclecharsmax(CvarMinPlayersMapCycle));

    
bind_pcvar_num(register_cvar("amx_vote_maxplayers""25"), CvarMaxPlayers);
    
bind_pcvar_string(register_cvar("amx_vote_maxnplayers_mapcycle""maps_maxplayers.ini"), CvarMaxPlayersMapCyclecharsmax(CvarMaxPlayersMapCycle));

    
register_event("TeamScore""team_score""a");
    
register_logevent("@OnGameCommencing"2"1&Game_Commencing""1&Restart_Round");
    
    
get_localinfo("lastMap"g_lastMapcharsmax(g_lastMap))
    
set_localinfo("lastMap""")

    
g_coloredMenus colored_menus()
    
    
get_mapname(CurrentMapcharsmax(CurrentMap));
    
IsDeDust2 bool:equali(CurrentMap"de_dust2");
    
    
NextForcedVotemap get_gametime() + 60;
}

@
OnGameCommencing()
{
    
ResetTime get_gametime() + 0.1;
}

public 
OnConfigsExecuted()
{
    new 
filepath[PLATFORM_MAX_PATH];
    new 
configsDir[PLATFORM_MAX_PATH];
  
    
get_configsdir(configsDircharsmax(configsDir));
    
    
formatex(filepathcharsmax(filepath), "%s/maps.ini"configsDir);
    
    if (!
file_exists(filepath))
    {
        new 
mapcycle[32];
        
get_cvar_string("mapcyclefile"mapcyclecharsmax(mapcycle));
        
formatex(filepathcharsmax(filepath), "%s/%s"configsDirmapcycle);
    }
    
    if (
loadSettings(filepathDefaultMapsList))
    {
        
set_task(15.0"voteNextmap"987456""0"b");
        
        if (
CvarMinPlayers && CvarMinPlayersMapCycle[0] != EOS)
        {
            
formatex(filepathcharsmax(filepath), "%s/%s"configsDirCvarMinPlayersMapCycle);
            
loadSettings(filepathMinPlayersMapsList);
        }

        if (
CvarMaxPlayers && CvarMaxPlayersMapCycle[0] != EOS)
        {
            
formatex(filepathcharsmax(filepath), "%s/%s"configsDirCvarMaxPlayersMapCycle);
            
loadSettings(filepathMaxPlayersMapsList);
        }
    }
    else
    {
        
set_fail_state("Maps non trouvés dans %s (incluant la map actuelle et la derniere jouee)"filepath);
    }
}

public 
client_disconnected(client)
{
    if (!!!
CvarMinPlayersDirect || VotemapRunning || VotemapDirectRunning)
    {
        return;
    }
    
    new 
Float:currentTime get_gametime();
    
    if (
NextForcedVotemap currentTime)
    {
        if (
getTotalActivePlayers(.ignoreMe client) <= CvarMinPlayers && !IsDeDust2 && VotemapDirectCount <= CvarMinPlayersDirectMaxCount)
        {
            
VotemapDirectRunning true;
            
VotemapDirectCount++;
            
            
displayVoteMap(MinPlayersMapsList);
        }
    }
}

public 
checkVotes()
{
    new 
0
    
    
for (new 0g_mapVoteNum; ++a)
        if (
g_voteCount[b] < g_voteCount[a])
            
a

    
    
if (!VotemapDirectRunning 
        
&& g_voteCount[SELECTMAPS] > g_voteCount[b]
        && 
g_voteCount[SELECTMAPS] > g_voteCount[SELECTMAPS+1])
    {
        new 
Float:steptime get_cvar_float("amx_extendmap_step")
        
set_cvar_float("mp_timelimit"get_cvar_float("mp_timelimit") + steptime)
        
client_print(0print_chat"%L"LANG_PLAYER"CHO_FIN_EXT"steptime)
        
log_amx("Vote: Voting for the nextmap finished. Map %s will be extended to next %.0f minutes"CurrentMapsteptime)
        
        return
    }
    
    new 
smap[32]
    if (
g_voteCount[b] && g_voteCount[SELECTMAPS 1] <= g_voteCount[b])
    {
        
ArrayGetString(CurrentMapsListg_nextName[b], smapcharsmax(smap));
        
set_cvar_string("amx_nextmap"smap);
        
        if (
VotemapDirectRunning)
        {
            
set_cvar_float("mp_timelimit", ((get_gametime() - ResetTime) + 5.0) / 60.0);
            
            
set_hudmessage(20200100, -1.00.5500.54.50.252.0, -1);
            
show_hudmessage(0"Changement de map dans quelques secondes...");
        }
    }
    else if (
VotemapDirectRunning)
    {
        
client_print(0print_chat"%L"LANG_PLAYER"VOTE_FAILED");
        
log_amx("Vote: Voting for the nextmap finished. Vote failed.");
        
VotemapDirectRunning false;
        return;
    }
    
    
get_cvar_string("amx_nextmap"smapcharsmax(smap))
    
client_print(0print_chat"%L"LANG_PLAYER"CHO_FIN_NEXT"smap)
    
log_amx("Vote: Voting for the nextmap finished. The nextmap will be %s"smap)
}

public 
countVote(idkey)
{
    if (
get_cvar_float("amx_vote_answers"))
    {
        new 
name[MAX_NAME_LENGTH]
        
get_user_name(idnamecharsmax(name))
        
        if (
key == SELECTMAPS)
            
client_print(0print_chat"%L"LANG_PLAYER"CHOSE_EXT"name)
        else if (
key SELECTMAPS)
        {
            new 
map[32];
            
ArrayGetString(CurrentMapsListg_nextName[key], mapcharsmax(map));
            
client_print(0print_chat"%L"LANG_PLAYER"X_CHOSE_X"namemap);
        }
    }
    ++
g_voteCount[key]
    
    return 
PLUGIN_HANDLED
}

bool:isInMenu(id)
{
    for (new 
0g_mapVoteNum; ++a)
        if (
id == g_nextName[a])
            return 
true
    
return false
}

bool:checkWinsRounds()
{
    new 
winlimit get_cvar_num("mp_winlimit")
    new 
maxrounds get_cvar_num("mp_maxrounds")
    
    if (
winlimit)
    {
        new 
winlimit 2
        
        
if ((g_teamScore[0]) && (g_teamScore[1]))
        {
            return 
false;
        }
    }
    else if (
maxrounds)
    {
        if ((
maxrounds 2) > (g_teamScore[0] + g_teamScore[1]))
        {
            return 
false;
        }
    }
    
    return 
true;
}

bool:checkTimeLeft()
{
    new 
timeleft get_timeleft()

    if (
timeleft || timeleft 129)
    {
        return 
false;
    }
    
    return 
true;
}

getTotalActivePlayers(ignoreMe 0)
{
    new 
playersList[MAX_PLAYERS], playersCounttotalplayers;
    
get_players(playersListplayersCount, !!CvarVoteCountBot "ih" "ich");
    
    for (new 
0player 0playersCount; ++i)
    {
        
player playersList[i];
        
        if ((!
ignoreMe || player != ignoreMe) && <= get_user_team(player) <= 2)
        {
            ++
totalplayers;
        }
    }
    
    return 
totalplayers;
}

public 
voteNextmap()
{
    if (!
checkWinsRounds() || !checkTimeLeft())
    {
        
VotemapRunning false;
        return;
    }

    if (
VotemapRunning || VotemapDirectRunning)
    {
        return;
    }

    
VotemapRunning true;

    new 
totalplayers getTotalActivePlayers();
    new Array:
mapsList Invalid_Array;

    if (
CvarMinPlayers && totalplayers <= CvarMinPlayers)
    {
        if (
IsDeDust2)
        {
            
client_print_color(0print_team_red"* Il y a moins de ^3%d^1 joueurs sur la map ^4de_dust2^4, ^3votemap est désactivé^1"CvarMinPlayers 1);
            return;
        }
        
        
mapsList MinPlayersMapsList;
    }
    else if (
CvarMaxPlayers && totalplayers >= CvarMaxPlayers)
    {
        
mapsList MaxPlayersMapsList;
    }

    
displayVoteMap(mapsList);
}

displayVoteMap(Array:mapsList)
{  
    if (
mapsList == Invalid_Array)
    {
        
mapsList DefaultMapsList;
    }
    
    
CurrentMapsList mapsList;
    
NextForcedVotemap get_gametime() + float(CvarMinPlayersDirectCooldown);
    
    new const 
mapsCount ArraySize(mapsList);
    
    new 
menu[512], amkeys = (1<<SELECTMAPS 1)

    new 
pos format(menucharsmax(menu), g_coloredMenus "\y%L:\w^n^n" "%L:^n^n"LANG_SERVER"CHOOSE_NEXTM")
    new 
dmax = (mapsCount SELECTMAPS) ? SELECTMAPS mapsCount
    
    
for (g_mapVoteNum 0g_mapVoteNum dmax; ++g_mapVoteNum)
    {
        
random_num(0mapsCount 1)
        
        while (
isInMenu(a))
            if (++
>= mapsCount0
        
        g_nextName
[g_mapVoteNum] = a
        pos 
+= format(menu[pos], charsmax(menu) - pos"%d. %a^n"g_mapVoteNum 1ArrayGetStringHandle(mapsLista));
        
mkeys |= (1<<g_mapVoteNum)
        
g_voteCount[g_mapVoteNum] = 0
    
}
    
    
menu[pos++] = '^n'
    
g_voteCount[SELECTMAPS] = 0
    g_voteCount
[SELECTMAPS 1] = 0

    
if (!VotemapDirectRunning && (get_cvar_num("mp_winlimit") + get_cvar_num("mp_maxrounds")) == && (get_cvar_float("mp_timelimit") < get_cvar_float("amx_extendmap_max")))
    {
        
pos += format(menu[pos], charsmax(menu) - pos"%d. %L^n"SELECTMAPS 1LANG_SERVER"EXTED_MAP"CurrentMap)
        
mkeys |= (1<<SELECTMAPS)
    }

    
format(menu[pos], charsmax(menu), "%d. %L"SELECTMAPS+2LANG_SERVER"NONE")
    new 
MenuName[64]
    
    
format(MenuNamecharsmax(MenuName), "%L""en""CHOOSE_NEXTM")
    
show_menu(0mkeysmenu15MenuName)
    
set_task(15.0"checkVotes")
    
client_print(0print_chat"%L"LANG_SERVER"TIME_CHOOSE")
    
client_cmd(0"spk Gman/Gman_Choose2")
    
log_amx("Vote: Voting for the nextmap started")
}

stock bool:ValidMap(mapname[])
{
    if ( 
is_map_valid(mapname) )
    {
        return 
true;
    }
    
// If the is_map_valid check failed, check the end of the string
    
new len strlen(mapname) - 4;
    
    
// The mapname was too short to possibly house the .bsp extension
    
if (len 0)
    {
        return 
false;
    }
    if ( 
equali(mapname[len], ".bsp") )
    {
        
// If the ending was .bsp, then cut it off.
        // the string is byref'ed, so this copies back to the loaded text.
        
mapname[len] = '^0';
        
        
// recheck
        
if ( is_map_valid(mapname) )
        {
            return 
true;
        }
    }
    
    return 
false;
}

loadSettings(filename[], &Array:mapsList)
{
    if (!
file_exists(filename))
        return 
0
        
    server_print
("Chargement du fichier: %s"filename);

    new 
szText[32]
    new 
currentMap[32]
    
    new 
buff[256];
    
    
get_mapname(currentMapcharsmax(currentMap))

    new 
fp=fopen(filename,"r");
    
    if (
mapsList == Invalid_Array)
    {
        
mapsList ArrayCreate(32);
    }
    
    while (!
feof(fp))
    {
        
buff[0]='^0';
        
szText[0]='^0';
        
        
fgets(fpbuffcharsmax(buff));
        
parse(buffszTextcharsmax(szText));

        if (
szText[0] == ';' ||    !ValidMap(szText))
        {
            continue;
        }

        if (
equali(currentMap"de_dust2") || !equali(szTextcurrentMap))
        {
            
ArrayPushString(mapsListszText); 
        }
    }
    
    
fclose(fp);

    if (!
ArraySize(mapsList))
    {
        
ArrayDestroy(mapsList);
        return 
0;
    }
    
    return 
1;
}

public 
team_score()
{
    new 
team[2]
    
    
read_data(1teamcharsmax(team))
    
g_teamScore[(team[0]=='C') ? 1] = read_data(2)
}

public 
plugin_end()
{
    new 
current_map[32]

    
get_mapname(current_mapcharsmax(current_map))
    
set_localinfo("lastMap"current_map)

    
ArrayDestroy(DefaultMapsList);
    
ArrayDestroy(MinPlayersMapsList);
    
ArrayDestroy(MaxPlayersMapsList);

__________________

GoRiLliAz is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-18-2017 , 13:08   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #775

Quote:
Originally Posted by GoRiLliAz View Post
It was a private plugin only for us. I give it to you.
Thanks, I opened a issue for tracking this on:
  1. Issues#70 Directly changes the map by a map predefined by a cvar
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Papuszek
Junior Member
Join Date: Jun 2017
Old 06-18-2017 , 15:21   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #776

What does this error mean?

[galileo.amxx] WARNING, getNextMapByPosition: The current map will probably be set as the next map.

Last edited by Papuszek; 06-18-2017 at 16:57.
Papuszek is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-18-2017 , 18:58   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #777

It is not an error, it is a warning. I think it as of an information about something which is happening at the server. That warning is saying: `The current map will probably be set as the next map.`

It is show when there are some restrictions on the server, as too little maps available, therefore the default nextmap set when the server start, could be set as the current map name.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
BeNq!
Senior Member
Join Date: Mar 2009
Old 06-19-2017 , 07:40   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #778

Quote:
Originally Posted by addons_zz View Post
  1. What is the problem?
  2. How to reproduce it?
Timeleft expired and was written "do not yet vote".
BeNq! is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 06-19-2017 , 08:54   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #779

Quote:
Originally Posted by BeNq! View Post
Timeleft expired and was written "do not yet vote".
And it was already voted or not? The nextmap was already set or not? Does this always happens? Can you record a log with it?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
BeNq!
Senior Member
Join Date: Mar 2009
Old 06-20-2017 , 19:39   Re: Galileo v5.7.2-885 (a feature rich map voting plugin) | Last Update: 2017-05-25
Reply With Quote #780

No voted. Crash server?
BeNq! 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 15:15.


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