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

Mapchooser Extended!


Post New Thread Reply   
 
Thread Tools Display Modes
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-14-2011 , 15:17   Re: Mapchooser Extended!
Reply With Quote #241

Released Mapchooser Extended 1.5. Visit its thread for details and downloads.

Also released Mapchooser Extended Sounds 1.1. Visit its thread for details and downloads.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-15-2011 , 16:29   Re: Mapchooser Extended!
Reply With Quote #242

Updated Mapchooser Extended to 1.5.1 and Mapchooser Extended Sounds to 1.1.2 (now with less crashes!).
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
John.Smith
Junior Member
Join Date: Jul 2010
Old 05-16-2011 , 09:03   Re: Mapchooser Extended!
Reply With Quote #243

Hi !

Whats about this translation messages ?

L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 42.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 48.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 59.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 65.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 71.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 77.

lg
Smith
John.Smith is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-16-2011 , 13:32   Re: Mapchooser Extended!
Reply With Quote #244

Quote:
Originally Posted by John.Smith View Post
Hi !

Whats about this translation messages ?

L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 42.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 48.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 59.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 65.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 71.
L 05/16/2011 - 14:48:00: [SM] Ignoring translation to invalid language "#format" on line 77.

lg
Smith
#format is supposed to be a special string in translations that tells it which variables are used in that translation and what types they are.

It should only be present in the main translation file (addons/sourcemod/translations/mapchooser_extended.phrases.txt) and not any of the other language files.

Incidentally, is this in 1.4.x or 1.5.x? 1.5 has a new thread so that it's easier for me to post new versions without Zuko's intervention.

Edit: There was an issue with the Russian translation included with 1.5/1.5.1. I think I've fixed it now, and posted it in the other thread.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-16-2011 at 13:48.
Powerlord is offline
sidjamesbond
Member
Join Date: Oct 2008
Old 05-16-2011 , 22:40   Re: Mapchooser Extended!
Reply With Quote #245

Quote:
Originally Posted by Sillium View Post
Is it possible to disable some or all sounds? Or can I just leave the sound cvars empty?

can someone break it down for me? I am not very gifted in this area. All I want is the Pssht Phsst phsst phsst to go away when a vote comes up. thanks!

Quote:

// This file was auto-generated by SourceMod (v1.3.6)
// ConVars for plugin "mapchooser_extended.smx"

