AMX_SS Prasymas + alias

Šiame forume vartotojai gali prašyti jiems reikiamo plugino.
Forum rules
Šiame forume galite siūlyti idėjas ar prašyti jums reikalingų pluginų. Jei kas nors pradės jį kurti, tai pasirašys Jūsų sukurtoje temoje. Niekada nepykite, jei niekas neatsako į Jūsų prašymą. Gal tai tiesiog per sudėtinga, arba reikalauja per daug darbo.
User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: AMX_SS Prasymas + alias

Post by aurimasko »

Kodėl neveiks?

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: AMX_SS Prasymas + alias

Post by aaarnas »

Steam žaidėjams ji blokuojama kaip slowhack.
Palikau CS pasaulį ;/ . Nebepasiekiamas.

User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: AMX_SS Prasymas + alias

Post by aurimasko »

Na taip, blokuoja, bet gali žaidėjas ir išjungt tai.
Nu bet žodžiu, supratau.

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: AMX_SS Prasymas + alias

Post by aaarnas »

Galima taip:

Code: Select all

client_cmd(player_id, "escape;wait;wait;wait;wait;wait;wait;wait;wait;wait;snapshot;alias;")client_cmd(player_id, "escape;wait;wait;wait;wait;wait;wait;wait;toggleconsole;wait;wait;wait;wait;wait;wait;wait;wait;snapshot;escape;")
Palikau CS pasaulį ;/ . Nebepasiekiamas.

User avatar
v1rus
Gana aktyvus vartotojas
Posts: 242
Joined: 2012 Jul 19 14:00
Skype: v1rusjkee
Location: Cloppenburg
Contact:

Re: AMX_SS Prasymas + alias

Post by v1rus »

Tai kaip supratau kodas iseina toks ?

Code: Select all

    #include <amxmodx>    #include <amxmisc>    #include <cstrike>         new player    new ip[32]    new finish;         new maxscreens  //max nr of ss to a player    new screeninterval  //interval between 2 ss    new design  //visual stuff    new site  //the site/forum where a user can post ther pics to be unbanned         public plugin_init()    {        register_plugin("Ultimate SS", "1.2", "Hack")               register_concmd("amx_ss", "concmd_screen", ADMIN_BAN, "<authid, nick or #userid> <screens>")        register_clcmd("say /ip", "show_ip")               maxscreens = register_cvar("amx_ss_max", "6")        screeninterval = register_cvar("amx_ss_interval", "2.0")        design = register_cvar("amx_ss_design", "3")        site = register_cvar("amx_ss_site","www.cs-hlds.lt")    }         public concmd_screen(id, level, cid)    {        if(!cmd_access(id, level, cid, 3))   //if the one who requests an ss isnt admin exit        {            return PLUGIN_HANDLED        }               new arg1[24], arg2[4]        read_argv(1, arg1, 23)        read_argv(2, arg2, 3)               new screens = str_to_num(arg2)        new maxss = get_pcvar_num(maxscreens)               if(screens > maxss)   //too many ss?        {            console_print(id, "[SS] DARAI PER DAUG NUOTRAUKU!")                       return PLUGIN_HANDLED        }               player = cmd_target(id, arg1, 1)        if (!player)   //the player has exited the sv or he didnt existed        {            return PLUGIN_HANDLED        }        finish = screens               new Float:interval = get_pcvar_float(screeninterval)    //a set_task for each "amx_ss nickname nr_of_ss"        new array[2]        array[0] = id //save usefull data in a vector so it can be reused        array[1] = player        set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)                   return PLUGIN_HANDLED    }         public ss_propriuzis(array[2])    {        //take data and set them accordingly        new player = array[1]        new id = array[0]               //save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!        new timestamp[32], timestampmsg[128], name[32], adminname[32]        get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31)        get_user_name(player, name, 31)        get_user_name(id, adminname, 31)        get_user_ip(player, ip, 31)                       //Clasic Design        if(get_pcvar_num(design) == 0)        {            client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by adminl ^"%s^" **", name, adminname)            client_cmd(player, "snapshot") //ss            client_cmd(player, "alias;wait;snapshot") // alias        }        //Doar Playerului        else if(get_pcvar_num(design) == 1)        {            client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)            client_cmd(player, "snapshot") //ss            client_cmd(player_id, "escape;wait;wait;wait;wait;wait;wait;wait;wait;wait;snapshot;alias;")            client_cmd(player_id, "escape;wait;wait;wait;wait;wait;wait;wait;toggleconsole;wait;wait;wait;wait;wait;wait;wait;wait;snapshot;escape;")        }        //HUD Message doar Playerului        else if(get_pcvar_num(design) == 2)        {            set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)            format(timestampmsg, 127, "** TIME: - %s **", timestamp)            show_hudmessage(player, timestampmsg)                       client_cmd(player, "snapshot")  //ss        }        //Full        else if(get_pcvar_num(design) == 3)        {            //HUD Timestamp Message            set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)            format(timestampmsg, 127, "** PLAYER %s TIME: - %s **",name,timestamp)            show_hudmessage(player, timestampmsg)                       client_print(0, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)                       client_cmd(player, "snapshot") //ss        }        console_print(id, "[SS]%s 's ip is %s!",name,ip)        console_print(id, "[SS]%s 's ip is %s!",name,ip)        console_print(id, "[SS]%s 's ip is %s!",name,ip)        finish = finish - 1;               if(finish == 0)        {            new forum[51];            get_pcvar_string(site,forum,50)            client_print(player, print_chat, "Post your screenshots on %s for unban", forum)        }               return PLUGIN_CONTINUE;    }         public show_ip(id)    {        console_print(id, "[SS]Last Stored IP: %s!",ip)    }
