AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   5votes in 1 map? (https://forums.alliedmods.net/showthread.php?t=133923)

drakeris 07-30-2010 05:25

5votes in 1 map?
 
I was just wondering how to make so players could do /votect 5 times per map for example now map is de_dust2 and they use 5times /votect after the 5 times when they try writing /votect it gives them an error show that they exceeded map maximum and when it`s gona be de_dust they again could use /votect i know how to make a vote but how to make a vote that can be used 5 times per map and makes a voted player to become ct?

Gadzislaw007 07-30-2010 08:07

Re: 5votes in 1 map?
 
well this is easy way:

PHP Code:

///global
new check_value 0

/// init
client_cmd(id"say /votetc" "vote_menu")


///public
public vote_menu(id)
{
 if (
check_value 5/// check if map was extended already 5 times
   
{
      
client_print(0print_chat"You can't extend this mapy anymore!!!!! FFFFFUUUU!")
      return 
PLUGIN_HANDLED
   
}
 else 
/// if it wasn't
   
{
     new 
klasa_menu menu_create("Extend Map""extend")
     
show menu bla bla
   
}

}

extend(/// whatever)   /// check if it was already extended
{
check_value check_value /// count which time it is extended

//// extend map code




drakeris 07-31-2010 01:33

Re: 5votes in 1 map?
 
this is for extending a map not for voting for a transfer player?

Gadzislaw007 07-31-2010 05:57

Re: 5votes in 1 map?
 
I just made a function which will block voting, if it sucessed already 5 times. You just have to attach it to correct vote function, you said you can write vote plugin, so just attach my script to it.

lucas_7_94 07-31-2010 06:06

Re: 5votes in 1 map?
 
client_cmd(id, "say /votetc" "vote_menu")

=>

register_clcmd or concmd


All times are GMT -4. The time now is 00:09.

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