amxsuper 5.2
#1
cuando activo este super serious no deja entrar a los idlan y entran solo steam alguien puede decirme


Código PHP:
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 
 * AMX Super - Serious Commands
 * Developed/Maintained by SuperCentral.co Scripting Team
 * Last Update: Jan 17 2014
 * 
 * Minimum Requirements
 * AMX Mod X 1.8.0
 * AMX Super 5.0
 * 
 * Credits
 * If I forgot you, let me know what you did and I will add you
 * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 
 * AMX Mod X script.
 *
 *   AMX Super - Serious Commands (amx_super-serious.sma)
 *   Copyright (C) 2013-2014 SuperCentral.co
 *
 *   This program is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU General Public License
 *   as published by the Free Software Foundation; either version 2
 *   of the License, or (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 *   In addition, as a special exception, the author gives permission to
 *   link the code of this program with the Half-Life Game Engine ("HL
 *   Engine") and Modified Game Libraries ("MODs") developed by Valve,
 *   L.L.C ("Valve"). You must obey the GNU General Public License in all
 *   respects for all of the code used other than the HL Engine and MODs
 *   from Valve. If you modify this file, you may extend this exception
 *   to your version of the file, but you are not obligated to do so. If
 *   you do not wish to do so, delete this exception statement from your
 *   version.
 * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * */

// Serious commands
/*
 *    Nr         COMMAND            CALLBACK FUNCTION    ADMIN LEVEL
 *            
 *    1)        amx_alltalk        Cmd_AllTalk            ADMIN_LEVEL_A
 *    2)        amx_extend        Cmd_Extend            ADMIN_LEVEL_A
 *    3)        amx_(un)gag        Cmd_(Un)Gag            ADMIN_LEVEL_A
 *    4)        amx_pass        Cmd_Pass            ADMIN_PASSWORD
 *    5)        amx_nopass        Cmd_NoPass            ADMIN_PASSWORD
 *    6)        admin voicecomm    Cmd_PlusAdminVoice    ADMIN_VOICE
 *                            Cmd_MinAdminVoice    ADMIN_VOICE
 *    7)        amx_transfer    Cmd_Transfer        ADMIN_LEVEL_D
 *     8)        amx_swap        Cmd_Swap            ADMIN_LEVEL_D
 *    9)        amx_teamswap    Cmd_TeamSwap        ADMIN_LEVEL_D
 *    10)        amx_lock        Cmd_Lock            ADMIN_LEVEL_D
 *    11)        amx_unlock        Cmd_Unlock            ADMIN_LEVEL_D
 *    12)        amx_badaim        Cmd_BadAim            ADMIN_LEVEL_D
 *    13)        amx_exec        Cmd_Exec            ADMIN_BAN
 *    14a)    amx_restart        Cmd_Restart            ADMIN_BAN
 *    14b)    amx_shutdown    Cmd_Restart            ADMIN_RCON
 *    15)        say /gravity    Cmd_Gravity                /
 *    16)        say /alltalk    Cmd_Alltalk                /
 *    17)        say /spec        Cmd_Spec                    /
 *    18)        say /unspec        Cmd_UnSpec                /
 *    19)        say /admin(s)    Cmd_Admins                /
 *    20)        say /fixsound    Cmd_FixSound                /
 *    21)            /                /                    /            (Dead chat)
*/
/*********************
*                     *
* Customizable stuff *
*                     * 
*********************/

/*** Admin levels ***/
#define ADMIN_VOICE            ADMIN_RESERVATION        // admin voicecomm
#define ADMIN_CHECK         ADMIN_KICK                 // say /admin(s)


/*** Taskids ***/
// Change these numbers if other plugins interfere with them.
#define TASK_GAG             5446            // Taskid for gag. Change this number if it interferes with any other plugins.
#define TASKID_UNBADAIM        15542        // taskid. Change this number if it interfers with any other plugins


/*** amx_extend ***/
// #define MAPCYCLE                        // Uncomment this to use the mapcycle.txt file.
#define EXTENDMAX             9            // Maximum number of times a map may be extended by anyone.
#define EXTENDTIME             15            // Maximum amount of time any map can be extended at once.
#define MAX_MAPS             32            // Change this if you have more than 32 maps in mapcycle.


// say /admins chat color - green
new const COLOR[] = "^x04";

/*********************
*                     *
* End customisations *
*                     * 
*********************/


#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

#define SetPlayerBit(%1,%2)      (%1 |= (1<<(%2&31)))
#define ClearPlayerBit(%1,%2)    (%1 &= ~(1 <<(%2&31)))
#define CheckPlayerBit(%1,%2)    (%1 & (1<<(%2&31))) 


// amx extend
new g_iExtendLimit;

#if defined MAPCYCLE
    
new g_iMapsNum;
    new 
boolg_bCyclerFile;
#endif


//        amx_gag
#define SPEAK_NORMAL        0
#define SPEAK_MUTED            1        
#define SPEAK_ALL            2        
#define SPEAK_LISTENALL        4            

enum eGagFlags
{
    
NONE,
    
CHAT,
    
TEAM_CHAT,
    
VOICE,
};

new 
eGagFlagsg_GagFlags[33];
new 
g_iSpeak[33];
new 
g_szGagReason[33][50];


// amx_badaim
#define TERRO     0
#define COUNTER 1
#define AUTO    4
#define SPEC    5



// admin voicecomm
enum SPKSETTINGS
{
    
SPEAK_MUTED2,     // 0
    
SPEAK_NORMAL2,     // 1
    
SPEAK_ALL2,        // 2
    
JUNK,            // 3    
    
JUNK,            // 4
    
SPEAK_ADMIN        // 5
};

new 
SPKSETTINGSg_PlayerSpk[33]
new 
g_iAdminBit
new g_iVoiceMask[33]

// Team locker
new const Teamnames[6][] = 
{
    
"Terrorists",
    
"Counter-Terrorists",
    
"",
    
"",
    
"Auto",
    
"Spectator"
};

new 
boolg_bBlockJoin[6];


// amx_badaim
new boolg_bHasBadAim[33];


// amx_exec
new boolg_bAllowsAllCommands[33];
new 
g_szAlwaysBlockedCmds[][] = 
{
    
"alias",
    
"connect",
    
"retry",
    
"bind",
    
"unbind",
    
"unbindall",
    
"quit",
    
"restart",
    
"exit",
    
"exec",
    
"writecfg",
    
"ex_interp",
    
"removedemo",
    
"cl_",
    
"gl_",
    
"m_",
    
"r_",
    
"hud_",
    
"kill"
};

new 
g_szFilterStuffCmdBlockedCmds[][] = 
{
    
"setinfo",
    
"say",
    
"developer",
    
"timerefresh",
    
"rate",
    
"fps_max",
    
"speak_enabled",
    
"voice_enable",
    
"sensitivity",
    
"sys_ticrate",
    
"volume",
    
"mp3volume"
};


// amx shutdown
enum eShutDownModes
{
    
RESTART,
    
SHUTDOWN,
};

new const 
g_szShutdownNames[eShutDownModes][] = 
{
    
"restart",
    
"shut down"
};

new 
eShutDownModesg_ShutDownMode,
    
boolg_bIsShuttingDown false
;

// say /admin(s)
new g_iMsgSayText;


// say /(un)spec
new CsTeamsg_OldTeam[33];


// For show_activity / log_amx team messages.
enum eCmdTeam
{
    
ALL,
    
T,
    
CT
};

new const 
g_TeamNames[eCmdTeam][] = 

    
"all",
    
"terrorist"
    
"counter-terrorist" 
};


// Cvar pointers
new g_pAllTalk
new g_pTimeLimit
new g_pDefaultGagTime
new g_pGagSound
new g_pGagBlockNameChange
new g_pPassword
new g_pGravity
new g_pAllowSoundFix
new g_pAllowSpec
new g_pAllowPublicSpec
new g_pAdminCheck
new g_pContact    
new g_pBadAimBan
new g_pDeadChat


// misc
new g_iMaxPlayers;

public 
plugin_init()
{
    
register_plugin("Amx Super Serious""5.0.2""SuperCentral.co");
    
register_dictionary("amx_super.txt");
    
    
g_pAllTalk                 get_cvar_pointer("sv_alltalk");
    
g_pTimeLimit             get_cvar_pointer("mp_timelimit");
    
g_pPassword             get_cvar_pointer("sv_password")
    
g_pGravity                 get_cvar_pointer("sv_gravity");
    
g_pAllowSpec             get_cvar_pointer("allow_spectators");
    
g_pContact                 get_cvar_pointer("sv_contact");
    
    
g_pGagSound             register_cvar("amx_super_gagsound""1");
    
g_pGagBlockNameChange     register_cvar("amx_super_gag_block_namechange""1");
    
g_pDefaultGagTime         register_cvar("amx_super_gag_default_time""600.0");
    
g_pAllowSoundFix         register_cvar("amx_soundfix_pallow""1");
    
g_pAllowPublicSpec         register_cvar("allow_public_spec","1");
    
g_pAdminCheck             register_cvar("amx_admin_check""1");
    
g_pBadAimBan            register_cvar("amx_badaim_ban""0");
    
g_pDeadChat                register_cvar("amx_deadchat""1");
    
    
register_concmd("amx_alltalk",     "Cmd_AllTalk",     ADMIN_LEVEL_A"[1 = ON | 0 = OFF]");
    
register_concmd("amx_extend",     "Cmd_Extend",     ADMIN_LEVEL_A"<added time to extend> : ex. 5, if you want to extend it five more minutes.");
    
register_concmd("amx_gag",         "Cmd_Gag",         ADMIN_LEVEL_A"<nick, #userid or authid> <a|b|c> <time> - Flags: a = Normal Chat | b = Team Chat | c = Voicecomm");
    
register_concmd("amx_ungag",     "Cmd_Ungag",     ADMIN_LEVEL_A"<nick, #userid or authid>");
    
register_concmd("amx_pass",     "Cmd_Pass",     ADMIN_PASSWORD,"<password> - sets the server's password")
    
register_concmd("amx_nopass",     "Cmd_NoPass",     ADMIN_PASSWORD,"Removes the server's password")
    
register_concmd("amx_transfer""Cmd_Transfer"ADMIN_LEVEL_D"<nick, #userid or authid> <CT/T/Spec> Transfers that player to the specified team");
    
register_concmd("amx_swap",     "Cmd_Swap",     ADMIN_LEVEL_D"<nick, #userid or authid> <nick, #userid or authid> Swaps 2 players with eachother");
    
register_concmd("amx_teamswap""Cmd_TeamSwap"ADMIN_LEVEL_D"Swaps 2 teams with eachother");
    
register_concmd("amx_lock",     "Cmd_Lock",     ADMIN_LEVEL_D"<CT/T/Auto/Spec> - Locks selected team");
    
register_concmd("amx_unlock",    "Cmd_Unlock",    ADMIN_LEVEL_D"<CT/T/Auto/Spec> - Unlocks selected team");
    
register_concmd("amx_badaim",     "Cmd_BadAim",     ADMIN_LEVEL_D"<nick, #userid or authid> <On/off or length of time: 1|0|time> <Save?: 1|0>: Turn on/off bad aim on a player.");
    
register_concmd("amx_exec",     "Cmd_Exec",     ADMIN_BAN"<nick, #userid, authid or @team> <command>");
    
register_concmd("amx_restart",     "Cmd_Restart",     ADMIN_BAN,        "<seconds (1-20)> - Restarts the server in seconds");
    
register_concmd("amx_shutdown""Cmd_Restart",     ADMIN_RCON,    "<seconds (1-20)> - Shuts down the server in seconds");
    
    
register_clcmd("say /gravity""Cmd_Gravity");
    
register_clcmd("say /alltalk""Cmd_Alltalk");
    
register_clcmd("say /fixsound""Cmd_FixSound");
    
register_clcmd("say /spec""Cmd_Spec");
    
register_clcmd("say /unspec""Cmd_UnSpec");
    
register_clcmd("say /admin""Cmd_Admins");
    
register_clcmd("say /admins""Cmd_Admins");
    
    
// admin voicecomm
    
register_clcmd("+adminvoice",     "Cmd_PlusAdminVoice");        
    
register_clcmd("-adminvoice",     "Cmd_MinAdminVoice");        
    
register_event("VoiceMask",     "Event_VoiceMask""b");
    
register_forward(FM_Voice_SetClientListening"Fwd_SetClientListening");
    
    
// Dead chat
    
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1);
    
    
// amx_gag
    
register_clcmd("say""Cmd_Say");
    
register_clcmd("say_team""Cmd_Say");
    
    
// szTeam locker
    
register_menucmd(register_menuid("Team_Select"1), (1<<0)|(1<<1)|(1<<4)|(1<<5), "team_select");
    
register_concmd("jointeam""join_team");
    
    
// amx_badaim
    
register_event("DeathMsg""Event_DeathMsg""a""1>0");
    
register_forward(FM_PlayerPreThink"FwdPlayerPrethink");

    
// say /admin(s)
    
g_iMaxPlayers get_maxplayers();
    
g_iMsgSayText get_user_msgid("SayText");
        
    
// amx_extend
#if defined MAPCYCLE
    
new szMapName[35];
    
get_mapname(szMapNamecharsmax(szMapName));
    
    new 
iFile fopen("mapcycle.txt""rt");
    
    if(
iFile)
    {
        new 
szData[50];
        
        
g_bCyclerFile false;
        
        while(!
feof(iFile) && g_iMapsNum MAX_MAPS)
        {
            
fgets(iFileszDatacharsmax(szData));
            
trim(szData);
            
            if(!
szData[0] || szData[0] == ';' || (szData[0] == '/' && szData[1] == '/'))
                continue;
            
            if(
equali(szDataszMapName))
            {
                
g_bCyclerFile true;
                
                break;
            }
            
            
g_iMapsNum++;
        }
        
        
fclose(iFile);
    }
#endif
}


