Pending Add new nominate feature (1 Viewer)

add !nominate shortcut


  • Total voters
    20
  • Poll closed .
Status
Not open for further replies.

Eagle_attack

Well-Known Member
Joined
Jul 31, 2024
Messages
381
Hello,
Just a Suggestion

In my opinion there should be a new feature for nominating

Nominating maps but not fully typing them out or have to look through them in the menu. ( Like Skial does )
This is extra useful in the panda deathrun, You have alot of maps.

example: !nominate may
( Mayanjungle has been nominated )

Clip how it works : https://medal.tv/games/tf2/clips/j1d3gnyJRi65Y4eK4?invite=cr-MSwxcVEsMjYxNDY1Mzg0LA

(Not sure someone has already suggested this )
 
  • Like
Reactions: Klub
Would be helpful for deathrun where they have 13 pages of maps.
But I dont think we need this for jailbreak. Unless adding it is just a matter of minutes.
 
  • Boring
Reactions: vinny
Would be helpful for deathrun where they have 13 pages of maps.
But I dont think we need this for jailbreak. Unless adding it is just a matter of minutes.
true and
, i meant for all panda Gamemodes
 
Prob should post the plugin that corresponds with this.

Without it this suggestion is admittedly just shootin in the dark.
 
  • Informative
Reactions: Eagle_attack
A lot of the previous servers I used to play on had this. Definitely a good qol feature
 
  • Like
Reactions: Eagle_attack
YES! PLEASE!
(im currently looking for plugins that support this)
 
  • Happy
Reactions: Eagle_attack
i was gonna say something about having to add jb_ or ba_ first but you dont have to do that so thats nice
 
  • Like
Reactions: Eagle_attack
https://github.com/atomic-penguin/t.../tf/addons/sourcemod/scripting/nominations.sp

i was thinking you could do something with line 129 in here somehow, i dont know how to correctly do a wildcard
with chatgpt i edited this code: (i dont know whether it works, i gave the code inside that link as a base and told it to edit it)

NOTE: this is only a small section of the entire code

public Action:Command_Addmap(client, args)
{
if (args < 1)
{
ReplyToCommand(client, "[SM] Usage: sm_nominate_addmap <mapname>");
return Plugin_Handled;
}

decl String:inputMap[64];
GetCmdArg(1, inputMap, sizeof(inputMap));

new matches = 0;
decl String:matchingMap[64];
new Handle:matchesArray = CreateArray(64);

// Loop through available maps in g_MapList to find matches
decl String:mapname[64];
for (new i = 0; i < GetArraySize(g_MapList); i++)
{
GetArrayString(g_MapList, i, mapname, sizeof(mapname));

// Check if the map contains the substring
if (FindString(mapname, inputMap, false) != -1)
{
PushArrayString(matchesArray, mapname);
matches++;

// If only one match, store it for later use
if (matches == 1)
{
StrCopy(matchingMap, sizeof(matchingMap), mapname);
}
}
}

// Handle cases based on number of matches
if (matches == 0)
{
ReplyToCommand(client, "[SM] No maps found containing \"%s\".", inputMap);
}
else if (matches == 1)
{
// Only one match, proceed to nominate
new NominateResult:result = NominateMap(matchingMap, true, 0);

if (result > Nominate_Replaced)
{
ReplyToCommand(client, "%t", "Map Already In Vote", matchingMap);
return Plugin_Handled;
}

SetTrieValue(g_mapTrie, matchingMap, MAPSTATUS_DISABLED | MAPSTATUS_EXCLUDE_NOMINATED);
ReplyToCommand(client, "[SM] %t", "Map Inserted", matchingMap);
LogAction(client, -1, "\"%L\" inserted map \"%s\".", client, matchingMap);
}
else
{
// Multiple matches found, alert user to be more specific
ReplyToCommand(client, "[SM] Multiple maps found containing \"%s\":", inputMap);

// List the matches
decl String:mapEntry[64];
for (new i = 0; i < GetArraySize(matchesArray); i++)
{
GetArrayString(matchesArray, i, mapEntry, sizeof(mapEntry));
ReplyToCommand(client, " - %s", mapEntry);
}

ReplyToCommand(client, "[SM] Please specify a more unique map name.");
}

CloseHandle(matchesArray);
return Plugin_Handled;
}
 
