•  
     

sma do sXe Screenshot

Código: Selecionar todos

#include <amxmodx>
#include <amxmisc>

#pragma semicolon 1

new const Head[] = "[sxe injetado]";

public plugin_init()
{
    register_plugin("sxe Injetado Gerenciador",AMXX_VERSION_STR,"me$tre");
    
    register_clcmd("amx_sxe_menu","sXeMenu",ADMIN_MENU,"[sxe injetado] Menu principal para sxe injetado");
    register_clcmd("amx_sxe_ss_menu","sXeSSMenu",ADMIN_KICK,"[sxe injetado] Marcar SS em um jogador escolhido");
    register_clcmd("amx_sxe_ban_menu","sXeBanMenu",ADMIN_BAN,"[sxe injetado] Banir jogador por Hardware ID");
}

public sXeMenu(id,level,cid)
{
    if(!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED;
    
    new m_sXe = menu_create("sxe injetado Menu:","sXeHandler");
    
    menu_additem(m_sXe,"sXe Screenshot","0",0);
    menu_additem(m_sXe,"sXe Hardware Ban","1",0);
    
    menu_display(id,m_sXe,0);
    return PLUGIN_HANDLED;
}
    
public sXeHandler(id,m_sXe,item)
{
    if(item == MENU_EXIT) return PLUGIN_HANDLED;
    
    new data[6],szName[32];
    new access,callback;
    menu_item_getinfo(m_sXe,item,access,data,charsmax(data),szName,charsmax(szName),callback);
    
    switch(str_to_num(data))
    {
        case 0:
        {
            client_cmd(id,"amx_sxe_ss_menu");
            return PLUGIN_HANDLED;
        }
        case 1:
        {
            client_cmd(id,"amx_sxe_ban_menu");
            return PLUGIN_HANDLED;
        }
    }
    return PLUGIN_HANDLED;
}
    
public sXeSSMenu(id,level,cid)
{
    if(!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED;
    
    new m_SS = menu_create("sXe Screen Shot:","SSHandler");
    new Name[32],ID[10];
    
    new iPlayers[32],iNum,Players;
    get_players(iPlayers,iNum,"ch");
    
    for(new i;i < iNum;i++)
    {
        Players = iPlayers[i];
        
        if(Players == id) continue;
        
        get_user_name(Players,Name,charsmax(Name));
        num_to_str(Players,ID,charsmax(ID));
        
        menu_additem(m_SS,Name,ID,0);
    }
    menu_display(id,m_SS,0);
    return PLUGIN_HANDLED;
}

public SSHandler(id,m_SS,item)
{
    if(item == MENU_EXIT) return PLUGIN_HANDLED;
    
    new data[6],szName[32];
    new access,callback;
    menu_item_getinfo(m_SS,item,access,data,charsmax(data),szName,charsmax(szName),callback);
    
    new ID = str_to_num(data);
    
    if(!is_user_connected(ID))
    {
        client_print(id,print_chat,"%s desculpe, usuario disconectado..",Head);
        return PLUGIN_HANDLED;
    }
    server_cmd("sxe_screen #%d #%d", get_user_userid(ID), get_user_userid(id));
    
    client_print(id,print_chat,"%s Envie screenshot.",Head);
    
    menu_destroy(m_SS);
    return PLUGIN_HANDLED;
}

public sXeBanMenu(id,level,cid)
{
    if(!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED;
    
    new m_Ban = menu_create("sXe Ban Menu:","BanHandler");
    
    new Name[32],ID[10];
    
    new iPlayers[32],iNum,Players;
    get_players(iPlayers,iNum,"ch");
    
    for(new i;i < iNum;i++)
    {
        Players = iPlayers[i];
        
        if(Players == id) continue;
        
        get_user_name(Players,Name,charsmax(Name));
        num_to_str(Players,ID,charsmax(ID));
        
        menu_additem(m_Ban,Name,ID,0);
    }
    menu_display(id,m_Ban,0);
    return PLUGIN_HANDLED;
}

public BanHandler(id,m_Ban,item)
{
    if(item == MENU_EXIT) return PLUGIN_HANDLED;
    
    new data[6],szName[32];
    new access,callback;
    menu_item_getinfo(m_Ban,item,access,data,charsmax(data),szName,charsmax(szName),callback);
    
    new ID = str_to_num(data);

    if(!is_user_connected(ID))
    {
        client_print(id,print_chat,"%s desculpe, usuario disconectado..",Head);
        return PLUGIN_HANDLED;
    }
    new Name[32];
    get_user_name(ID,Name,charsmax(Name));
    
    client_print(0,print_chat,"%s %s foi BANIDO por Hardware ID.",Head,Name);
    
    server_cmd("sxe_ban #%d",get_user_userid(ID));
    
    menu_destroy(m_Ban);
    return PLUGIN_HANDLED;
}