Raised This Month: $ Target: $400
 0% 

easy mapvote..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiThoJu
Junior Member
Join Date: Aug 2004
Old 09-03-2004 , 22:36   easy mapvote..
Reply With Quote #1

hi
im looking for a small plugin which allows any players to start mapvotes with this command or similar: amx_vote_map <mapname>
it would be the same like the adminmod vote plugin and thats what im looking for. i know there are some mapvote plugins but that is not the thing i need, i just need an easy and simple vote plugin like described here. i would also use adminmod if i could but i tested it and it didnt work with amxx. plz help me
NiThoJu is offline
Send a message via AIM to NiThoJu Send a message via MSN to NiThoJu Send a message via Yahoo to NiThoJu
Votorx
Senior Member
Join Date: Jun 2004
Old 09-04-2004 , 00:00  
Reply With Quote #2

Code:
register_concmd("amx_votemap","cmdVoteMap",ADMIN_VOTE,"<map> [map] [map] [map]")

Search for this line of code in adminvote.sma and change it to

Code:
register_concmd("amx_votemap","cmdVoteMap",0,"<map> [map] [map] [map]")
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
NiThoJu
Junior Member
Join Date: Aug 2004
Old 09-04-2004 , 14:57  
Reply With Quote #3

mhh it doesnt work it says "you do not have access to this command". besides i dont like the amxx vote plugin anyway because in most cases it doesnt change the map even if the vote was successful and although "yes" for accepting the result was pressed, it says "result refused"..
is there a way to transfer this to amxx ?

Quote:
/* admin_vote_map <map> */
public admin_vote_map(HLCommand,HLData,HLUserName,Us erIndex) {
new Command[MAX_COMMAND_LENGTH];
new Data[MAX_DATA_LENGTH];
new Text[MAX_TEXT_LENGTH];
new User[MAX_NAME_LENGTH];

if (vote_allowed()!=1) {
selfmessage( "Vote not allowed at this time.");
return PLUGIN_HANDLED;
}

convert_string(HLCommand,Command,MAX_COMMAND_ LENGTH);
convert_string(HLData,Data,MAX_DATA_LENGTH);
convert_string(HLUserName,User,MAX_NAME_LENGT H);
if (valid_map(Data) == 1) {
snprintf(Text, MAX_TEXT_LENGTH, "Change map to %s?", Data);
log(Text);
if (vote(Text,"Yes","No","HandleMapVote",Data)) {
g_VoteInProgress = 1;
g_AbortVote=0;
}

} else {
snprintf(Text, MAX_TEXT_LENGTH, "You cannot vote for map %s on this server",Data);
selfmessage(Text);
}
return PLUGIN_HANDLED;
}

/* Handle a map vote's results. */
public HandleMapVote(WinningOption,HLMap,VoteCount,U serCount) {
new strNumber[MAX_NUMBER_LENGTH];
new Text[MAX_TEXT_LENGTH];
new VoteMap[MAX_DATA_LENGTH];
convert_string(HLMap,VoteMap,MAX_DATA_LENGTH) ;
g_VoteInProgress = 0;

if (WinningOption == 1) {
new Ratio = getvar("map_ratio");
if (VoteCount >= Ratio*UserCount/100) {
if (g_AbortVote) {
say("Map vote was aborted by an admin");
} else {
set_timer("VoteChangeMap",10,1,VoteMap);
}
} else {
numtostr(Ratio*UserCount/100,strNumber);
snprintf(Text, MAX_TEXT_LENGTH, "Map vote succeeded, but not enough votes for change (needed %s)", strNumber);
say(Text);
}
} else {
say("Map vote failed.");
}
}

/* Actually kick the user, unless aborted. */
public VoteChangeMap(Timer,Repeat,HLUserName,HLParam ) {
new Text[MAX_TEXT_LENGTH];
new VoteMap[MAX_DATA_LENGTH];
convert_string(HLParam,VoteMap,MAX_DATA_LENGT H);

if (g_AbortVote) {
say("Map vote aborted by an admin");
}
else {
snprintf(Text, MAX_TEXT_LENGTH, "Changing map to %s due to vote.", VoteMap);
say(Text);
changelevel(VoteMap, 4);
}
}
that would be nice if someone could add this command to amxx for me
NiThoJu is offline
Send a message via AIM to NiThoJu Send a message via MSN to NiThoJu Send a message via Yahoo to NiThoJu
Rirre
Veteran Member
Join Date: Nov 2006
Old 01-25-2008 , 13:57   Re: easy mapvote..
Reply With Quote #4

really love AdminMod's Votemap plugin too so I request this converted to AMXX.
Same text/style and only white = Perfect plugin.

Last edited by Rirre; 03-05-2008 at 17:35.
Rirre is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 03-05-2008 , 17:36   Re: easy mapvote..
Reply With Quote #5

bump
Rirre is offline
Wixo
Junior Member
Join Date: Dec 2007
Old 03-14-2008 , 18:48   Re: easy mapvote..
Reply With Quote #6

bUMP? my nick ! :S
Wixo is offline
Insanity` Wicked
Member
Join Date: Mar 2008
Old 03-15-2008 , 12:19   Re: easy mapvote..
Reply With Quote #7

there is something for this already...
rock the vote....
its deagles map manager
Insanity` Wicked 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 09:57.


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