public 
plugin_cfg()
{
    new 
szInfo[2];
    
get_localinfo("amx_super_executed"szInfocharsmax(szInfo));
    
    if(
szInfo[0] != '1')
    {
        
set_localinfo("amx_super_executed""1");
        
        
server_cmd("exec addons/amxmodx/configs/amx_super.cfg");
        
server_exec();

        
set_task(5.0"TaskRemoveExecInfo");
    }
}


public 
TaskRemoveExecInfo()
    
set_localinfo("amx_super_executed""0");


/* client disconnects
 *-------------------
*/
public client_disconnect(id)
{
    
g_PlayerSpk[id] = SPEAK_NORMAL2;
    
ClearPlayerBit(g_iAdminBitid);
    
    
g_bHasBadAim[id] = false;
}

/* client_authorized
 *------------------
*/
public client_authorized(id

     if(
get_user_flags(id) & ADMIN_RESERVATION
        
SetPlayerBit(g_iAdminBitid);
        
    
check_aimvault(id);
    
    
// For amx_exec
    
if(!is_user_bot(id))
        
query_client_cvar(id"cl_filterstuffcmd""CallbackCvarQuery");
}


public 
CallbackCvarQuery(id, const szCvarName[], const szCvarValue[])
    
g_bAllowsAllCommands[id] = szCvarValue[0] == '0' true false;

/* Player Spawn
 *--------------
*/
public Fwd_PlayerSpawn_Post(id)
{
    
// Dead chat
    
if(is_user_alive(id) && g_iSpeak[id] != SPEAK_MUTED)
        
g_iSpeak[id] = SPEAK_NORMAL;
}
/* Player death
 *-------------
*/
public Event_DeathMsg()
{
    new 
iKiller read_data(1);
    new 
iVictim read_data(2);
    
    
// amx_badaim
    
if(g_bHasBadAim[iKiller/*&& g_AutoBan[iKiller] */&& iKiller != iVictim)
    {
        new 
szName[35];
        
get_user_name(iKillerszNamecharsmax(szName));
        
        if(
get_pcvar_num(g_pBadAimBan))
            
server_cmd("amx_ban #%i Got a kill with bad aim."get_user_userid(iKiller));
        
        
client_print(0print_chat"%L"LANG_PLAYER"AMX_SUPER_BADAIM_KILLED"szName);
    }
    
    
// Dead chat
    
if(get_pcvar_num(g_pDeadChat))
    {
        if(
g_iSpeak[iVictim] != SPEAK_MUTED)
            
g_iSpeak[iVictim] = SPEAK_LISTENALL;
            
        
client_print(iVictimprint_center"%L"LANG_PLAYER"AMX_SUPER_DEADCHAT_MESSAGE");
    }
    
}

/*    1)    amx_alltalk
 *-----------------
*/
public Cmd_AllTalk(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid1))
        return 
PLUGIN_HANDLED;
        
    if(
read_argc() < 2)
    {    
        
console_print(id"%L"id"AMX_SUPER_ALLTALK_STATUS"get_pcvar_num(g_pAllTalk));
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
szArg[5];
    
read_argv(1szArgcharsmax(szArg));
    
set_pcvar_num(g_pAllTalkstr_to_num(szArg));
    
    new 
szAdminName[35], szAdminAuthid[35];
    
get_user_name(idszAdminNamecharsmax(szAdminName));
    
get_user_authid(idszAdminAuthidcharsmax(szAdminAuthid));
    
    
console_print(id"%L"id"AMX_SUPER_ALLTALK_MSG"szArg);
        
    
show_activity_key("AMX_SUPER_ALLTALK_SET_CASE1""AMX_SUPER_ALLTALK_SET_CASE2"szAdminNameszArg);
    
log_amx("%L"LANG_SERVER"AMX_SUPER_ALLTALK_LOG"szAdminNameszAdminAuthidszArg);
    
    return 
PLUGIN_HANDLED;
}


/*    2)    amx_extend
 *----------------
*/
public Cmd_Extend(idiLeveliCid)
{    
    if(!
cmd_access(idiLeveliCid2))
        return 
PLUGIN_HANDLED;
        
#if defined MAPCYCLE
    
if(!g_bCyclerFile)
    {
        
client_print(idprint_chat"%L"id"AMX_SUPER_EXTEND_NOMAPCYCLE");
        
        return 
PLUGIN_HANDLED;
    }
#endif
    
    
new szArg[35];
    
read_argv(1szArgcharsmax(szArg));
    
    new 
szAdminName[35];
    
get_user_name(idszAdminNamecharsmax(szAdminName));
        
    if(
strlen(szArg))
    {
        if(
containi(szArg"-") != -1)
        {
            
client_print(id,print_chat,"%L"id"AMX_SUPER_EXTEND_BAD_NUMBER");
            
            return 
PLUGIN_HANDLED;
        }
        
        new 
iExtendTime str_to_num(szArg);
        
        if(
g_iExtendLimit++ >= EXTENDMAX)
        {
            
client_print(id,print_chat,"%L"id"AMX_SUPER_EXTEND_EXTENDMAX",EXTENDMAX);
            
            return 
PLUGIN_HANDLED;
        }
        
        if(
iExtendTime EXTENDTIME)
        {
            
client_print(id,print_chat,"%L"id"AMX_SUPER_EXTEND_EXTENDTIME",EXTENDTIME);
            
            
iExtendTime EXTENDTIME;
        }
        
        
set_pcvar_float(g_pTimeLimitget_pcvar_float(g_pTimeLimit) + iExtendTime);
        
        
show_activity_key("AMX_SUPER_EXTEND_SUCCESS_CASE1""AMX_SUPER_EXTEND_SUCCESS_CASE2"szAdminNameiExtendTime);
    }
    
    return 
PLUGIN_HANDLED;
}    


/*    3)    amx_gag    / amx_ungag
 *-------------
*/
public Cmd_Gag(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid1))
        return 