// Specifies how many more frags are allowed when map is extended.
// -
// Default: "10"
// Minimum: "5.000000"
sm_extendmap_fragstep "10"
// Specifies how many more rounds each extension makes
// -
// Default: "5"
// Minimum: "1.000000"
sm_extendmap_roundstep "10"
// Specifies how much many more minutes each extension makes
// -
// Default: "15"
// Minimum: "5.000000"
sm_extendmap_timestep "15"
// Block slots to prevent stupid votes.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_blockslots "1"
// Specifies if a 'Don't Change' option should be added to early votes
// -
// Default: "0"
// Minimum: "0.000000"
sm_mapvote_dontchange "0"
// Enable sounds to be played during vote start and end (assuming correct pure mode and the resp. sound variable is diffrent from "")
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_enablesounds "0"
// Enable sounds to be played during warning counter
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_enablewarningcountersounds "0"
// Specifies if MapChooser should run an end of map vote
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_endvote "1"
// Specifies how many past maps to exclude from the vote.
// -
// Default: "5"
// Minimum: "0.000000"
sm_mapvote_exclude "1"
// Number of extensions allowed each map.
// -
// Default: "1"
// Minimum: "0.000000"
sm_mapvote_extend "1"
// Specifies how many maps to include in the vote.
// -
// Default: "5"
// Minimum: "2.000000"
// Maximum: "6.000000"
sm_mapvote_include "5"
// Number of run off votes allowed each map.
// -
// Default: "1"
// Minimum: "0.000000"
sm_mapvote_maxrunoffs "1"
// Specifies whether or not MapChooser should pick a map if no votes are received.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_novote "1"
// Should the option that a player vote on get printed (1 - yes print player votes, 0 - don't print).
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_printvotes "0"
// Hold run of votes if winning choice is less than a certain margin
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_runoff "1"
// If winning choice has less than this percent of votes, hold a runoff
// -
// Default: "50"
// Minimum: "0.000000"
// Maximum: "100.000000"
sm_mapvote_runoffpercent "50"
// Warning time for runoff vote in seconds.
// -
// Default: "5.0"
// Minimum: "0.000000"
// Maximum: "30.000000"
sm_mapvote_runoffvotewarningtime "5.0"
// How many vote options the hint box should show. 0 will disable it
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "5.000000"
sm_mapvote_showvotes "3"
// Sound that is being played when a vote ends. (relative to $basedir/sound/)
// -
// Default: "sourcemod/mapchooser/endofvote.mp3"
sm_mapvote_sound_voteend "sourcemod/mapchooser/endofvote.mp3"
// Sound that is being played when a vote starts. (relative to $basedir/sound/)
// -
// Default: "sourcemod/mapchooser/startyourvoting.mp3"
sm_mapvote_sound_votestart "sourcemod/mapchooser/startyourvoting.mp3"
// Sound file for warning start. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_warning.wav"
sm_mapvote_sound_warning "sourcemod/mapchooser/cstrike/warning.mp3"
// Specifies when to start the vote based on time remaining.
// -
// Default: "10.0"
// Minimum: "1.000000"
sm_mapvote_start "5.0"
// Specifies when to start the vote based on percents.
// -
// Default: "35.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
sm_mapvote_start_percent "35.0"
// Enable or Disable percentage calculations when to start vote.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_start_percent_enable "0"
// Specifies when to start the vote base on frags remaining.
// -
// Default: "5.0"
// Minimum: "1.000000"
sm_mapvote_startfrags "5.0"
// Specifies when to start the vote based on rounds remaining. Use 0 on TF2 to start vote during bonus round time
// -
// Default: "2.0"
// Minimum: "0.000000"
sm_mapvote_startround "2.0"
// MapChooser Extended Version
// -
// Default: "1.3"
sm_mapvote_version "1.3"
// Specifies how long the mapvote should be available for.
// -
// Default: "20"
// Minimum: "5.000000"
sm_mapvote_voteduration "20"
// Sound file for warning counter: eight. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_8sec.wav"
sm_mapvote_warningsound_eight "sourcemod/mapchooser/cstrike/eight.mp3"
// Sound file for warning counter: five. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_5sec.wav"
sm_mapvote_warningsound_five "sourcemod/mapchooser/cstrike/five.mp3"
// Sound file for warning counter: four. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_4sec.wav"
sm_mapvote_warningsound_four "sourcemod/mapchooser/cstrike/four.mp3"
// Sound file for warning counter: nine. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_9sec.wav"
sm_mapvote_warningsound_nine "sourcemod/mapchooser/cstrike/nine.mp3"
// Sound file for warning counter: one. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_1sec.wav"
sm_mapvote_warningsound_one "sourcemod/mapchooser/cstrike/one.mp3"
// Sound file for run off vote start. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_do_not_fail_this_time.wav"
sm_mapvote_warningsound_runoffvotestart "sourcemod/mapchooser/cstrike/gman_choose2.mp3"
// Sound file for warning counter: seven. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_7sec.wav"
sm_mapvote_warningsound_seven "sourcemod/mapchooser/cstrike/seven.mp3"
// Sound file for warning counter: six. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_6sec.wav"
sm_mapvote_warningsound_six "sourcemod/mapchooser/cstrike/six.mp3"
// Sound file for warning counter: sixty. (relative to $basedir/sound/)
// -
// Default: "sourcemod/mapchooser/tf2/tf_60s.mp3"
sm_mapvote_warningsound_sixty ""
// Sound file for warning counter: ten. (relative to $basedir/sound/)
// -
// Default: "sourcemod/mapchooser/tf2/tf_10s.mp3"
sm_mapvote_warningsound_ten "sourcemod/mapchooser/cstrike/ten.mp3"
// Sound file for warning counter: thirty. (relative to $basedir/sound/)
// -
// Default: "sourcemod/mapchooser/tf2/tf_30s.mp3"
sm_mapvote_warningsound_thirty ""
// Sound file for warning counter: three. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_3sec.wav"
sm_mapvote_warningsound_three "sourcemod/mapchooser/cstrike/three.mp3"
// Sound file for warning counter: twenty. (relative to $basedir/sound/)
// -
// Default: "sourcemod/mapchooser/tf2/tf_20s.mp3"
sm_mapvote_warningsound_twenty ""
// Sound file for warning counter: two. (relative to $basedir/sound/)
// -
// Default: "vo/announcer_ends_2sec.wav"
sm_mapvote_warningsound_two "sourcemod/mapchooser/cstrike/two.mp3"
// Warning time in seconds.
// -
// Default: "15.0"
// Minimum: "0.000000"
// Maximum: "60.000000"
sm_mapvote_warningtime "15.0"
sidjamesbond is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-16-2011 , 22:47   Re: Mapchooser Extended!
Reply With Quote #246

