Raised This Month: $433 Target: $400
 108% 

Request plugin /spec , /ct , /t


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexande
Member
Join Date: Feb 2020
Old 02-18-2020 , 09:01   Request plugin /spec , /ct , /t
Reply With Quote #1

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
Alexande is offline
alferd
Senior Member
Join Date: Dec 2019
Old 02-18-2020 , 09:35   Re: Request plugin /spec , /ct , /t
Reply With Quote #2

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)
         }
       }
      }

alferd is offline
Alexande
Member
Join Date: Feb 2020
Old 02-18-2020 , 15:32   Re: Request plugin /spec , /ct , /t
Reply With Quote #3

When I use anu of that 3 command it transfers all the player , not just me , please fix it
Alexande is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-18-2020 , 16:46   Re: Request plugin /spec , /ct , /t
Reply With Quote #4

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]);
            }
        }
    }

__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-18-2020 , 17:02   Re: Request plugin /spec , /ct , /t
Reply With Quote #5

https://amxx-bg.info/viewtopic.php?f=21&t=1114
__________________

Last edited by OciXCrom; 02-18-2020 at 17:42.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Alexande
Member
Join Date: Feb 2020
Old 02-19-2020 , 02:31   Re: Request plugin /spec , /ct , /t
Reply With Quote #6

Thank you
Alexande is offline
Reply


Thread Tools
Display Modes

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:48.


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