AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Request plugin /spec , /ct , /t (https://forums.alliedmods.net/showthread.php?t=321593)

Alexande 02-18-2020 09:01

Request plugin /spec , /ct , /t
 
Hi guys , I need the plugin /spec , /ct , /t , but the commands can be used just by the admins.
You can use that commands just if your at least helper , just if you have at least the flags bceij

alferd 02-18-2020 09:35

Re: Request plugin /spec , /ct , /t
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Slash Command"
#define VERSION "1.0"
#define AUTHOR "AlferD"

#define ADMINLEVEL ADMIN_CVAR

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /spec","spec",ADMINLEVEL);
    
register_clcmd("say /ct""ct",ADMINLEVEL);
    
register_clcmd("say /t","t",ADMINLEVEL);
}

public 
spec(idlevelcid)
{
    if(
cmd_access(id,levelcid1))
    {
    {    
         new 
players[32], pnumtempid
         get_players
(playerspnum)

         for( new 
ii<pnumi++ ) 
         {
         
tempid players[i]
         
user_kill(tempid)
         
cs_set_user_team(tempidCS_TEAM_SPECTATOR)
         }
       }
      }
}

public 
ct(idlevelcid)
{
    if(
cmd_access(id,levelcid1))
    {
    {    
         new 
players[32], pnumtempid
         get_players
(playerspnum)

         for( new 
ii<pnumi++ ) 
         {
         
tempid players[i]
         
user_kill(tempid)
         
cs_set_user_team(tempidCS_TEAM_CT)
         }
       }
      }
}

public 
t(idlevelcid)
{
    if(
cmd_access(id,levelcid1))
    {
    {    
         new 
players[32], pnumtempid
         get_players
(playerspnum)

         for( new 
ii<pnumi++ ) 
         {
         
tempid players[i]
         
user_kill(tempid)
         
cs_set_user_team(tempidCS_TEAM_T)
         }
       }
      }



Alexande 02-18-2020 15:32

Re: Request plugin /spec , /ct , /t
 
When I use anu of that 3 command it transfers all the player , not just me , please fix it

Napoleon_be 02-18-2020 16:46

Re: Request plugin /spec , /ct , /t
 
Untested

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "Transfer Team"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new const szCommands[][] =
{
    
"/spec",
    
"/ct",
    
"/t"
};

new 
CsTeams:iTeams[] =
{
    
CS_TEAM_SPECTATOR,
    
CS_TEAM_CT,
    
CS_TEAM_T
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say""HandleTeamChange");
}

public 
HandleTeamChange(id)
{
    if(
get_user_flags(id) & ADMIN_KICK)
    {
        new 
szArg[10];
        
read_argv(1szArgcharsmax(szArg));
        
        for(new 
isizeof(szCommands); i++)
        {
            if(
containi(szArgszCommands[i]))
            {
                
cs_set_user_team(idCsTeams:iTeams[i]);
            }
        }
    }



OciXCrom 02-18-2020 17:02

Re: Request plugin /spec , /ct , /t
 
https://amxx-bg.info/viewtopic.php?f=21&t=1114

Alexande 02-19-2020 02:31

Re: Request plugin /spec , /ct , /t
 
Thank you

brabus1120 07-10-2022 03:39

Re: Request plugin /spec , /ct , /t
 
i neeed this plugin but with no acces admin ,
i need for my server to for all player can change team , with no admin acess

OciXCrom 07-10-2022 07:23

Re: Request plugin /spec , /ct , /t
 
Quote:

Originally Posted by brabus1120 (Post 2783435)
i neeed this plugin but with no acces admin ,
i need for my server to for all player can change team , with no admin acess

Use my plugin and set gospec_spec_flag to "".


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

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