Quote:
Originally Posted by sidjamesbond View Post
can someone break it down for me? I am not very gifted in this area. All I want is the Pssht Phsst phsst phsst to go away when a vote comes up. thanks!
The problem you're having is because SourceMod (or the game) plays a sound whenever the hintbox text displays.

Unfortunately, I'm not sure if there's any way to change SourceMod's configuration to stop this, other than modifying the plugin to use something other than the hintbox.

Hmm, there's an idea for a new feature...
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-16-2011 at 22:50.
Powerlord is offline
John.Smith
Junior Member
Join Date: Jul 2010
Old 05-17-2011 , 02:25   Re: Mapchooser Extended!
Reply With Quote #247

Does he mean this ?

sv_hudhint_sound 0


John.Smith is offline
DePuTaTiG
Junior Member
Join Date: Dec 2010
Old 06-08-2011 , 10:56   Re: Mapchooser Extended!
Reply With Quote #248

How to make that map has changed after the vote on the parameter mp_timelimit 25, but not 'map will change in the next round'.

P.S.: on a server the parameter mp_ignore_round_win_conditions ' 1 ' is established
P.P.S: sorry for my bad English.
DePuTaTiG is offline
ferest
New Member
Join Date: Nov 2010
Old 06-09-2011 , 06:43   Re: Mapchooser Extended!
Reply With Quote #249

Guys here is a question only mapchooser_extended_1.4.1

I want to change the map of votes well it is in the middle says here is an example screen
http://i063.radikal.ru/1106/52/da3bd8b1d13e.png

That is, I wanted to do so))
http://s43.radikal.ru/i101/1106/db/fe7b8380c394.png

But when someone votes obtained here such garbage that's how I fix it?
http://s013.radikal.ru/i325/1106/45/e364fef3af49.png

Ask how I did it?
I went to the folder sourcemod/scripting/mapchooser_extended/DisplayVoteProgress.sp

There found a line

Quote:
PrintHintTextToAll("%s", hintboxText);
and changed here on here is

Quote:
new Handle:hBuffer = StartMessageAll("KeyHintText");
BfWriteByte(hBuffer, 1);
BfWriteString(hBuffer, hintboxText);
EndMessage();
Here is what I got!

Quote:
#include <sourcemod>
#include <sdktools>
#include <sdktools_sound>

#pragma semicolon 1

#define ITEM_MAX_LENGTH 128
#define CLIENT_MAX_LENGTH 32

new g_PlayerVotes[MAXPLAYERS+1];

new Handle:g_Cvar_PrintVotes = INVALID_HANDLE;
new Handle:g_Cvar_ShowVotes = INVALID_HANDLE;
new Handle:g_VoteDuration = INVALID_HANDLE;
new Handle:g_AllowedVoters = INVALID_HANDLE;