PLUGIN_HANDLED;
    
    new 
szTarget[35], szFlags[5], szTime[10];
    
read_argv(1szTargetcharsmax(szTarget));
    
read_argv(2szFlagscharsmax(szFlags));
    
read_argv(3szTimecharsmax(szTime));
    
    new 
iPlayer cmd_target(idszTargetCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF CMDTARGET_NO_BOTS);
    
    if(
iPlayer)
    {
        if (
g_GagFlags[iPlayer] != NONE)
        {
            new 
szName[35];
            
get_user_name(iPlayerszNamecharsmax(szName));
            
console_print(id"%L"id"AMX_SUPER_ALREADY_GAGGED"szName);
            
            return 
PLUGIN_HANDLED
        
}
        
        new 
FloatflGagTime;
        
        if(!
strlen(szFlags))
        {
            
copy(szFlagscharsmax(szFlags), "abc");
            
            
flGagTime get_pcvar_float(g_pDefaultGagTime);
        }
        
        else if(
isdigit(szFlags[0])
        && !
strlen(szTime)) // he forgot the flags
        
{
            
flGagTime str_to_float(szFlags) * 60;
            
            
copy(szFlagscharsmax(szFlags), "abc");
        }
        
        else if(
strlen(szFlags
        && 
strlen(szTime
        && 
isdigit(szTime[0])) {    // he entered all the args.
            
flGagTime floatstr(szTime) * 60;
        }
        
        new 
boolbReasonFound;
        if(
read_argc() == 4)
        {
            
read_argv(4g_szGagReason[iPlayer], 49);
            
            if(!
strlen(g_szGagReason[iPlayer]))
                
bReasonFound false;
            
            else
                
bReasonFound true;
        }
        
        
g_GagFlags[iPlayer] = eGagFlags:read_flags(szFlags);
        
        if(
g_GagFlags[iPlayer] & VOICE)
            
g_iSpeak[iPlayer] = SPEAK_MUTED;
        
        
set_task(flGagTime"TaskUngagPlayer"iPlayer TASK_GAG);
        
        new 
szShownFlags[50], iFlagCount;
        if(
g_GagFlags[iPlayer] & CHAT)
        {
            
copy(szShownFlagscharsmax(szShownFlags), "say");
            
            
iFlagCount++;
        }
        
        if(
g_GagFlags[iPlayer] & TEAM_CHAT)
        {
            if(
iFlagCount)
                
add(szShownFlagscharsmax(szShownFlags), " / say_team");
            
            else
                
copy(szShownFlagscharsmax(szShownFlags), "say_team");
            
            
iFlagCount++;
        }
        
        if(
g_GagFlags[iPlayer] & VOICE)
        {    
            if(
iFlagCount)
                
add(szShownFlagscharsmax(szShownFlags), " / voicecomm");
            
            else
                
copy(szShownFlagscharsmax(szShownFlags), "voicecomm");
        }
        
        new 
szAdminName[35], szAdminAuthid[35];
        
get_user_name(idszAdminNamecharsmax(szAdminName));
        
get_user_authid(idszAdminAuthidcharsmax(szAdminAuthid));
        
        new 
szPlayerName[35], szPlayerAuthid[35];
        
get_user_name(iPlayerszPlayerNamecharsmax(szPlayerName));
        
get_user_authid(iPlayerszPlayerAuthidcharsmax(szPlayerAuthid));
        
        if(
bReasonFound)
            
// These 2 keys do not exist in the language file.
            
show_activity_key("AMX_SUPER_GAG_PLAYER_REASON_CASE1""AMX_SUPER_GAG_PLAYER_REASON_CASE2"szAdminNameszPlayerNameflGagTimeszShownFlagsg_szGagReason[iPlayer]);
            
         else
            
show_activity_key("AMX_SUPER_GAG_PLAYER_CASE1""AMX_SUPER_GAG_PLAYER_CASE2"szAdminNameszPlayerNameflGagTimeszShownFlags);    
    }
    
    return 
PLUGIN_HANDLED;
}

public 
client_infochanged(id)
{
    if(
g_GagFlags[id] != NONE && get_pcvar_num(g_pGagBlockNameChange))
    {
        new 
szOldName[35], szNewName[35];
        
get_user_name(idszOldNamecharsmax(szOldName));
        
get_user_info(id"szName"szNewNamecharsmax(szNewName));
        
        if(!
equal(szOldNameszNewName))
        {
            
set_user_info(id"szName"szOldName);
            
            
client_print(idprint_chat"%L"id"AMX_SUPER_PLAYER_NAMELOCK");
        }
    }
}

public 
Cmd_Say(id)
{
    if(
g_GagFlags[id] == NONE)
        return 
PLUGIN_CONTINUE;
        
    new 
szCmd[5];
    
read_argv(0szCmdcharsmax(szCmd));
    
    if(((
g_GagFlags[id] & TEAM_CHAT) && szCmd[3] == '_') || ((g_GagFlags[id] & CHAT) && szCmd[3] != '_'))
    {
        if(
g_szGagReason[id][0])
            
client_print(idprint_chat"%L"id"AMX_SUPER_GAG_REASON"g_szGagReason[id]);
        
        else
            
client_print(idprint_chat"%L"id"AMX_SUPER_PLAYER_GAGGED");
        
        if(
get_pcvar_num(g_pGagSound))
            
client_cmd(id"spk ^"barney/youtalkmuch^"");
        
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
Cmd_Ungag(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid1))    
        return 
PLUGIN_HANDLED;
        
    new 
szTarget[35];
    
read_argv(1szTargetcharsmax(szTarget));
    
    new 
iPlayer cmd_target(idszTargetCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF CMDTARGET_NO_BOTS);
    
    if(
iPlayer)
    {
        new 
szPlayerName[35];
        
get_user_name(idszPlayerNamecharsmax(szPlayerName));
        
        if(
g_GagFlags[iPlayer] == NONE)
        {
            
console_print(id"%L"id"AMX_SUPER_NOT_GAGGED"szPlayerName);
            return 
PLUGIN_HANDLED;
        }
        
        
UngagPlayer(iPlayer);
        
        new 
szAdminName[35];
        
get_user_name(idszAdminNamecharsmax(szAdminName));
        
        new 
szAdminAuthid[35], szPlayerAuthid[35];
        
get_user_authid(idszAdminAuthidcharsmax(szAdminAuthid));
        
get_user_authid(iPlayerszPlayerAuthidcharsmax(szPlayerAuthid));
        
        
show_activity_key("AMX_SUPER_UNGAG_PLAYER_CASE1""AMX_SUPER_UNGAG_PLAYER_CASE2"szAdminNameszPlayerName);
        
log_amx("%L"LANG_SERVER"AMX_SUPER_UNGAG_PLAYER_LOG"szAdminNameszAdminAuthidszPlayerNameszPlayerAuthid);
    }
    
    return 
PLUGIN_HANDLED;
}

public 
TaskUngagPlayer(id)
{
    
id -= TASK_GAG;
    
    if(!
is_user_connected(id))
        return 
PLUGIN_HANDLED;
        
    
UngagPlayer(id);
    
    new 
szName[35];
    
get_user_name(idszNamecharsmax(szName));
    
    
client_print(0print_chat"%L"LANG_PLAYER"AMX_SUPER_GAG_END"szName);

    return 
PLUGIN_HANDLED;
}

UngagPlayer(id)
{
    if(
g_GagFlags[id] & VOICE)
    {
        if(
get_pcvar_num(g_pAllTalk))
            
g_iSpeak[id] = SPEAK_ALL;
        
        else
            
g_iSpeak[id] = SPEAK_NORMAL;
    }
    
    if(
task_exists(id TASK_GAG))
        
remove_task(id TASK_GAG);
        
    
g_GagFlags[id] = NONE;
}

/* 4)    amx_pass
 *--------------
*/
public Cmd_Pass(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid2))
        return 
PLUGIN_HANDLED
        
    
new szPassword[64]
    
    
read_argv(1szPassword63)
    
    new 
szAuthid[34]
    
get_user_authid(idszAuthid33)
    
    new 
szName[32]
    
get_user_name(idszName31)
    
    
show_activity_key("AMX_SUPER_PASSWORD_SET_CASE1""AMX_SUPER_PASSWORD_SET_CASE2"szName)
    
    
log_amx("%L"LANG_SERVER"AMX_SUPER_PASSWORD_SET_LOG",szNameszAuthidszPassword)
    
    
set_pcvar_string(g_pPasswordszPassword)
    
    return 
PLUGIN_HANDLED
}

/* 5)    amx_nopass
 *----------------
*/
public Cmd_NoPass(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid1))
        return 
PLUGIN_HANDLED
    
    
new szAuthid[34]
    
get_user_authid(idszAuthid33)
    
    new 
szName[32]
    
get_user_name(idszName31)
    
    
show_activity_key("AMX_SUPER_PASSWORD_REMOVE_CASE1""AMX_SUPER_PASSWORD_REMOVE_CASE2"szName)
    
    
log_amx("%L"LANG_SERVER"AMX_SUPER_PASSWORD_REMOVE_LOG",szNameszAuthid)
    
    
set_pcvar_string(g_pPassword"")
    
    return 
PLUGIN_HANDLED
}

/* 6)    admin voicecomm
 *---------------------
*/
public Cmd_PlusAdminVoice(id)
{
    if(!
CheckPlayerBit(g_iAdminBitid))
    {
        
client_print(idprint_chat"%L"id"AMX_SUPER_VOCOM_NO_ACCESS");
        
        return 
PLUGIN_HANDLED;
    }

    
client_cmd(id"+voicerecord");
    
g_PlayerSpk[id] = SPEAK_ADMIN;

    new 
szAdminName[35];
    
get_user_name(idszAdminNamecharsmax(szAdminName));

    new 
iPlayers[32], iPlayerNumiTempid;
    
get_players(iPlayersiPlayerNum"ch");
 
    for(new 
0iPlayerNumi++)
    {
        
iTempid iPlayers[i];
        
        if(
CheckPlayerBit(g_iAdminBitiTempid) && iTempid != id)
                
client_print(iTempidprint_chat"%L"iTempid"AMX_SUPER_VOCOM_SPEAKING1"szAdminName);
    }
    
    
client_print(idprint_chat"%L"id"AMX_SUPER_VOCOM_SPEAKING2"szAdminName);
    
    return 
PLUGIN_HANDLED;
}

public 
Cmd_MinAdminVoice(id
{
    if(
is_user_connected(id)) 
    { 
        
client_cmd(id,"-voicerecord");
        
        if(
g_PlayerSpk[id] == SPEAK_ADMIN
            
g_PlayerSpk[id] = SPEAK_NORMAL2;
    }
    
    return 
PLUGIN_HANDLED;
}

public 
Event_VoiceMask(id)
    
g_iVoiceMask[id] = read_data(2);
    
// Shared with amx gag.
public Fwd_SetClientListening(RecieverSenderlisten)
{    
    if(
Reciever == Sender)
        return 
FMRES_IGNORED;
    
    if(
g_PlayerSpk[Sender] == SPEAK_ADMIN
    {
        if(
CheckPlayerBit(g_iAdminBitReciever))
            
engfunc(EngFunc_SetClientListeningRecieverSenderSPEAK_NORMAL2);
            
        else
            
engfunc(EngFunc_SetClientListeningRecieverSenderSPEAK_MUTED2);

        return 
FMRES_SUPERCEDE;
    }
    
    else if(
g_iVoiceMask[Reciever] & << (Sender 1)) 
    {
        
engfunc(EngFunc_SetClientListeningRecieverSenderSPEAK_MUTED);
        
        
forward_return(FMV_CELLfalse);
    }
    
    switch(
g_iSpeak[Reciever])
    {    
        case 
SPEAK_MUTED:
        {
            
engfunc(EngFunc_SetClientListeningRecieverSender0);
            
forward_return(FMV_CELL0);
            
            return 
FMRES_SUPERCEDE;
        }
        
        case 
SPEAK_ALLSPEAK_LISTENALL:
        {
            
engfunc(EngFunc_SetClientListeningRecieverSender1);
            
forward_return(FMV_CELL1);
            
            return 
FMRES_SUPERCEDE;
        }
    }
        
    return 
FMRES_IGNORED;
}
    
/* 7)    amx_transfer
 *------------------
*/
public Cmd_Transfer(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid3))
        return 
PLUGIN_HANDLED;
    
    new 
szTarget[35], szTeam[5];
    
read_argv(1szTargetcharsmax(szTarget));
    
read_argv(2szTeamcharsmax(szTeam));
    
strtoupper(szTeam);
    
    new 
iTempid cmd_target(idszTarget2);
    
    if(!
iTempid)
        return 
PLUGIN_HANDLED;
    
    new 
szTeamName[35];
    new 
CsTeams:iCurrentTeam cs_get_user_team(iTempid)

    if(!
strlen(szTeam))
    {    
        
cs_set_user_team(iTempidiCurrentTeam == CS_TEAM_T CS_TEAM_CT CS_TEAM_T);
        
formatex(szTeamNamecharsmax(szTeamName), "%s"Teamnames[_:iCurrentTeam 1]);
    }
    
    else
    {
        new 
CsTeams:iArgTeam
        
switch(szTeam[0])
        {
            case 
'C'iArgTeam CS_TEAM_CT;
            case 
'T'iArgTeam CS_TEAM_T;
            case 
'S'iArgTeam CS_TEAM_SPECTATOR;
            default:
            {
                
console_print(id"%L"id"AMX_SUPER_TEAM_INVALID");
                return 
PLUGIN_HANDLED;
            }
        }
        
        if (
iArgTeam == iCurrentTeam)
        {
            
console_print(id"%L"id"AMX_SUPER_TRANSFER_PLAYER_ALREADY")
            return 
PLUGIN_HANDLED
        
}
        
        else
        {
            
/*
            if (iArgTeam == CS_TEAM_SPECTATOR)
                user_silentkill(iTempid)
                
            cs_set_user_team(iTempid, iArgTeam)
            
            if (iArgTeam != CS_TEAM_SPECTATOR)
                ExecuteHamB(Ham_CS_RoundRespawn, iTempid)
                
            */
            
cs_set_user_team(iTempidiArgTeam)
            
            if(
iArgTeam == CS_TEAM_SPECTATOR)
                
user_silentkill(iTempid);
                
            else
                
ExecuteHamB(Ham_CS_RoundRespawniTempid);

            
// using teamnames variable if szTeam != spec
            
formatex(szTeamNamecharsmax(szTeamName), "%s"iArgTeam == CS_TEAM_SPECTATOR "Spectator" Teamnames[_:iArgTeam 1])
        }
    }
    
    new 
szAdminName[35], szPlayerName[35];
    
get_user_name(idszAdminNamecharsmax(szAdminName));
    
get_user_name(iTempidszPlayerNamecharsmax(szPlayerName));
    
    new 
szAuthid[35];
    
get_user_authid(idszAuthidcharsmax(szAuthid));
    
    
show_activity_key("AMX_SUPER_TRANSFER_PLAYER_CASE1""AMX_SUPER_TRANSFER_PLAYER_CASE2"szAdminNameszPlayerNameszTeamName);

    
client_print(iTempidprint_chat"%L"iTempid"AMX_SUPER_TRANSFER_PLAYER_TEAM"szTeamName);

    
console_print(id"%L"id"AMX_SUPER_TRANSFER_PLAYER_CONSOLE"szAdminNameszTeamName);
    
log_amx("%L"LANG_SERVER"AMX_SUPER_TRANSFER_PLAYER_LOG"szAdminNameszAuthidszPlayerNameszTeamName);
    
    return 
PLUGIN_HANDLED;
}
    
/* 8)    amx_swap
 *--------------
*/
public Cmd_Swap(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid3))
        return 
PLUGIN_HANDLED;
        
    new 
szArg1[35], szArg2[35];
    
read_argv(1szArg1charsmax(szArg1));
    
read_argv(2szArg2charsmax(szArg2));
    
    new 
iTempid1 cmd_target(idszArg12);
    new 
iTempid2 cmd_target(idszArg22);
    
    if(!
iTempid1 || !iTempid2)
        return 
PLUGIN_HANDLED;
        
    new 
CsTeamsiTeam1 cs_get_user_team(iTempid1);
    new 
CsTeamsiTeam2 cs_get_user_team(iTempid2);
    
    if(
iTeam1 == iTeam2)
    {
        
client_print(idprint_console"%L"id"AMX_SUPER_TRANSFER_PLAYER_ERROR_CASE1");
        
        return 
PLUGIN_HANDLED;
    }
    
    if(
iTeam1 == CS_TEAM_UNASSIGNED || iTeam2 == CS_TEAM_UNASSIGNED)
    {
        
client_print(idprint_console"%L"id"AMX_SUPER_TRANSFER_PLAYER_ERROR_CASE2");
        
        return 
PLUGIN_HANDLED;
    }
    
    
cs_set_user_team(iTempid1iTeam2);
    
ExecuteHamB(Ham_CS_RoundRespawniTempid1);
    
    
cs_set_user_team(iTempid2iTeam1);
    
ExecuteHamB(Ham_CS_RoundRespawniTempid2);
    
    if(
iTeam1 == CS_TEAM_SPECTATOR)
        
user_silentkill(iTempid2);
    
    if(
iTeam2 == CS_TEAM_SPECTATOR)
        
user_silentkill(iTempid1);
    
    new 
szPlayerName1[35], szPlayerName2[35], szAdminName[35], szAuthid[35];
    
get_user_name(iTempid1szPlayerName1charsmax(szPlayerName1));
    
get_user_name(iTempid2szPlayerName2charsmax(szPlayerName2));
    
get_user_name(idszAdminNamecharsmax(szAdminName));
    
get_user_authid(idszAuthidcharsmax(szAuthid));
    
    
show_activity_key("AMX_SUPER_TRANSFER_SWAP_PLAYERS_SUCCESS_CASE1""AMX_SUPER_TRANSFER_SWAP_PLAYERS_SUCCESS_CASE2"szAdminNameszPlayerName1szPlayerName2);

    
client_print(iTempid1print_chat"%L"iTempid1"AMX_SUPER_TRANSFER_SWAP_PLAYERS_MESSAGE1"szPlayerName2);
    
client_print(iTempid2print_chat"%L"iTempid2"AMX_SUPER_TRANSFER_SWAP_PLAYERS_MESSAGE2"szPlayerName1);

    
client_print(idprint_console"%L"id"AMX_SUPER_TRANSFER_SWAP_PLAYERS_CONSOLE"szPlayerName1szPlayerName2);
    
    
log_amx("%L"LANG_PLAYER"AMX_SUPER_TRANSFER_SWAP_PLAYERS_LOG"szAdminNameszAuthidszPlayerName1szPlayerName2);
    
    return 
PLUGIN_HANDLED;
}

/* 9)    amx_teamswap
 *------------------
*/
public Cmd_TeamSwap(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid1))
        return 
PLUGIN_HANDLED;
        
    new 
iPlayers[32], iPlayerNumiTempidCsTeamsiTeam;
    
get_players(iPlayersiPlayerNum);
    
    for(new 
0iPlayerNumi++)
    {
        
iTempid iPlayers[i];
        
iTeam cs_get_user_team(iTempid);
        
        if(
CS_TEAM_UNASSIGNED iTeam CS_TEAM_SPECTATOR)
        {
            
cs_set_user_team(iTempidcs_get_user_team(iTempid) == CS_TEAM_T CS_TEAM_CT CS_TEAM_T);
            
ExecuteHamB(Ham_CS_RoundRespawniTempid);
        }
    }
    
    new 
szName[35], szAuthid[35];
    
get_user_name(idszNamecharsmax(szName));
    
get_user_authid(idszAuthidcharsmax(szAuthid));

    
show_activity_key("AMX_SUPER_TRANSFER_SWAP_TEAM_SUCCESS_CASE1""AMX_SUPER_TRANSFER_SWAP_TEAM_SUCCESS_CASE2"szName);

    
console_print(id,"%L"id"AMX_SUPER_TRANSFER_SWAP_TEAM_MESSAGE");
    
    
log_amx("%L"LANG_SERVER"AMX_SUPER_TRANSFER_SWAP_TEAM_LOG"szName,szAuthid);
    
    return 
PLUGIN_HANDLED;
}

/* 10)    amx_lock
 *--------------
*/
public Cmd_Lock(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid2))
        return 
PLUGIN_HANDLED;
    
    new 
szArg[7];
    
read_argv(1szArgcharsmax(szArg));
    
strtoupper(szArg);
    
    new 
iTeam;
    switch(
szArg[0])
    {
        case 
'T'iTeam TERRO;
        case 
'C'iTeam COUNTER;        
        case 
'A'iTeam AUTO;
        case 
'S'iTeam SPEC;
        default:
        {    
            
client_print(idprint_console"%L"id"AMX_SUPER_TEAM_INVALID");
            
            return 
PLUGIN_HANDLED;
        }    
    }
        
    
g_bBlockJoin[iTeam] = true;
    
    new 
szName[35], szAuthid[35];
    
get_user_name(idszNamecharsmax(szName));
    
get_user_authid(idszAuthidcharsmax(szAuthid));
    
    
show_activity_key("AMX_SUPER_TEAM_LOCK_CASE1""AMX_SUPER_TEAM_LOCK_CASE2"szNameTeamnames[iTeam]);

    
console_print(id"%L"id"AMX_SUPER_TEAM_LOCK_CONSOLE"Teamnames[iTeam]);
    
log_amx("%L"LANG_SERVER"AMX_SUPER_LOCK_TEAMS_LOG"szNameszAuthidTeamnames[iTeam]);

    return 
PLUGIN_HANDLED;
}

/* 11)    amx_unlock
 *----------------
*/
public Cmd_Unlock(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid2))
        return 
PLUGIN_HANDLED;
    
    new 
szArg[7], iTeam;
    
read_argv(1szArgcharsmax(szArg));
    
strtoupper(szArg);
    
    
// comments set by juann, since we use strtoupper we don't need to check for lower case chars
    
switch(szArg[0])
    {
        case 
'T'iTeam TERRO;
        case 
'C'iTeam COUNTER;
        case 
'A'iTeam AUTO;
        case 
'S'iTeam SPEC;
        default:
        {    
            
client_print(idprint_console"%L"id"AMX_SUPER_TEAM_INVALID");
            
            return 
PLUGIN_HANDLED;
        }    
    }
    
    
g_bBlockJoin[iTeam] = false;
    
    new 
szName[32], szAuthid[35];
    
get_user_name(idszNamecharsmax(szName));
    
get_user_authid(idszAuthidcharsmax(szAuthid));
    
    
show_activity_key("AMX_SUPER_TEAM_UNLOCK_CASE1""AMX_SUPER_TEAM_UNLOCK_CASE2"szNameTeamnames[iTeam]);
    
    
console_print(id"%L"id"AMX_SUPER_TEAM_UNLOCK_CONSOLE"Teamnames[iTeam]);
    
log_amx("%L"LANG_SERVER"AMX_SUPER_UNLOCK_TEAMS_LOG"szNameszAuthidTeamnames[iTeam]);

    return 
PLUGIN_HANDLED;
}

/* Team locker
 *------------
*/
public team_select(idkey

    if(
g_bBlockJoin[key])
    {
        
engclient_cmd(id"chooseteam");
        
        return 
PLUGIN_HANDLED;
    }         
    
    return 
PLUGIN_CONTINUE;


public 
join_team(id
{        
    new 
szArg[3];
    
read_argv(1szArgcharsmax(szArg));
    
    if(
g_bBlockJoin[str_to_num(szArg) - 1])
    {
        
engclient_cmd(id"chooseteam");
        
        return 
PLUGIN_HANDLED;
    } 

    return 
PLUGIN_CONTINUE
}

/* 12)    amx_badaim
 *----------------
*/
public Cmd_BadAim(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid3))
        return 
PLUGIN_HANDLED;
        
    new 
szTarget[35], szTime[10], szSave[2];
    
    
read_argv(1szTargetcharsmax(szTarget));
    
read_argv(2szTimecharsmax(szTime));
    
read_argv(3szSavecharsmax(szSave));
    
    if(!
strlen(szTime))
    {
        
console_print(id"%L"id"AMX_SUPER_BADAIM_CONSOLE");
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
iTime str_to_num(szTime);

    if(
iTime 0)
    {
        
console_print(id"%L"id"AMX_SUPER_BADAIM_BADTIME");
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
iTempid cmd_target(idszTarget2);

    if(!
iTempid)
        return 
PLUGIN_HANDLED;
            
    new 
szName[35];
    
get_user_name(iTempidszNamecharsmax(szName));
    
    switch(
iTime)
    {
        case 
0:
        {
            if(!
g_bHasBadAim[iTempid])
            {
                
console_print(id"%L"id"AMX_SUPER_BADAIM_NO_BADAIM"szName);
                
                return 
PLUGIN_HANDLED;
            }
            
            
g_bHasBadAim[iTempid] = false;
            
            
console_print(id"%L"id"AMX_SUPER_BADAIM_UNDO",szName);

            
set_aimvault(iTempid0);
        }
        
        case 
1:
        {
            if(
g_bHasBadAim[iTempid])
            {
                
console_print(id"%L"id"AMX_SUPER_BADAIM_CURRENT"szName);
                
                return 
PLUGIN_HANDLED;
            }
                        
            
g_bHasBadAim[iTempid] = true;
            
            
console_print(id"%L"id"AMX_SUPER_BADAIM_WORSE"szName);
        }
        
        default: 
// Timed
        
{
            if(
g_bHasBadAim[iTempid])
                
console_print(id"%L"id"AMX_SUPER_BADAIM_MESSAGE1",szNameiTime);
                
            else
                
console_print(id"%L"id"AMX_SUPER_BADAIM_MESSAGE2",szNameiTime);
                
            
g_bHasBadAim[iTempid] = true;
            
            new 
iTaskData[3];
            
iTaskData[0] = id;
            
iTaskData[1] = iTempid;
            
            
set_task(float(iTime), "Task_UnBadAim"iTempid TASKID_UNBADAIMiTaskData2);
        }
    }
    
    new 
iSave str_to_num(szSave);
    
    if(
iSave)
    {
        if(
iTime 1)
            
console_print(id"%L"id"AMX_SUPER_BADAIM_BAN");

        else
            
set_aimvault(iTempid1);
    }
    
    new 
szPlayerName[32], szAuthid[32];
    
get_user_name(idszPlayerName31);
    
get_user_authid(idszAuthid31);

    
log_amx"%L"LANG_PLAYER"AMX_SUPER_BADAIM_LOG"szPlayerNameszAuthidg_bHasBadAim[iTempid] == true"set" "removed"szName);
    
    return 
PLUGIN_HANDLED;
}

public 
Task_UnBadAim(iTaskData[])
{
    new 
id iTaskData[0];
    new 
iTempid iTaskData[1];
    
    new 
szName[35];
    
get_user_name(iTempidszNamecharsmax(szName));

    
client_print(idprint_chat"%L"id"AMX_SUPER_BADAIM_NO_BADAIM_MESSAGE"szName);    
    
console_print(id"%L"id"AMX_SUPER_BADAIM_NO_BADAIM_MESSAGE_CONSOLE"szName);

    
g_bHasBadAim[iTempid] = false;
}

public 
set_aimvault(idiValue)
{
    new 
szAuthid[35];
    
get_user_authid(idszAuthidcharsmax(szAuthid));
    
    new 
szVaultKey[51];
    
formatex(szVaultKeycharsmax(szVaultKey), "BADAIM_%s"szAuthid);

    if(
vaultdata_exists(szVaultKey))
        
remove_vaultdata(szVaultKey);
    
    if(
iValue == 1)
        
set_vaultdata(szVaultKey"1");
}

public 
check_aimvault(id)
{
    new 
szAuthid[35];
    
get_user_authid(idszAuthidcharsmax(szAuthid));
    
    new 
szVaultKey[51];
    
format(szVaultKey,50,"BADAIM_%s",szAuthid);

    if(
vaultdata_exists(szVaultKey))
        
g_bHasBadAim[id] = true;
}

public 
FwdPlayerPrethink(id)
{
    if(
g_bHasBadAim[id])
    {
        static 
FloatBadAimVec[3] = {100.0100.0100.0};
        
set_pev(idpev_punchangleBadAimVec);
    }
}


/* 13)    amx_exec
 *--------------
*/
public Cmd_Exec(idiLeveliCid)
{
    if(!
cmd_access(idiLeveliCid3))
        return 
PLUGIN_HANDLED;

    new 
szTarget[35], szTargetName[35], szCommand[64];
    
read_argv(1szTargetcharsmax(szTarget));
    
read_argv(2szCommandcharsmax(szCommand));
    
    new 
szAdminName[35], szAdminAuthid[35];
    
get_user_name(idszAdminNamecharsmax(szAdminName));
    
get_user_authid(idszAdminAuthidcharsmax(szAdminAuthid));
    
    new 
bIsFilteredCmd false;
    
    
// Check if command is a banned one.
    
for(new 0sizeof(g_szAlwaysBlockedCmds); i++)
    {
        if(
containi(szCommandg_szAlwaysBlockedCmds[i]) > -1)
        {
            
// TODO: Add ML support.
            
console_print(id"The command %s is banned and does not work on iPlayers."szCommand);
            
            if(
szTarget[0] != '@')
            {
                new 
iPlayer cmd_target(idszTargetCMDTARGET_ALLOW_SELF);
                
                if(
iPlayer)
                    
get_user_name(iPlayerszTargetcharsmax(szTarget));
            }
            
            
log_amx("ADMIN %s <%s> used banned command '%s' on '%s'"szAdminNameszAdminAuthidszCommandszTarget);
            
            return 
PLUGIN_HANDLED;
        }
    }
    
    
// Check if the command is a filtered one.
    
for(new 0sizeof(g_szFilterStuffCmdBlockedCmds); i++)
    {
        if(
containi(szCommandg_szFilterStuffCmdBlockedCmds[i]) > -1)
        {
            
bIsFilteredCmd true;
            break;
        }
    }
    
    new 
iPlayer;
    
    if(
szTarget[0] == '@')
    {
        new 
iPlayers[32], iPlayerNumeCmdTeamTeam;
        
        switch(
szTarget[1])
        {
            case 
'T''t':
            {
                
get_players(iPlayersiPlayerNum"e""TERRORIST");
                
                
Team T;
            }
            
            case 
'C''c':
            {
                
get_players(iPlayersiPlayerNum"e""CT");
                
                
Team CT;
            }
            
            case 
'A''a':
            {
                
get_players(iPlayersiPlayerNum);
                
                
Team ALL;
            }
        }
        
        if(!
iPlayerNum)
        {
            
console_print(id"%L"id"AMX_SUPER_NO_PLAYERS");
            
            return 
PLUGIN_HANDLED;
        }
        
        for(new 
0iPlayerNumi++)
        {
            
iPlayer iPlayers[i];
            
            if((
get_user_flags(iPlayer) & ADMIN_IMMUNITY) && iPlayer != id)
            {
                
get_user_name(iPlayerszTargetNamecharsmax(szTargetName));
                
console_print(id"%L"id"AMX_SUPER_TEAM_IMMUNITY"szTargetName);
                
                continue;
            }
                        
            else if(
bIsFilteredCmd && !g_bAllowsAllCommands[iPlayer])
            {
                
// TODO: Add ML support.
                
get_user_name(iPlayerszTargetNamecharsmax(szTargetName));
                
console_print(id"The command %s is banned and does not work on iPlayers."szCommand);
                continue;
            }
            
            
client_cmd(iPlayerszCommand);
        }
        
        
show_activity_key("AMX_SUPER_EXEC_TEAM_CASE1""AMX_SUPER_EXEC_TEAM_CASE2"szAdminNameszCommandg_TeamNames[Team]);
        
log_amx("%L"LANG_SERVER"AMX_SUPER_EXEC_TEAM_LOG"szAdminNameszAdminAuthidszCommandg_TeamNames[Team]);
    }
    
    else
    {
        
iPlayer cmd_target(idszTargetCMDTARGET_OBEY_IMMUNITY CMDTARGET_ALLOW_SELF);
        
        if(
iPlayer)
        {
            new 
szTargetAuthid[35];
            
get_user_name(iPlayerszTargetNamecharsmax(szTargetName));
            
get_user_authid(iPlayerszTargetAuthidcharsmax(szTargetAuthid));
            
            
// TODO: Add translation for this.
            
if(bIsFilteredCmd && !g_bAllowsAllCommands[iPlayer])
            {
                
console_print(id"Cannot execute command '%s' on player %s"szCommandszTargetName);
                
log_amx("ADMIN %s <%s> used banned command '%s' on '%s'"szAdminNameszAdminAuthidszCommandszTargetName);
            }

            else
            {
                
client_cmd(iPlayerszCommand);
            
                
show_activity_key("AMX_SUPER_EXEC_PLAYER_CASE1""AMX_SUPER_EXEC_PLAYER_CASE2"szAdminNameszCommandszTargetName);
                
log_amx("%L"LANG_SERVER"AMX_SUPER_EXEC_PLAYER_LOG"szAdminNameszAdminAuthidszCommandszTargetNameszTargetAuthid);
            }
        }
    }
    
    return 
PLUGIN_HANDLED;
}

/* 14)    amx_restart / shutdown
 *----------------------------
*/
public Cmd_Restart(idiLeveliCid)
{
    if(
g_bIsShuttingDown || !cmd_access(idiLeveliCid2))    
        return 
PLUGIN_HANDLED;
    
    new 
szCmd[14];
    
read_argv(0szCmdcharsmax(szCmd));
    
    if(
equali(szCmd"amx_restart"))
        
g_ShutDownMode RESTART;
    
    else
        
g_ShutDownMode SHUTDOWN;
        
    new 
szTime[4];
    
read_argv(1szTimecharsmax(szTime));
    
    new 
iTime str_to_num(szTime);
    
    if(!(
<= iTime <= 20))
    {
        
console_print(id"%L"id"AMX_SUPER_SHUTDOWN_CONSOLE");
        
        return 
PLUGIN_HANDLED;
    }
    
    
    
g_bIsShuttingDown true;
    
    new 
iCount;
    for(
iCount iTimeiCount != 0iCount--)
        
set_task(float(abs(iCount iTime)), "TaskShutDown"iCount);
    
    
set_task(float(iTime), "TaskShutDown");    
    
    
    new 
szAdminName[35], szAdminAuthid[35];
    
get_user_name(idszAdminNamecharsmax(szAdminName));
    
get_user_authid(idszAdminAuthidcharsmax(szAdminAuthid));
    
    
show_activity_key("AMX_SUPER_SHUTDOWN_CASE1""AMX_SUPER_SHUTDOWN_CASE2"szAdminNameg_szShutdownNames[g_ShutDownMode], iTime);
    
log_amx("%L"LANG_SERVER"AMX_SUPER_SHUTDOWN_MESSAGE_LOG"szAdminNameidszAdminAuthidg_szShutdownNames[g_ShutDownMode]);
    
    return 
PLUGIN_HANDLED;
}

public 
TaskShutDown(iNumber)
{
    if(!
iNumber)
    {
        if(
g_ShutDownMode == RESTART)
            
server_cmd("restart");
        
        else
            
server_cmd("quit");
    }
    
    new 
szNum[32];
    
num_to_word(iNumberszNumcharsmax(szNum));
    
    
client_cmd(0"spk ^"fvox/%s^""szNum);
}

/* 15)    say /gravity
 *------------------
*/
public Cmd_Gravity(id)
{
    
client_print(idprint_chat"%L"id"AMX_SUPER_GRAVITY_CHECK"get_pcvar_num(g_pGravity));
    
    return 
PLUGIN_HANDLED;
}

/* 16)    say /alltalk
 *------------------
*/
public Cmd_Alltalk(id)
{
    
client_print(idprint_chat"%L"id"AMX_SUPER_ALLTALK_STATUS"get_pcvar_num(g_pAllTalk));
    
    return 
PLUGIN_HANDLED;
}

/* 17)    say /spec
 *---------------
*/
public Cmd_Spec(id)
{
    new 
CsTeamsTeam cs_get_user_team(id);
    
    if(( 
Team == CS_TEAM_CT || Team == CS_TEAM_T ) && get_pcvar_num(g_pAllowSpec) || get_pcvar_num(g_pAllowPublicSpec)) 
    {
        if(
is_user_alive(id))
        {
            
user_kill(id);
            
            
cs_set_user_deathsidcs_get_user_deaths(id) - 1);
            
set_user_fragsidget_user_frags(id) + 1);
        }
        
        
g_OldTeam[id] = Team;
        
        
cs_set_user_team(idCS_TEAM_SPECTATOR);
    }

    return 
PLUGIN_HANDLED;
}

/* 18)    say /unspec
 *-----------------
*/
public Cmd_UnSpec(id)
{
    if(
g_OldTeam[id])
    {
        
cs_set_user_team(idg_OldTeam[id]);
        
g_OldTeam[id] = CS_TEAM_UNASSIGNED;
    }
    
    return 
PLUGIN_HANDLED;
}

/* 19)    say /admin(s)
 *-------------------
*/
public Cmd_Admins(id
{
    new 
szMessage[256];
    
    if(
get_pcvar_num(g_pAdminCheck))
    {
        new 
szAdminNames[33][32];
        new 
szContactInfo[256], szContact[112];
        new 
iiCountxiLen;
        
        for(
;<= g_iMaxPlayersi++)
        {
            if(
is_user_connected(i) && (get_user_flags(i) & ADMIN_CHECK))
                
get_user_name(iszAdminNames[iCount++], 31);
        }
        
        
iLen format(szMessage255"%s ADMINS ONLINE: ",COLOR);
        
        if(
iCount 0
        {
            for(
iCount x++) 
            {
                
iLen += format(szMessage[iLen], 255-iLen"%s%s "szAdminNames[x], < (iCount-1) ? ", ":"");
                
                if(
iLen 96 
                {
                    
print_message(idszMessage);
                    
iLen format(szMessage255"%s ",COLOR);
                }
            }
            
            
print_message(idszMessage);
        }
        
        else 
        {
            
iLen += format(szMessage[iLen], 255-iLen"No admins online.");
            
print_message(idszMessage);
        }
        
        
get_pcvar_string(g_pContactszContact63);
        
        if(
szContact[0])  
        {
            
format(szContactInfo111"%s Contact Server Admin -- %s"COLORszContact);
            
print_message(idszContactInfo);
        }
    }
    
    else
    {
        
formatex(szMessage255"^x04 Admin Check is currently DISABLED.");
        
print_message(idszMessage);
    }
}

print_message(idszMsg[]) 
{        
    
message_begin(MSG_ONEg_iMsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(szMsg)
    
message_end()
}

/* 20)    say /fixsound
 *-------------------
*/
public Cmd_FixSound(id)
{
    if(
get_pcvar_num(g_pAllowSoundFix))
    {
        
client_cmd(id"stopsound; room_type 00");
        
client_cmd(id"stopsound");
        
        
client_print(idprint_chat"%L"id"AMX_SUPER_SOUNDFIX");
    }
    
    else
        
client_print(idprint_chat"%L"id"AMX_SUPER_SOUNDFIX_DISABLED");
    
    return 
PLUGIN_HANDLED;

Responder
#2
el slowhack está prohibido aquí y no se da soporte a nada que tenga que ver con dproto.
Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#3
(20/10/2017, 09:30 AM)SthoNy escribió: el slowhack está prohibido aquí y no se da soporte a nada que tenga que ver con dproto.

Pero ese plugins es del mismo alliedmods en realidad solo es un plugins no tiene que ver con dproto es una falla del plugins
Responder
#4
Cita:no deja entrar a los idlan
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)