Raised This Month: $ Target: $400
 0% 

Deagles' Map Management 3.23


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
whoville sheriff
Junior Member
Join Date: May 2007
Old 08-28-2007 , 22:54   Re: Deagles Map Management 2.47
Reply With Quote #11

Very easy to add my cvar to catch nominations. I'm just posting the code used. Here you go:
//first place to add
public say_nextmap(id){
new timeleft = get_timeleft()
new time2=timeleft-timeleft%60
new minutesleft=floatround(float(time2)/60.0)
new mapname[32]
get_mapname(mapname,31)
new smap[32]
get_cvar_string("amx_nextmap",smap,31)
if(minutesleft>=2&&!mselected) {
if(get_cvar_num("nominationsAllowed") == 1){
client_print(0,print_chat,"A Vote will occur in %d %s Say ^"nominations^" for a list of nominations.",(minutesleft==3||minutesleft==2 )?timeleft-100:minutesleft-2,(minutesleft==3||minutesleft==2)?"sec.":"mi n.")
}
}//this is continued


//this is the next place
public listnominations(id)
{
if(get_cvar_num("nominationsAllowed") == 1){
new a=0,string3[512],string1[128]
if(a<nmaps_num)
{
//show_hudmessage(id,"The following maps have been nominated for the next map vote:")
add(string3,511,"Maps that have been nominated for the next map vote:")
}
while(a<nmaps_num)
{
new name1[16]
get_user_name(whonmaps_num[a], name1, 25)
//set_hudmessage(255,0,0, 0.12, 0.3+0.08*float(a), 0, 15.0, 15.04, 1.5, 3.75, 2+a)
//show_hudmessage(id,"%s by: %s",nmaps[a],name1)
format(string1,128,"^n%s by: %s",nmaps[a],name1)
add(string3,511,string1,100)
a++
}
hudtext16(string3,random_num(0,222),random_nu m(0,111),random_num(111,222),300,10,random_nu m(6,,15,id)
}
}

//next spot
public HandleSay(id){
new chat[256]
read_args(chat, 256)
new saymap[256]
saymap=chat
remove_quotes(saymap)
new saymap2[28]
read_args(saymap2,2
remove_quotes(saymap2)
new chat2[32]
format(chat2,31,"cs_%s",saymap2)
if(containi(chat,"lastmapsplayed") != -1){
client_print(id,print_center,"The last maps played are now listed in your console")
show_lastmapsplayed(id)
}
if(containi(chat, "<")!=-1||containi(chat, "?")!=-1||containi(chat, ">")!=-1||containi(chat, "*")!=-1||containi(chat, "&")!=-1||containi(chat, ".")!=-1)
{
return PLUGIN_CONTINUE
}
if(containi(chat, "nominations") != -1)
{
if(get_cvar_num("nominationsAllowed") == 0){
client_print(id,print_chat,"Nominations are not currently allowed, maps will be chosen randomly")
return PLUGIN_HANDLED
}
if(mselected)
client_print(id,print_chat, "Vote in progress....")
else
if(nmaps_num==0)
client_print(id,print_chat, "No maps have been nominated so far, type nominate map_name to nominate a map")
else
listnominations(id)
}
else

//only 2 more to go lol
public handle_nominate(id,map[])
{
if(get_cvar_num("nominationsAllowed") == 0){
client_print(id,print_chat,"Nominations are not currently allowed")
return PLUGIN_HANDLED
}

//last place
plugin_init(){
register_cvar("nominationsAllowed","1")}

Last edited by whoville sheriff; 08-28-2007 at 22:57.
whoville sheriff is offline
 



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 12:38.


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