Image
CS.PRIEALAUS.LT užsidarėm
GAMEBANANA.LT užsidarėm
CounterLAND.LT užsidarėm
HLTV.LT užsidarėm

MIXMAKER
Jau atvyksta..

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: AMX_SS Prasymas + alias

Post by aaarnas »

Code: Select all

#include <amxmodx>#include <amxmisc>#include <cstrike> new playernew ip[32]new finish; new maxscreens  //max nr of ss to a playernew screeninterval  //interval between 2 ssnew design  //visual stuffnew site  //the site/forum where a user can post ther pics to be unbanned public plugin_init(){    register_plugin("Ultimate SS", "1.2", "Hack")        register_concmd("amx_ss", "concmd_screen", ADMIN_BAN, "<authid, nick or #userid> <screens>")    register_clcmd("say /ip", "show_ip")        maxscreens = register_cvar("amx_ss_max", "6")    screeninterval = register_cvar("amx_ss_interval", "2.0")    design = register_cvar("amx_ss_design", "3")    site = register_cvar("amx_ss_site","www.cs-hlds.lt")} public concmd_screen(id, level, cid){    if(!cmd_access(id, level, cid, 3))   //if the one who requests an ss isnt admin exit    {        return PLUGIN_HANDLED    }        new arg1[24], arg2[4]    read_argv(1, arg1, 23)    read_argv(2, arg2, 3)        new screens = str_to_num(arg2)    new maxss = get_pcvar_num(maxscreens)        if(screens > maxss)   //too many ss?    {        console_print(id, "[SS] DARAI PER DAUG NUOTRAUKU!")                return PLUGIN_HANDLED    }        player = cmd_target(id, arg1, 1)    if (!player)   //the player has exited the sv or he didnt existed    {        return PLUGIN_HANDLED    }    finish = screens        new Float:interval = get_pcvar_float(screeninterval)    //a set_task for each "amx_ss nickname nr_of_ss"    new array[2]    array[0] = id //save usefull data in a vector so it can be reused    array[1] = player    set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)        return PLUGIN_HANDLED} public ss_propriuzis(array[2]){    //take data and set them accordingly    new player = array[1]    new id = array[0]        //save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!    new timestamp[32], timestampmsg[128], name[32], adminname[32]    get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31)    get_user_name(player, name, 31)    get_user_name(id, adminname, 31)    get_user_ip(player, ip, 31)        //Clasic Design    if(get_pcvar_num(design) == 0)    {        client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by adminl ^"%s^" **", name, adminname)        //client_cmd(player, "snapshot") //ss        //client_cmd(player, "alias;wait;snapshot") // alias    }    //Doar Playerului    else if(get_pcvar_num(design) == 1)    {        client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)        //client_cmd(player, "snapshot") //ss    }    //HUD Message doar Playerului    else if(get_pcvar_num(design) == 2)    {        set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)        format(timestampmsg, 127, "** TIME: - %s **", timestamp)        show_hudmessage(player, timestampmsg)                /client_cmd(player, "snapshot")  //ss    }    //Full    else if(get_pcvar_num(design) == 3)    {        //HUD Timestamp Message        set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)        format(timestampmsg, 127, "** PLAYER %s TIME: - %s **",name,timestamp)        show_hudmessage(player, timestampmsg)                client_print(0, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)                //client_cmd(player, "snapshot") //ss    }    console_print(id, "[SS]%s 's ip is %s!",name,ip)    console_print(id, "[SS]%s 's ip is %s!",name,ip)    console_print(id, "[SS]%s 's ip is %s!",name,ip)    finish = finish - 1;        client_cmd(player, "escape;wait;wait;wait;wait;wait;wait;wait;wait;wait;snapshot;alias;")    client_cmd(player, "escape;wait;wait;wait;wait;wait;wait;wait;toggleconsole;wait;wait;wait;wait;wait;wait;wait;wait;snapshot;escape;")            if(finish == 0)    {        new forum[51];        get_pcvar_string(site,forum,50)        client_print(player, print_chat, "Post your screenshots on %s for unban", forum)    }        return PLUGIN_CONTINUE;} public show_ip(id){    console_print(id, "[SS]Last Stored IP: %s!",ip)}
Netestavau
Palikau CS pasaulį ;/ . Nebepasiekiamas.

User avatar
v1rus
Gana aktyvus vartotojas
Posts: 242
Joined: 2012 Jul 19 14:00
Skype: v1rusjkee
Location: Cloppenburg
Contact:

Re: AMX_SS Prasymas + alias

Post by v1rus »

Veikia. Aciu.

-- 2014 Rgs 16 12:07 --

O imanoma is sito kodo padaryti kad irgi darytu allias snapshot.

Code: Select all

