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

[Req] a captian plugins for match


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-12-2017 , 13:10   [Req] a captian plugins for match
Reply With Quote #1

i want a plugin which is on saying command
"say /allspec" by this command every one should bbe transfers on spec and locks team.[so player cant join any team] till captian chooses.
amx_captian "team-t" "team-ct" or say /captian team-t team-ct
captians should be respawned to their respective team and there should b a knifematch between them and the knife round winner will choose plyer first and a menu will come in captians screen for choosing players on their team and when captian chooses a player he should b respawned on his team side.
and unlocks team.
Its little compilcated i think but try to give it.
__________________

Last edited by Sanjay Singh; 02-12-2017 at 13:14.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-26-2017 , 21:18   Re: [Req] a captian plugins for match
Reply With Quote #2

Come on can any make this?
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
rjsandy11
Member
Join Date: Oct 2016
Old 02-27-2017 , 00:27   Re: [Req] a captian plugins for match
Reply With Quote #3

bump...
rjsandy11 is offline
AkkYrOcK
Junior Member
Join Date: Aug 2016
Location: Streat
Old 03-15-2017 , 07:47   Re: [Req] a captian plugins for match
Reply With Quote #4

Try it untested

PHP Code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define TASK_MENUCLOSE 9001
#define TASK_PLAYERSLIST 9002

#define MinPlayers 10

new const Prefix[] = "[Captain]";

new 
RandomPlayer1;
new 
RandomPlayer2;

new 
bool:CaptainSort;

public 
plugin_init()
{
    
register_plugin("Captain Sorting""1.0""kramesa");
    
    
register_clcmd("say /capsort""StartCaptain");
    
    
register_clcmd("chooseteam""Block");
    
register_clcmd("jointeam""Block");
}

public 
StartCaptain(id)
{
    if(
is_user_admin(id))
    {
        if(
CaptainSort == true)
        {
            
client_print(idprint_chat"%s Captain Sort already running."Prefix);
            return 
PLUGIN_HANDLED;
        }
        
Captain();
        return 
PLUGIN_HANDLED;
    }
    
client_print(idprint_chat"%s Only admins have access to this command."Prefix);
    return 
PLUGIN_HANDLED;
}

public 
Block(id)
{
    if(
CaptainSort == true)
    {
        
client_print(idprint_chat"%s Captain Sort is running."Prefix);
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_putinserver(id
{
    if(!
is_user_connected(RandomPlayer1) && CaptainSort && get_user_flags(id) & ADMIN_KICK)
    {
        
RandomPlayer1 id;
        
        new 
First_Captain[35];
        
get_user_name(RandomPlayer1First_Captaincharsmax(First_Captain));
        
        
client_print(0print_chat"%s The new Captain of CTs is: %s"PrefixFirst_Captain);
        
set_cvar_num("sv_restartround"1);
    }
    if(!
is_user_connected(RandomPlayer2) && CaptainSort && get_user_flags(id) & ADMIN_KICK)
    {
        
RandomPlayer2 id;
        
        new 
Second_Captain[35];
        
get_user_name(RandomPlayer2Second_Captaincharsmax(Second_Captain));
        
        
client_print(0print_chat"%s The new Captain of Ts is: %s"PrefixSecond_Captain);
        
set_cvar_num("sv_restartround"1)
    }
}

public 
Captain()
{
    new 
iPlayers[32], iNum;
    
get_players(iPlayersiNum"ch");
    
    if(
iNum MinPlayers)
    {
        
client_print(0print_chat"%s Need have more %d players to start Captain Sort."Prefix, (iNum MinPlayers));
        return 
PLUGIN_HANDLED;
    }
    for(new 
iiNumi++)
    {
        
user_silentkill(iPlayers[i]);
        
cs_set_user_team(iPlayers[i], 3);
    }
    if(
get_user_flags(iPlayers[iNum]) & ADMIN_KICK) {
        
RandomPlayer1 iPlayers[random(iNum)];
        
RandomPlayer2 iPlayers[random(iNum)];
    }
    
    while(
RandomPlayer1 == RandomPlayer2)
    {
        
RandomPlayer2 iPlayers[random(iNum)];
    }
    
cs_set_user_team(RandomPlayer1CS_TEAM_CT);
    
cs_set_user_team(RandomPlayer2CS_TEAM_T);
    
    new 
First_Captain[35], Second_Captain[35];
    
    
get_user_name(RandomPlayer1First_Captaincharsmax(First_Captain));
    
get_user_name(RandomPlayer2Second_Captaincharsmax(Second_Captain));
    
    
client_print(0print_chat"%s The Captain's are: %s (TRs) and %s (CTs)."PrefixFirst_CaptainSecond_Captain);
    
client_print(0print_chat"%s If no player is selected in 10 seconds, a player will be chosen random."Prefix);
    
    
set_cvar_num("sv_restartround"1)
    
    new 
First random(2)
    
    
set_task(1.5"captain_menu"First RandomPlayer1 RandomPlayer2);
    
set_task(0.2"PlayersList"TASK_PLAYERSLIST__"b");
    
    
CaptainSort true
    
return PLUGIN_CONTINUE
}

public 
captain_menu(id)
{
    new 
menu menu_create("Select a Player:""captainmenu_handler")
    
    
set_task(11.5"menu_task"id TASK_MENUCLOSE);
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];
    
    
get_players(playerspnum"ch")
    
    if(
pnum == 0)
    {
        
remove_task(id+TASK_MENUCLOSE)
        
remove_task(TASK_PLAYERSLIST)
        
CaptainSort false
        
        client_print
(0print_chat"%s Closing Captain Sort. Missing players."Prefix);
        return 
PLUGIN_H 
__________________
AkkYrOcK is offline
hufuishu
Junior Member
Join Date: Aug 2016
Old 03-15-2017 , 10:55   Re: [Req] a captian plugins for match
Reply With Quote #5

Bad Plugin...it has many bugs and crashes the server too
hufuishu 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 20:09.


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