Jump to content
Sign in to follow this  
AnnDy.

[INCOMPLET] Cerere plugin.

Recommended Posts

Nume : Habar n-am cum se numeste.


Versiune : Nu conteaza ..


Descriere detaliata : Comenzile /t care te muta la Teroristi


/ct sa te mute la Counter Tero


/spec sa te mute la Specator


Sa nu fie comenzi de admin, sa le poate scrie orice pe chat si sa-si schimbe echipa, un link ceva? Multumesc


Share this post


Link to post
Share on other sites

Nu ai voie decat sa faci o cerere odata la 3 zile ,citeste regulamentul .incearca asta ,nu am testat-o.

lasa-mi un replay daca merge

 

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
#define PLUGIN "plugin_comenzi"
#define VERSION "1.0"
#define AUTHOR "Rusu"  //update CoD2.0
 
public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
 
    register_clcmd("say /spec","spec");
    register_clcmd("say_team /spec","spec");
    register_clcmd("say /ct","ct");
    register_clcmd("say_team /ct","ct");
    register_clcmd("say /t","t")
    register_clcmd("say_team /t","t")
    register_concmd ( "amx_t", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Teroristi" );
    register_concmd ( "amx_ct", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Counter-Teroristi" );
    register_concmd ( "amx_spec", "swap_team", ADMIN_KICK, "<name> - mutare jucator la Spectatori" );
 
    set_task( 100.0, "mesaj", 0, "", 0, "b" );
}
 
public spec(id)
{
    cs_set_user_team(id,CS_TEAM_SPECTATOR);
 
    if(is_user_alive(id))
    user_silentkill(id);
 
    return PLUGIN_CONTINUE;
}
 
public ct(id)
{
    cs_set_user_team(id,CS_TEAM_CT);
    user_silentkill(id);
 
    return PLUGIN_CONTINUE;
}
 
public t(id)
{
    cs_set_user_team(id,CS_TEAM_T);
    user_silentkill(id);
 
    return PLUGIN_CONTINUE;
}
 
public mesaj()
{
    client_print(0, print_chat, "Tasteaza in chat /comenzi pentr a vedea o lista cu comenzile tale !");
}
 
public comenzi(id)
{
    console_print( id, "---- Comenzi disponibile pe server ----" );
    console_print( id, "---------------------------------------" );
    console_print( id, "/spec - pe say & say_team si te transferi la spectatori" );
    console_print( id, "/ct - pe say & say_team si te transferi la CT" );
    console_print( id, "/t - pe say & say_team si te transferi la tero" );
 
    client_cmd( id, "toggleconsole" );
 
    return PLUGIN_HANDLED;
}
 
 
public swap_team ( id, level, cid ) {
    if( ! cmd_access ( id, level, cid, 2 ) )
        return PLUGIN_HANDLED;
    
    new szArg[ 10 ], target[ 32 ], szPlayerName[ 32 ], szAdminName[ 32 ];
    
    read_argv( 0, szArg, 9 );
    read_argv( 1, target, 31 );
    
    new player = cmd_target ( id, target, 11 );
    
    if( ! player ) 
        return PLUGIN_HANDLED;
    
    get_user_name ( player, szPlayerName, 31 );
    get_user_name ( id, szAdminName, 31 );
    
    switch ( szArg[ 4 ] ) {
        case 't': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 1 );
            show_activity ( id, szAdminName, "mutare %s la Teroristi.", szPlayerName );
        }
        
        
        case 'c': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 2 );
            show_activity ( id, szAdminName, "mutare %s la Counter-Teroristi.", szPlayerName );
        }
        
        case 's': 
        {
            user_silentkill ( player );
            cs_set_user_team ( player, 3 );
            show_activity ( id, szAdminName, "mutare %s la Spectatori.", szPlayerName );
        }
        
    }
    
    return PLUGIN_CONTINUE;
}
  • Like 1

Share this post


Link to post
Share on other sites
 
Instalare:
1. Fisierul .sma il puneti inaddons/amxmodx/scripting
2. Fisierul .amxx il puneti inaddons/amxmodx/plugins
3. Fisierul colorchat.inc il puneti inaddons/amxmodx/scripting/include
4. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma: numelelui.amxx



4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):

Nu necesita


Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
Nu necesita




Comenzi publice (se tasteaza in joc prin apasarea tastei Y):

/t: Te muti la Teroristi
/ct: te muti la Counter teroristi
/spec: Te muti la Spectatori
/cs: Daca esti spectator te baga la o echipa aleatorie

Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):

cstrike
csdm

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×