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

[REQ] Admin started votes for NEXTMAP


Post New Thread Reply   
 
Thread Tools Display Modes
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 08-25-2008 , 16:50   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #21

Yeah, anyone can nominate a map ... is that somehow bad? I mean, if you don't want that, you can easily override it so only admins can, but I don't see why you wouldn't want others to nominate.

As for the menu stuff, I don't know how easy it is or isn't in other mods. I've always been a command kind of guy. I find menus too limiting.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
spacedkadet
Member
Join Date: May 2008
Old 08-25-2008 , 16:54   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #22

Simply becasue it's a differant function to the one we are requesting ;)

Funny thing is i have seen it requested by several others and had plenty of people saying its already here when it isn't.

All we want is to be able to pick a few maps for players to vote on as the next map. It's that simple, no random maps, no regular players adding maps, just a plain and simple maps of the admins choice.

Like i have said till im blue in the face, every other admin tool does it out the box with no messing around. Excpet for sm which doesnt do it at all
Oh and still cant get the custom votes way to work correctly. Hopefully with chundo's new up-coming update it will be ok, we shall see.

But yeah i dont want nominate plugin on the server nor do the other admins of our dods servers.

Ty anyway

Lee.
spacedkadet is offline
WinterPhoenix
Junior Member
Join Date: Mar 2009
Old 03-19-2009 , 22:09   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #23

Sorry to bump this old thread, but I find myself in the exact same position as the OP. I love the functionality of votemap, but wish I could have it set the sm_nextmap cvar instead of instantly changing. I've looked through the source 10 times and can't even find the code that actually changes the map (or returns the winning vote, annoyingly). I've read this thread the entire way through (and the other threads that had been linked to) and still can't find the answer I'm looking for.

tl;dr - Is there a way to make votemap not change until the end of the map?
WinterPhoenix is offline
your mom
Senior Member
Join Date: Jul 2008
Old 04-20-2009 , 15:49   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #24

I bump this also! I would love to be able to have my admins select from a list of maps & have it change to that level when the current map ends. Please someone put this in the works.
your mom is offline
Sillium
AlliedModders Donor
Join Date: Sep 2008
Location: Germany
Old 04-21-2009 , 01:15   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #25

To simply set the nextmap without vote read the thread again ;-)

http://forums.alliedmods.net/showpos...2&postcount=10

Since I'm currently at work I can't access all SM Pages but browsing through the code of mapchooser.sp my best guess is to take a look at Timer_ChangeMap and there take a look at ForceChangeLevel(map, "Map Vote"); This looks like it is changing the map. What you would have to do is to change it so it changes the CVAR sm_nextmap.

But if you do this you will loose the "normal" vote map functionality
__________________
brb, dishes have developed their own language and are talking to the garbage about overthrowing me... i must correct this

www.unterwasserpyromanen.de
Sillium is offline
WinterPhoenix
Junior Member
Join Date: Mar 2009
Old 05-04-2009 , 13:10   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #26

Sillium - I took at a look at the code the night you posted that but still felt intimidated by it. Being new to SM scripting, I think implementing this might be well above my capabilities. Thanks for the help though.

Modmins - should I post a request for this modification in the request forum or should we continue the discussion in this thread?
WinterPhoenix is offline
Sillium
AlliedModders Donor
Join Date: Sep 2008
Location: Germany
Old 05-05-2009 , 01:09   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #27

If I still remember it when I come back from work I'll take a look at it :-) But don't expect to much.

edit: How do you initiate the vote? Looking at the code there seems to be more than one possibility to change the map and a few of them will only change the nextmap and not change the map immediately
__________________
brb, dishes have developed their own language and are talking to the garbage about overthrowing me... i must correct this

www.unterwasserpyromanen.de

Last edited by Sillium; 05-05-2009 at 03:57.
Sillium is offline
WinterPhoenix
Junior Member
Join Date: Mar 2009
Old 05-06-2009 , 23:08   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #28

Quote:
Originally Posted by Sillium View Post
If I still remember it when I come back from work I'll take a look at it :-) But don't expect to much.

edit: How do you initiate the vote? Looking at the code there seems to be more than one possibility to change the map and a few of them will only change the nextmap and not change the map immediately
The manner that I'm explicitly referring to is by using admin panel and then going: voting commands -> map vote -> [choosing 1-5 maps for players to vote on] -> initiate vote

but I believe that it's equivalent to the sm_vote command.
WinterPhoenix is offline
Sillium
AlliedModders Donor
Join Date: Sep 2008
Location: Germany
Old 05-07-2009 , 01:19   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #29

you mean sm_votemap I guess :-)

Ok so try to change the code in basevotes.sp:

Code:
public Action:Timer_ChangeMap(Handle:timer, Handle:dp)
{
    decl String:mapname[65];
    
    ResetPack(dp);
    ReadPackString(dp, mapname, sizeof(mapname));
    
    //ForceChangeLevel(mapname, "sm_votemap Result");
    SetNextMap(mapname);
    
    return Plugin_Stop;
}
Remove the ForceChangeLevel and add the SetNextMap. After a successful vote it should not change the map immediately but set the nextmap of no other plugin is going to change the nextmap later in the game.
I also attached the changed Version.
Attached Files
File Type: sp Get Plugin or Get Source (basevotes.sp - 92 views - 11.9 KB)
__________________
brb, dishes have developed their own language and are talking to the garbage about overthrowing me... i must correct this

www.unterwasserpyromanen.de
Sillium is offline
WinterPhoenix
Junior Member
Join Date: Mar 2009
Old 05-07-2009 , 07:44   Re: [REQ] Admin started votes for NEXTMAP
Reply With Quote #30

Quote:
Originally Posted by Sillium View Post
you mean sm_votemap I guess :-)

Ok so try to change the code in basevotes.sp:

Code:
public Action:Timer_ChangeMap(Handle:timer, Handle:dp)
{
    decl String:mapname[65];
    
    ResetPack(dp);
    ReadPackString(dp, mapname, sizeof(mapname));
    
    //ForceChangeLevel(mapname, "sm_votemap Result");
    SetNextMap(mapname);
    
    return Plugin_Stop;
}
Remove the ForceChangeLevel and add the SetNextMap. After a successful vote it should not change the map immediately but set the nextmap of no other plugin is going to change the nextmap later in the game.
I also attached the changed Version.
Wow, thanks Silium. I had seen that function but assumed it was called by more than sm_votemap, so I didn't want to screw with it.

Now here's a super awesome bonus question for you - would it be possible to add the new sm_votemap functionality to a different admin command? For example, keep the current functionality of sm_votemap to use in case an immediate map switch is desired and have another command to wait until changing it? Extra extra bonus point if you know how to add the second command to admin panel

Don't waste time if it will take you a while, though. If people want the map changed immediately, an admin can always manually change map to the what was voted.

Thanks again for all your help!
WinterPhoenix 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 10:21.


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