new Handle:g_timer_ShowVotes = INVALID_HANDLE;

new g_VoteTimeStart2;

public OnPluginStart_DisplayVote()
{
LoadTranslations("common.phrases");
LoadTranslations("basetriggers.phrases");

g_Cvar_PrintVotes = CreateConVar("sm_mapvote_printvotes", "0", "Should the option that a player vote on get printed (1 - yes print player votes, 0 - don't print).", _, true, 0.0, true, 1.0);
g_Cvar_ShowVotes = CreateConVar("sm_mapvote_showvotes", "3", "How many vote options the hint box should show. 0 will disable it", _, true, 0.0, true, 5.0);

g_VoteDuration = FindConVar("sm_mapvote_voteduration");

g_AllowedVoters = CreateArray(1);
}

public OnMapEnd_DisplayVote()
{
g_timer_ShowVotes = INVALID_HANDLE; // Being closed on mapchange: TIMER_FLAG_NO_MAPCHANGE
}

public OnClientDisconnect_DisplayVote(client)
{
// reset the clients vote
g_PlayerVotes[client] = -1;

// if client is allowed to vote then remove him (to fix max number of voters)
new index = FindValueInArray(g_AllowedVoters, client);
if (index > -1)
{
RemoveFromArray(g_AllowedVoters, index);
}

// if we display vote then update it
if (GetConVarBool(g_Cvar_ShowVotes) && g_timer_ShowVotes != INVALID_HANDLE)
{
TriggerTimer(g_timer_ShowVotes);
}
}

public VoteAction(Handle:menu, MenuAction:action, param1, param2)
{
switch(action)
{
case MenuAction_VoteStart:
{
VoteStarted();
if (GetConVarBool(g_Cvar_ShowVotes))
{
if (g_timer_ShowVotes == INVALID_HANDLE)
{
g_timer_ShowVotes = CreateTimer(0.95, ShowVoteProgress, menu, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
}
TriggerTimer(g_timer_ShowVotes);
}
}

case MenuAction_Select:
{
if (GetConVarBool(g_Cvar_PrintVotes))
{
decl String:name[CLIENT_MAX_LENGTH], Stringption[ITEM_MAX_LENGTH];
GetClientName(param1, name, sizeof(name));
GetMenuItem(menu, param2, option, 0, _, option, sizeof(option));

PrintToChatAll("[SM] %t", "Vote Select", name, option);
}
if (GetConVarBool(g_Cvar_ShowVotes))
{
g_PlayerVotes[param1] = param2;
TriggerTimer(g_timer_ShowVotes);
}
}
}
}

VoteStarted()
{
// reset all votes
for (new i = 0; i <= MAXPLAYERS ; i++)
{
g_PlayerVotes[i] = -1;
}

// set clients allowed to vote
ClearArray(g_AllowedVoters);
for (new i = GetMaxClients(); i > 0; i--)
if (IsClientInGame(i) && !IsFakeClient(i))
PushArrayCell(g_AllowedVoters, i);

g_VoteTimeStart2 = GetTime();
}

public VoteEnded(const String:voteEndInfo[])
{
if (g_timer_ShowVotes != INVALID_HANDLE)
{
KillTimer(g_timer_ShowVotes);
g_timer_ShowVotes = INVALID_HANDLE;
}
PrintHintTextToAll(voteEndInfo);
}

/**
* Show/updates the hintbox with current vote status
* ex.
*
Next map: (3/7) - 17 s
1. de_dust2 - 2
2. de_nuke -1
*/
public Action:ShowVoteProgress(Handle:timer, Handle:menu)
{
if (menu == INVALID_HANDLE) return Plugin_Continue;

decl String:hintboxText[1024];
decl Stringption[ITEM_MAX_LENGTH];
decl String:formatBuffer[256];
decl String:translation_buffer[256];

// <title> - <timeleft>
//GetMenuTitle(menu, hintboxText, sizeof(hintboxText));
Format(translation_buffer, sizeof(translation_buffer),"%T", "Number Of Votes", LANG_SERVER);
Format(hintboxText, sizeof(hintboxText), "%s (%i/%i) - %iсек", translation_buffer, GetNrReceivedVotes(), GetArraySize(g_AllowedVoters), VoteTimeRemaining());

// <X>. <option>
new nrItems = GetMenuItemCount(menu);
new itemIndex[nrItems];
new itemVotes[nrItems];
GetItemsSortedByVotes(itemIndex, itemVotes, nrItems);

new displayNrOptions = GetConVarInt(g_Cvar_ShowVotes) >= nrItems ? nrItems : GetConVarInt(g_Cvar_ShowVotes);
for (new i = 1; i <= displayNrOptions; i++)
{
if (itemVotes[i-1] > 0)
{
GetMenuItem(menu, itemIndex[i-1], option, 0, _, option, sizeof(option));

new percent = ((itemVotes[i-1] * 100) / GetNrReceivedVotes());

Format(formatBuffer, sizeof(formatBuffer), "%T", "Vote Progress", LANG_SERVER, i, option, itemVotes[i-1], percent);
StrCat(hintboxText, sizeof(hintboxText), formatBuffer);
}
else
break;
}
new Handle:hBuffer = StartMessageAll("KeyHintText");
BfWriteByte(hBuffer, 1);
BfWriteString(hBuffer, hintboxText);
EndMessage();

return Plugin_Continue;
}

/**
* @return timeleft (remaining) of vote.
*/
VoteTimeRemaining()
{
new remainingTime = g_VoteTimeStart2 + GetConVarInt(g_VoteDuration) - GetTime();
if (remainingTime < 0)
{
return 0;
}
else
{
return remainingTime;
}
}

/**
* Returns a list of all items (their index) and number of votes on each, ordered by nr of received votes in descending order
*/
GetItemsSortedByVotes(itemIndex[], itemVotes[], nrOfItems)
{
// Get nr of votes on each item
new votesOnItem[nrOfItems+1]; // simplify by increasing by one and having index 0 being "not voted"
for (new i = 0; i <= MAXPLAYERS; i++)
{
votesOnItem[g_PlayerVotes[i]+1]++;
}

// simple insertion sort
new mostVotes, index;
for (new i = 0; i < nrOfItems; i++)
{
mostVotes = -1;
for (new j = 1; j <= nrOfItems; j++)
{
if (votesOnItem[j] > mostVotes)
{
mostVotes = votesOnItem[j];
index = j;
}
}

itemIndex[i] = index-1;
itemVotes[i] = mostVotes;

// make sure it will not be selected again
votesOnItem[index] = -1;
}
}

/**
* @return return the total nr of votes received
*/
GetNrReceivedVotes()
{
new nrVotes = 0;
for (new i = GetMaxClients(); i > 0; i--)
{
if(g_PlayerVotes[i] > -1)
nrVotes++;
}
return nrVotes;
}


where is the jamb? please help me make the right!


Guys and you can clean it up a string of css well, when you're in a shoot pishit type
Bro attacked a teammate

You can remove it as something ?????
ferest is offline
rautamiekka
Veteran Member
Join Date: Jan 2009
Location: Finland
Old 06-10-2011 , 09:52   Re: Mapchooser Extended!
Reply With Quote #250

Quote:
Originally Posted by ferest View Post
Here is what I got!
[...]
That code is unredable without indentation: use the CODE block.
__________________
Links to posts I received Karma from:
Big thanks to all who gave Karma

Last edited by rautamiekka; 06-10-2011 at 09:52. Reason: 'unredable' -> "unreadable"
rautamiekka is offline
Send a message via ICQ to rautamiekka Send a message via AIM to rautamiekka Send a message via MSN to rautamiekka Send a message via Yahoo to rautamiekka Send a message via Skype™ to rautamiekka
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 00:21.


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