True, but i dont know how to or even where to find it ( i am sadly no developer ):thinking:
SourceMod plugs are found on either the SourceMod website or on Github.
with chatgpt i edited this code: (i dont know whether it works, i gave the code inside that link as a base and told it to edit it)

NOTE: this is only a small section of the entire code

public Action:Command_Addmap(client, args)
{
if (args < 1)
{
ReplyToCommand(client, "[SM] Usage: sm_nominate_addmap <mapname>");
return Plugin_Handled;
}

decl String:inputMap[64];
GetCmdArg(1, inputMap, sizeof(inputMap));

new matches = 0;
decl String:matchingMap[64];
new Handle:matchesArray = CreateArray(64);

// Loop through available maps in g_MapList to find matches
decl String:mapname[64];
for (new i = 0; i < GetArraySize(g_MapList); i++)
{
GetArrayString(g_MapList, i, mapname, sizeof(mapname));

// Check if the map contains the substring
if (FindString(mapname, inputMap, false) != -1)
{
PushArrayString(matchesArray, mapname);
matches++;

// If only one match, store it for later use
if (matches == 1)
{
StrCopy(matchingMap, sizeof(matchingMap), mapname);
}
}
}

// Handle cases based on number of matches
if (matches == 0)
{
ReplyToCommand(client, "[SM] No maps found containing \"%s\".", inputMap);
}
else if (matches == 1)
{
// Only one match, proceed to nominate
new NominateResult:result = NominateMap(matchingMap, true, 0);

if (result > Nominate_Replaced)
{
ReplyToCommand(client, "%t", "Map Already In Vote", matchingMap);
return Plugin_Handled;
}

SetTrieValue(g_mapTrie, matchingMap, MAPSTATUS_DISABLED | MAPSTATUS_EXCLUDE_NOMINATED);
ReplyToCommand(client, "[SM] %t", "Map Inserted", matchingMap);
LogAction(client, -1, "\"%L\" inserted map \"%s\".", client, matchingMap);
}
else
{
// Multiple matches found, alert user to be more specific
ReplyToCommand(client, "[SM] Multiple maps found containing \"%s\":", inputMap);

// List the matches
decl String:mapEntry[64];
for (new i = 0; i < GetArraySize(matchesArray); i++)
{
GetArrayString(matchesArray, i, mapEntry, sizeof(mapEntry));
ReplyToCommand(client, " - %s", mapEntry);
}

ReplyToCommand(client, "[SM] Please specify a more unique map name.");
}

CloseHandle(matchesArray);
return Plugin_Handled;
}
This is some random guy's repository containing a version of the RTV plugin from over 11 years ago. Useless.
 
  • Informative
Reactions: Eagle_attack
Hello,
Just a Suggestion

In my opinion there should be a new feature for nominating

Nominating maps but not fully typing them out or have to look through them in the menu. ( Like Skial does )
This is extra useful in the panda deathrun, You have alot of maps.

example: !nominate may
( Mayanjungle has been nominated )

Clip how it works : https://medal.tv/games/tf2/clips/j1d3gnyJRi65Y4eK4?invite=cr-MSwxcVEsMjYxNDY1Mzg0LA

(Not sure someone has already suggested this )
This is likely a custom plugin or modification to the RTV plugin.
 
I did some digging into the nominate plugin provided by SourceMod and it appears this is already how the stock SourceMod version of RTV works. SourcePawn contains a function in the standard library called FindMap() which tries multiple matching methods against the maps directory, including a Fuzzy Match.
 
Would be helpful for deathrun where they have 13 pages of maps.
But I dont think we need this for jailbreak. Unless adding it is just a matter of minutes.
Yeah not all servers need it, but what is the down side lol
 
  • Like
Reactions: Eagle_attack
For deathrun the downside would be that ppl who load in faster mostly wil nominate only bhop maps and we wil have that problem again where there is no variaty unless the nom cooldown gets extended
 
Status
Not open for further replies.

Users who are viewing this thread