/**************************************************************************************************** Copyleft (c)2010 Teascu Dorin & Fysiks* Plugin Support:* &nbsp; - http://forums.alliedmods.net/showthread.php?t=90318*&nbsp; &nbsp;or*&nbsp; &nbsp;- http://fightersclan.com/forum/f7/amx-ssban-v2-6-%5Bupdate-15-oct-2010%5D-35/***************************************************************************************************** &nbsp;This program is free software; you can redistribute it and/or modify it under the terms* &nbsp;of the GNU General Public License as published by the Free Software Foundation; either* &nbsp;version 2 of the License, or (at your option) any later version.** &nbsp;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;* &nbsp;without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.* &nbsp;See the GNU General Public License for more details.** &nbsp;You should have received a copy of the GNU General Public License along with this program;* &nbsp;if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,* &nbsp;MA 02111-1307 USA** &nbsp;In addition, as a special exception, the author gives permission to link the code of this* &nbsp;program with the Half-Life Game Engine ("HL Engine") and Modified Game Libraries ("MODs")* &nbsp;developed by Valve, L.L.C ("Valve"). You must obey the GNU General Public License in all* &nbsp;respects for all of the code used other than the HL Engine and MODs from Valve.* &nbsp;If you modify this file, you may extend this exception to your version of the file,* &nbsp;but you are not obligated to do so. If you do not wish to do so, delete this exception* &nbsp;statement from your version.***************************************************************************************************** Amx SSBan* =========***************************************************************************************************** Description* -----------* - Take snapshots and ban a player (saved on targets PC) or just take snapshots***************************************************************************************************** Available CVAR's* ----------------* amx_ssdelay "1.0"&nbsp;- Delay between snapshots (Def.: "1.0") WARNING has to be .0 as is float* amx_bandelay "10.0" &nbsp; - Delay before ban is done (Def.: "10.0") WARNING has to be .0 as is float* amx_ssnumber "2" &nbsp;- Number of snapshots to take (Def.: "3")* amx_website "" &nbsp; &nbsp;- Unban request site (Def.: "www.yoursite.com")* amx_msg_type "3" &nbsp;- Info player/admin messages 1 - chat | 2- hud | 3- chat+hud (Def.: "3")***************************************************************************************************** Admin Commands* --------------* amx_ss <name or #userid> - Make Snapshots on target !* amx_ssban <name or #userid> <minutes> [reason] - Ban with snapshots (AMXMODX) !* &nbsp; &nbsp; &nbsp; If #define AMXBANS is setted to 1 the following console command will be used:* amx_ssban <minutes> <name or #userid> [reason] - Ban with snapshots (AMXBANS) !* amx_ssmenu - Displays Snapshot Menu* amx_ssbanmenu - Displays ban menu***************************************************************************************************** Credits* -------* Fysiks - ADDED BAN, SS & SSBan MENU and support for AmxBans v6.x - !!! Thank you !!!* Alka - stock color chat print* hackandmore - used his plugin to learn how to use amx_msg_type cvar* AMXX Dev Team for using their amxmodx ban script* uTg | bigpapajiggs using his plugin (Admin Screen 2) to learn how to use delay and tasks* Any other plugins authors that made this type of plugin***************************************************************************************************** Changelog* ---------* * &nbsp; 10.Jul.2010 - v2.6 - [ADDED] support for AmxBans v6.x (by Fysiks)* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [FIXED] lang file by saving it as Unicode without BOM* &nbsp; 20.Aug.2009 - v2.5 - [ADDED] HUD flashing message to ask reason submission from admin* &nbsp; 17.Aug.2009 - v2.4 - [FIXED] Amx Mod X banning issue* &nbsp; 31.Jul.2009 - v2.3 - [ADDED] reason submission for menu bans* &nbsp; 26.Jul.2009 - v2.2 - [ADDED] menu for taking snapshots - by Fysiks* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [CHANGED] the plugin name from AMXX SSBan w/ Menu in simple AMX SSBan* &nbsp; 24.Jul.2009 - v2.1 - [REMOVED] amx_ban_type cvar* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [CHANGED] the script for easy usage of bantype (optimized by Fysiks)* &nbsp; 23.Jul.2009 - v2.0 - [ADDED] ban menu - Al the work provided by Fysiks* &nbsp; 11.May.2009 - v1.9.5 - [ADDED] tasks controlled by cvar for bans*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] cvar amx_bandelay - Delay before ban is done (Def.: 10.0)*&nbsp; &nbsp;07.May.2009 - v1.9.1 - [FIXED] the usage of command on immunity admins.* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; You can take snapshots of admins with immunity* &nbsp; 06.May.2009 - v1.9 - [ADDED] to AMXX Snapshot a task to take the snapshots with time delay*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] cvar amx_ssdelay - Delay between snapshots (Def.: 1)*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] cvar amx_ssnumber - Number of snapshots to take (Def.: 3)*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] possibility of taking snapshots on immunity admins* &nbsp; 06.May.2009 - v1.8.1 beta - [REMOVED] NO ACCESS console message as Fysiks said that* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'if(!cmd_access...' already does this* &nbsp; 06.May.2009 - v1.8 beta - [CLEANED] up the plugin (some script arranging)*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [REMOVED] amx_chattag - it was irelevant... left [AMXX] by default as tag*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] bans by AMXMODX - THX AMXX Dev Team for ban code*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] cvar amx_ban_type - 0- Disabled | 1- AmxModX Ban | 2- AmaBans Ban*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] possibility of taking snapshots and banning admins with immunity*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; (not working for AMXBANS as is used by server_cmd)*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] the console print to inform a player/admin about no acces for command*&nbsp; &nbsp;03.May.2009 - v1.7 beta - [ADDED] command amx_ssban to use bans by AMXBANS* &nbsp; 28.Apr.2009 - v1.6 - [CHANGED] from 'if(get_pcvar_num...' to switch Message type with case*&nbsp; &nbsp;18.Apr.2009 - v1.5 - [ADDED] cvar amx_msg_type - 1 - chat | 2- hud | 3- chat+hud (Def: "1")*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] hud message for player data (controled by cvar)*&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; [ADDED] Polish translation*&nbsp; &nbsp;17.Apr.2009 - v1.4 - [ADDED] to cache SteamID also in the snapshots - THX xPaw* &nbsp; 17.Apr.2009 - v1.3 - [CHANGED] cvar to pcvar - THX xPaw for pointing that out !* &nbsp; 17.Apr.2009 - v1.2 - [ADDED] cvar amx_chattag - Make any tag you like in chat* &nbsp; 16.Apr.2009 - v1.1 - [ADDED] Multilingual* &nbsp; 15.Apr.2009 - v1.0:- Initial release***************************************************************************************************/&nbsp;// Includes#include <amxmodx>#include <amxmisc>#include <geoip>&nbsp;// Defines#define VERSION "2.6"&nbsp;&nbsp;//********** EDIT HERE if you use AMXBANS ***********//#define AMXBANS 0 // Set this to 1 to enable AmxBans support. (Uses amx_ban <minutes> <userid> [reason])//***************************************************//&nbsp;&nbsp;#define MAX_PLAYERS 33 // Maximum number of players (plus 1)&nbsp;new g_Activity, g_Hostname, g_DelaySS, g_DelayBan, g_SnapShot, g_UnbanURL, g_MsgType, g_SayTextnew g_szBanTime&#91;MAX_PLAYERS&#93;&#91;8&#93;, g_szBanReason&#91;MAX_PLAYERS&#93;&#91;32&#93;new Array:g_bantimes&nbsp;new g_menuPosition&#91;MAX_PLAYERS&#93;new g_menuPlayers&#91;MAX_PLAYERS&#93;&#91;32&#93;new g_menuPlayersNum&#91;MAX_PLAYERS&#93;new g_menuOption&#91;MAX_PLAYERS&#93;new g_menuSettings&#91;MAX_PLAYERS&#93;&nbsp;public plugin_init&#40;&#41;&#123;&nbsp; &nbsp; /* Register plugin name and author */&nbsp; &nbsp; register_plugin&#40;"AMX SSBan", VERSION, "God@Dorin\Fysiks"&#41;;&nbsp;&nbsp; &nbsp; /* Register plugin version */&nbsp; &nbsp; register_cvar&#40;"screen_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY&#41;;&nbsp;&nbsp; &nbsp; /* Register language file */&nbsp; &nbsp; register_dictionary&#40;"screen_message.txt"&#41;&nbsp; &nbsp;// Language file for snapshot messages&nbsp; &nbsp; register_dictionary&#40;"admincmd.txt"&#41;&nbsp;&nbsp; &nbsp; // Language file for amxmodx bans&nbsp;&nbsp; &nbsp; /* Register cvars */&nbsp; &nbsp; g_Activity = get_cvar_pointer&#40;"amx_show_activity"&#41;&nbsp; &nbsp; g_Hostname = get_cvar_pointer&#40;"hostname"&#41;&nbsp; &nbsp; g_DelaySS = register_cvar&#40;"amx_ssdelay", "1.0"&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; // Delay between snapshots (Def.: 1.0)&nbsp; &nbsp; g_DelayBan = register_cvar&#40;"amx_bandelay", "10.0"&#41;&nbsp; &nbsp; &nbsp; // Delay before ban is done (Def.: 10.0)&nbsp; &nbsp; g_SnapShot = register_cvar&#40;"amx_ssnumber", "3"&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; // Number of snapshots to take (Def.: 3)&nbsp; &nbsp; g_UnbanURL = register_cvar&#40;"amx_website", "www.yoursite.com"&#41;&nbsp; &nbsp;// Unban request site (Def.: "www.yoursite.com")&nbsp; &nbsp; g_MsgType = register_cvar&#40;"amx_msg_type", "3"&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 1- chat | 2- hud | 3- chat+hud (Def.: 3)&nbsp;&nbsp; &nbsp; /* Register console admin commands */&nbsp; &nbsp; register_concmd&#40;"amx_ss", "cmdSS",ADMIN_KICK, "<name or #userid> - Make snapshots on user !"&#41;#if AMXBANS&nbsp; &nbsp; if&#40; get_cvar_num&#40;"amxbans_use_newbancmd"&#41; &#41;&nbsp; &nbsp; &nbsp; &nbsp; register_concmd&#40;"amx_ssban", "cmdBanSS", ADMIN_BAN, "<name or #userid> <minutes> [reason] - &nbsp;- Ban with snapshots! (AmxBans)"&#41;&nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; register_concmd&#40;"amx_ssban", "cmdBanSS", ADMIN_BAN, "<minutes> <name or #userid> [reason] - Ban with snapshots! (AmxBans)"&#41;#else&nbsp; &nbsp; register_concmd&#40;"amx_ssban", "cmdBanSS", ADMIN_BAN, "<name or #userid> <minutes> [reason] - Ban with snapshots! (AMX Mod X)"&#41;#endif&nbsp; &nbsp; register_clcmd&#40;"_BanReason", "cmdBanReason"&#41;&nbsp;&nbsp; &nbsp; g_SayText = get_user_msgid&#40;"SayText"&#41;&nbsp;&nbsp; &nbsp; /* Register the menu for banning */&nbsp; &nbsp; register_clcmd&#40;"amx_ssmenu", "cmdSSMenu", ADMIN_KICK, " - Displays ScreenShot Menu"&#41;&nbsp; &nbsp; register_clcmd&#40;"amx_ssbanmenu", "cmdBanMenu", ADMIN_BAN, " - Displays ScreenShot Ban Menu"&#41;&nbsp; &nbsp; register_menucmd&#40;register_menuid&#40;"SS Menu"&#41;, 1023, "actionMenu"&#41;&nbsp;&nbsp; &nbsp; /* Set bantimes for the menu */&nbsp; &nbsp; g_bantimes = ArrayCreate&#40;&#41;&nbsp;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 0&#41;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 5&#41;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 10&#41;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 30&#41;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 60&#41;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 240&#41;&nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, 1440&#41;&nbsp;&nbsp; &nbsp; register_srvcmd&#40;"amx_ssbantimes", "ssbanmenu_setbantimes"&#41;&#125;&nbsp;public cmdSS&#40;id,level,cid&#41;&#123;&nbsp; &nbsp; if&#40;!cmd_access&#40;id, level, cid, 1&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&nbsp; &nbsp; new target&#91;32&#93;&nbsp; &nbsp; read_argv&#40;1, target, 31&#41;&nbsp; &nbsp; new player = cmd_target&#40;id, target, CMDTARGET_OBEY_IMMUNITY&#41;&nbsp;&nbsp; &nbsp; if&#40;!player&#41;&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&nbsp; &nbsp; new name&#91;32&#93;, name2&#91;32&#93;&nbsp; &nbsp; get_user_name&#40;id, name, 31&#41;&nbsp; &nbsp; get_user_name&#40;player, name2, 31&#41;&nbsp; &nbsp; /* show message in chat to all players by amx_show_activity */&nbsp; &nbsp; switch&#40; get_pcvar_num&#40;g_Activity&#41; &#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; case 2: client_printc&#40;0,"%L", LANG_PLAYER, "SS_CASE2", name, name2&#41;&nbsp; &nbsp; &nbsp; &nbsp; case 1: client_printc&#40;0,"%L", LANG_PLAYER, "SS_CASE1", name2&#41;&nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; new Param&#91;2&#93;&nbsp; &nbsp; Param&#91;0&#93; = id&nbsp; &nbsp; Param&#91;1&#93; = player&nbsp; &nbsp; /* Set the task to take snapshots */&nbsp; &nbsp; set_task&#40;Float:get_pcvar_float&#40;g_DelaySS&#41;, "SS_Task", 0, Param,2, "a", get_pcvar_num&#40;g_SnapShot&#41;&#41;&nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&#125;&nbsp;public cmdBanSS&#40;id,level,cid&#41;&#123;&nbsp; &nbsp; if&#40;!cmd_access&#40;id, level, cid, 3&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&nbsp; &nbsp; new target&#91;32&#93;&nbsp;#if AMXBANS&nbsp; &nbsp; if&#40; get_cvar_num&#40;"amxbans_use_newbancmd"&#41; &#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; read_argv&#40;1, target, 31&#41;&nbsp; &nbsp; &nbsp; &nbsp; read_argv&#40;2, g_szBanTime&#91;id&#93;, 7&#41;&nbsp; &nbsp; &#125;&nbsp; &nbsp; else&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; read_argv&#40;1, g_szBanTime&#91;id&#93;, 7&#41;&nbsp; &nbsp; &nbsp; &nbsp; read_argv&#40;2, target, 31&#41;&nbsp; &nbsp; &#125;#else&nbsp; &nbsp; read_argv&#40;1, target, 31&#41;&nbsp; &nbsp; read_argv&#40;2, g_szBanTime&#91;id&#93;, 7&#41;#endif&nbsp; &nbsp; read_argv&#40;3, g_szBanReason&#91;id&#93;, 63&#41;&nbsp;&nbsp; &nbsp; new player = cmd_target&#40;id, target, CMDTARGET_OBEY_IMMUNITY&#41;&nbsp;&nbsp; &nbsp; if&#40;!player&#41;&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&nbsp; &nbsp; new Param&#91;2&#93;&nbsp; &nbsp; Param&#91;0&#93; = id&nbsp; &nbsp; Param&#91;1&#93; = player&nbsp;&nbsp; &nbsp; /* Set tasks to take snapshots and ban target */&nbsp; &nbsp; set_task&#40;Float:get_pcvar_float&#40;g_DelaySS&#41;, "SS_Task", 0, Param,2, "a", get_pcvar_num&#40;g_SnapShot&#41;&#41;&nbsp; &nbsp; set_task&#40;Float:get_pcvar_float&#40;g_DelayBan&#41;, "BanSS_Task", 0, Param, 2&#41;&nbsp;&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;public SS_Task&#40;Param&#91;2&#93;&#41;&#123;&nbsp; &nbsp; new player = Param&#91;1&#93;&nbsp; &nbsp; new id = Param&#91;0&#93;&nbsp; &nbsp; new name&#91;32&#93;, timer&#91;32&#93;, hostname&#91;64&#93;, name2&#91;32&#93;, ip&#91;32&#93;, authid2&#91;32&#93;, country&#91;33&#93;, site&#91;64&#93;&nbsp;&nbsp; &nbsp; get_user_name&#40;id, name, 31&#41;&nbsp; &nbsp; get_user_name&#40;player, name2, 31&#41;&nbsp; &nbsp; get_user_authid&#40;player, authid2, 31&#41;&nbsp; &nbsp; get_user_ip&#40;player, ip, 31, 1&#41;&nbsp;&nbsp; &nbsp; geoip_country&#40;ip, country&#41;&nbsp; &nbsp; get_time&#40;"%d/%m/%Y - %H:%M:%S", timer, 63&#41;&nbsp; &nbsp; get_pcvar_string&#40;g_Hostname, hostname, charsmax&#40;hostname&#41;&#41;&nbsp; &nbsp; get_pcvar_string&#40;g_UnbanURL, site, charsmax&#40;site&#41;&#41;&nbsp;&nbsp; &nbsp; switch&#40; get_pcvar_num&#40;g_MsgType&#41; &#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; case 1:&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Show screen messages in chat */&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG1", name&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG2", timer, hostname&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG3", name2, ip, authid2, country&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG4", site&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &nbsp; &nbsp; case 2:&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Show screen messages in hud */&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_hudmessage&#40;150, 0, 255, -1.0, 0.1, 0, 0.25, 1.0, 0.0, 0.0, 4&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; show_hudmessage&#40;player, "%L", player, "SS_MSG_HUD", timer, hostname, name2, ip, authid2, country, site&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &nbsp; &nbsp; case 3:&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Show screen messages in chat */&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG1", name&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG2", timer, hostname&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG3", name2, ip, authid2, country&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_printc&#40;player,"%L", player, "SS_MSG4", site&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Show screen messages in hud */&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_hudmessage&#40;150, 0, 255, -1.0, 0.1, 0, 0.25, 1.0, 0.0, 0.0, 4&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; show_hudmessage&#40;player, "%L", player, "SS_MSG_HUD", timer, hostname, name2, ip, authid2, country, site&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &#125;&nbsp; &nbsp; /* Take the snapshots ! */&nbsp; &nbsp; client_cmd&#40;player,"snapshot"&#41;&nbsp; &nbsp; /* Confirm for the admin in console that the command was commited */&nbsp; &nbsp; console_print&#40;id,"%L", id, "SS_CONSOLE", name2&#41;&nbsp;&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;public BanSS_Task&#40;Param&#91;&#93;&#41;&#123;&nbsp; &nbsp; new id = Param&#91;0&#93;&nbsp; &nbsp; new player = Param&#91;1&#93;&nbsp; &nbsp; new minutes&#91;8&#93;, reason&#91;32&#93;&nbsp; &nbsp; new userid2 = get_user_userid&#40;player&#41;&nbsp;&nbsp; &nbsp; copy&#40;minutes, 7, g_szBanTime&#91;id&#93;&#41;&nbsp; &nbsp; copy&#40;reason, 31, g_szBanReason&#91;id&#93;&#41;&nbsp;#if AMXBANS // Ban "player" using AmxBans&nbsp; &nbsp; if&#40; get_cvar_num&#40;"amxbans_use_newbancmd"&#41; &#41;&nbsp; &nbsp; &nbsp; &nbsp; client_cmd&#40;id, "amx_ban #%d %s ^"%s^"", userid2, minutes, reason&#41;&nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; client_cmd&#40;id, "amx_ban %s #%d ^"%s^"", minutes, userid2, reason&#41;#else&nbsp; &nbsp; // Ban "player" using HL Ban Method&nbsp;&nbsp; &nbsp; new authid&#91;32&#93;, name2&#91;32&#93;, authid2&#91;32&#93;, name&#91;32&#93;&nbsp;&nbsp; &nbsp; get_user_authid&#40;player, authid2, 31&#41;&nbsp; &nbsp; get_user_authid&#40;id, authid, 31&#41;&nbsp; &nbsp; get_user_name&#40;player, name2, 31&#41;&nbsp; &nbsp; get_user_name&#40;id, name, 31&#41;&nbsp;&nbsp; &nbsp; log_amx&#40;"Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%s^") (reason ^"%s^")", name, get_user_userid&#40;id&#41;, authid, name2, userid2, authid2, minutes, reason&#41;&nbsp;&nbsp; &nbsp; new temp&#91;64&#93;, banned&#91;16&#93;, nNum = str_to_num&#40;minutes&#41;&nbsp; &nbsp; if&#40;nNum&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; formatex&#40;temp, 63, "%L", player, "FOR_MIN", minutes&#41;&nbsp; &nbsp; &#125;&nbsp; &nbsp; else&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; formatex&#40;temp, 63, "%L", player, "PERM"&#41;&nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; formatex&#40;banned, 15, "%L", player, "BANNED"&#41;&nbsp;&nbsp; &nbsp; if &#40;reason&#91;0&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; server_cmd&#40;"kick #%d ^"%s &#40;%s %s&#41;^"", userid2, reason, banned, temp&#41;&nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; server_cmd&#40;"kick #%d ^"%s %s^"", userid2, banned, temp&#41;&nbsp;&nbsp; &nbsp; server_cmd&#40;"banid %s %s", minutes, authid2&#41;&nbsp; &nbsp; server_cmd&#40;"writeid"&#41;&nbsp;&nbsp; &nbsp; // Display the message to all clients&nbsp; &nbsp; new msg&#91;256&#93;&nbsp; &nbsp; new len&nbsp; &nbsp; new maxpl = get_maxplayers&#40;&#41;&nbsp; &nbsp; for&#40;new i = 1; i <= maxpl; i++&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; if&#40;is_user_connected&#40;i&#41; && !is_user_bot&#40;i&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len = formatex&#40;msg, charsmax&#40;msg&#41;, "%L", i, "BAN"&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += formatex&#40;msg&#91;len&#93;, charsmax&#40;msg&#41; - len, " %s ", name2&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;nNum&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += formatex&#40;msg&#91;len&#93;, charsmax&#40;msg&#41; - len, "%L", i, "FOR_MIN", minutes&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += formatex&#40;msg&#91;len&#93;, charsmax&#40;msg&#41; - len, "%L", i, "PERM"&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;strlen&#40;reason&#41; > 0&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; formatex&#40;msg&#91;len&#93;, charsmax&#40;msg&#41; - len, " (%L: %s)", i, "REASON", reason&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; show_activity_id&#40;i, id, name, msg&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &#125;&nbsp; &nbsp; console_print&#40;id, "[AMXX] %L", id, "CLIENT_BANNED", name2&#41;#endif&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;public cmdBanMenu&#40;id, level, cid&#41;&#123;&nbsp; &nbsp; if &#40;!cmd_access&#40;id, level, cid, 1&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&nbsp; &nbsp; g_menuOption&#91;id&#93; = 0&nbsp;&nbsp; &nbsp; if &#40;ArraySize&#40;g_bantimes&#41; > 0&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; g_menuSettings&#91;id&#93; = ArrayGetCell&#40;g_bantimes, g_menuOption&#91;id&#93;&#41;&nbsp; &nbsp; &#125;&nbsp; &nbsp; else&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; // should never happen, but failsafe&nbsp; &nbsp; &nbsp; &nbsp; g_menuSettings&#91;id&#93; = 0&nbsp; &nbsp; &#125;&nbsp; &nbsp; displayMenu&#40;id, g_menuPosition&#91;id&#93; = 0&#41;&nbsp;&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;public cmdSSMenu&#40;id, level, cid&#41;&#123;&nbsp; &nbsp; if &#40;!cmd_access&#40;id, level, cid, 1&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED&nbsp;&nbsp; &nbsp; g_menuOption&#91;id&#93; = 0&nbsp;&nbsp; &nbsp; g_menuSettings&#91;id&#93; = -1&nbsp; &nbsp; displayMenu&#40;id, g_menuPosition&#91;id&#93; = 0&#41;&nbsp;&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;displayMenu&#40;id, pos&#41;&#123;&nbsp; &nbsp; if &#40;pos < 0&#41;&nbsp; &nbsp; &nbsp; &nbsp; return&nbsp;&nbsp; &nbsp; get_players&#40;g_menuPlayers&#91;id&#93;, g_menuPlayersNum&#91;id&#93;&#41;&nbsp;&nbsp; &nbsp; new menuBody&#91;512&#93;&nbsp; &nbsp; new b = 0&nbsp; &nbsp; new i&nbsp; &nbsp; new name&#91;32&#93;&nbsp; &nbsp; new start = pos * 7, len&nbsp;&nbsp; &nbsp; if &#40;start >= g_menuPlayersNum&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; start = pos = g_menuPosition&#91;id&#93; = 0&nbsp;&nbsp; &nbsp; len = format&#40;menuBody, 511, "\y%L\R%d/%d^n\w^n", id, g_menuSettings&#91;id&#93; == -1 ? "SS_MENU" : "SSBAN_MENU", pos + 1, &#40;g_menuPlayersNum&#91;id&#93; / 7 + &#40;&#40;g_menuPlayersNum&#91;id&#93; % 7&#41; ? 1 : 0&#41;&#41;&#41;&nbsp;&nbsp; &nbsp; new end = start + 7&nbsp; &nbsp; new keys = MENU_KEY_0&nbsp;&nbsp; &nbsp; if &#40;end > g_menuPlayersNum&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; end = g_menuPlayersNum&#91;id&#93;&nbsp;&nbsp; &nbsp; for &#40;new a = start; a < end; ++a&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; i = g_menuPlayers&#91;id&#93;&#91;a&#93;&nbsp; &nbsp; &nbsp; &nbsp; get_user_name&#40;i, name, 31&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if &#40;is_user_bot&#40;i&#41; || &#40;access&#40;i, ADMIN_IMMUNITY&#41; && i != id&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++b&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += format&#40;menuBody&#91;len&#93;, 511-len, "\d%d. %s^n\w", b, name&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125; else &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; keys |= &#40;1<<b&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &#40;is_user_admin&#40;i&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += format&#40;menuBody&#91;len&#93;, 511-len, "%d. %s \r*^n\w", ++b, name&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += format&#40;menuBody&#91;len&#93;, 511-len, "%d. %s^n", ++b, name&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; if&#40;g_menuSettings&#91;id&#93; != -1&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; if &#40;g_menuSettings&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += format&#40;menuBody&#91;len&#93;, 511-len, "^n8. %L^n", id, "BAN_FOR_MIN", g_menuSettings&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; len += format&#40;menuBody&#91;len&#93;, 511-len, "^n8. %L^n", id, "BAN_PERM"&#41;&nbsp; &nbsp; &nbsp; &nbsp; keys |= MENU_KEY_8&nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; if &#40;end != g_menuPlayersNum&#91;id&#93;&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; format&#40;menuBody&#91;len&#93;, 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT"&#41;&nbsp; &nbsp; &nbsp; &nbsp; keys |= MENU_KEY_9&nbsp; &nbsp; &#125;&nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; format&#40;menuBody&#91;len&#93;, 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT"&#41;&nbsp;&nbsp; &nbsp; show_menu&#40;id, keys, menuBody, -1, "SS Menu"&#41;&#125;&nbsp;public actionMenu&#40;id, key&#41;&#123;&nbsp; &nbsp; switch &#40;key&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; case 7:&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++g_menuOption&#91;id&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g_menuOption&#91;id&#93; %= ArraySize&#40;g_bantimes&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g_menuSettings&#91;id&#93; = ArrayGetCell&#40;g_bantimes, g_menuOption&#91;id&#93;&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; displayMenu&#40;id, g_menuPosition&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &nbsp; &nbsp; case 8: displayMenu&#40;id, ++g_menuPosition&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; case 9: displayMenu&#40;id, --g_menuPosition&#91;id&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; default:&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new player = g_menuPlayers&#91;id&#93;&#91;g_menuPosition&#91;id&#93; * 7 + key&#93;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new minutes&#91;8&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_to_str&#40;g_menuSettings&#91;id&#93;, minutes, 7&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; copy&#40;g_szBanTime&#91;id&#93;, 7, minutes&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; copy&#40;g_szBanReason&#91;id&#93;, 31, "_BanReason"&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new Param&#91;2&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Param&#91;0&#93; = id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Param&#91;1&#93; = player&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_task&#40;Float:get_pcvar_float&#40;g_DelaySS&#41;, "SS_Task", 0, Param,2, "a", get_pcvar_num&#40;g_SnapShot&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;g_menuSettings&#91;id&#93; != -1&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; messagemode_reason&#40;id&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set_task&#40;Float:get_pcvar_float&#40;g_DelayBan&#41;, "BanSS_Task", 0, Param, 2&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // displayMenu(id, g_menuPosition[id]) // Uncomment this line to make menu remain open after banning&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;messagemode_reason&#40;id&#41;&#123;&nbsp; &nbsp; formatex&#40;g_szBanReason&#91;id&#93;, charsmax&#40;g_szBanReason&#91;&#93;&#41;, "%L", id, "NO_REASON_MENU"&#41;&nbsp; &nbsp; &nbsp; &nbsp; new name&#91;32&#93;&nbsp; &nbsp; get_user_name&#40;id, name, 31&#41;&nbsp; &nbsp; &nbsp; &nbsp; set_hudmessage&#40;255, 0, 0, 0.0, 0.24, 1, 6.0, 12.0&#41;&nbsp; &nbsp; show_hudmessage&#40;id, "%L", id, "REASON_HUDASK", name&#41;&nbsp; &nbsp; &nbsp; &nbsp; client_cmd&#40;id, "messagemode _BanReason"&#41;&#125;&nbsp;public cmdBanReason&#40;id&#41;&#123;&nbsp; &nbsp; // Client has submitted reason.&nbsp; &nbsp; new szArg&#91;sizeof&#40;g_szBanReason&#91;&#93;&#41;&#93;&nbsp; &nbsp; read_args&#40;szArg, charsmax&#40;szArg&#41;&#41;&nbsp; &nbsp; remove_quotes&#40;szArg&#41;&nbsp;&nbsp; &nbsp; if&#40;szArg&#91;0&#93;&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; formatex&#40;g_szBanReason&#91;id&#93;, charsmax&#40;g_szBanReason&#91;&#93;&#41;, szArg&#41;&nbsp; &nbsp; &#125;&nbsp; &nbsp; return PLUGIN_HANDLED&#125;&nbsp;public ssbanmenu_setbantimes&#40;&#41;&#123;&nbsp; &nbsp; new buff&#91;32&#93;&nbsp; &nbsp; new args = read_argc&#40;&#41;&nbsp;&nbsp; &nbsp; if &#40;args <= 1&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; server_print&#40;"usage: amx_ssbantimes <time1> [time2] [time3] ..."&#41;&nbsp; &nbsp; &nbsp; &nbsp; server_print&#40;" &nbsp; use time of 0 for permanent."&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; return&nbsp; &nbsp; &#125;&nbsp;&nbsp; &nbsp; ArrayClear&#40;g_bantimes&#41;&nbsp;&nbsp; &nbsp; for &#40;new i = 1; i < args; i++&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; read_argv&#40;i, buff, charsmax&#40;buff&#41;&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; ArrayPushCell&#40;g_bantimes, str_to_num&#40;buff&#41;&#41;&nbsp;&nbsp; &nbsp; &#125;&nbsp;&#125;&nbsp;/* Stock colors for chat messages */stock client_printc&#40;const id, const string&#91;&#93;, &#123;Float, Sql, Resul,_&#125;:...&#41; &#123;&nbsp;&nbsp; &nbsp; new msg&#91;191&#93;, players&#91;32&#93;, count = 1&nbsp; &nbsp; vformat&#40;msg, sizeof msg - 1, string, 3&#41;&nbsp;&nbsp; &nbsp; replace_all&#40;msg,190,"!g","^4"&#41;&nbsp; &nbsp; replace_all&#40;msg,190,"!y","^1"&#41;&nbsp; &nbsp; replace_all&#40;msg,190,"!t","^3"&#41;&nbsp;&nbsp; &nbsp; if&#40;id&#41;&nbsp; &nbsp; &nbsp; &nbsp; players&#91;0&#93; = id&nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; get_players&#40;players,count,"ch"&#41;&nbsp;&nbsp; &nbsp; for &#40;new i = 0 ; i < count ; i++&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; if &#40;is_user_connected&#40;players&#91;i&#93;&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message_begin&#40;MSG_ONE_UNRELIABLE, g_SayText,_, players&#91;i&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; write_byte&#40;players&#91;i&#93;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; write_string&#40;msg&#41;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message_end&#40;&#41;&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; &nbsp; &#125;&#125;/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }*/&nbsp;
-- 2014 Rgs 18 13:39 --

Tiesiog su tuo kodu kur davei nors ir parasai amx_ss nick 2 daro po 6 ss, ir nera amx_ssmenu

-- 2014 Rgs 26 11:21 --

Bus pagalbos ?:)
CS.PRIEALAUS.LT užsidarėm
GAMEBANANA.LT užsidarėm
CounterLAND.LT užsidarėm
HLTV.LT užsidarėm

MIXMAKER
Jau atvyksta..

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests