Nu te inregistra daca esti idiot sau agramat!


AlphaCS.RO[ORIGINAL GAMING]


Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    User Info Menu

    Cerere sami faceti pluginu .sma sau .amxx

    Salut puteti va rog sami faceti si mie un plugin .sma sau .amxx da apoi daca vreau sa modific sal pot modifica dar daca il poti modifica un pic in loc de x2jump sa aiba x3 jump

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

    #define PLUGIN "New Plug-In"
    #define VERSION "1.0"
    #define AUTHOR "D3luxe"
    #define COLOR "^x04"

    new const g_szFileName [ ] = "vip_list.ini"
    new g_szFile[ 128 ];
    new Trie: g_tVipList
    new bool:is_user_vip[33] = false;
    new jumpnum[33] = 0;
    new bool:dojump[33] = false;

    public plugin_init()
    {
    register_plugin(PLUGIN, VERSION, AUTHOR);
    register_clcmd("say /vips","show_listvip");
    RegisterHam(Ham_Spawn,"player","iteme_spawn",1);
    RegisterHam(Ham_Killed, "player", "Killed");
    RegisterHam(Ham_TakeDamage, "player", "DmgVIP");
    }
    public plugin_precache()
    {
    precache_model("models/player/modelvipct/modelvipct.mdl");
    precache_model("models/player/modelvipt/modelvipt.mdl");
    g_tVipList = TrieCreate();
    }
    public DmgVIP(victim,inflictor,attacker,Float:damage,Dama gebits,bits)
    {
    if(!is_user_alive(attacker) || !is_user_alive(victim))
    return HAM_IGNORED;
    if(is_user_vip[attacker])
    SetHamParamFloat(4,damage*2);
    return HAM_IGNORED;
    }
    public iteme_spawn(id)
    {
    if(is_user_alive(id) && is_user_connected(id) && is_user_vip[id])
    {
    if(get_user_team(id) == 2)
    {
    set_user_info(id,"model","modelvipct");
    if(!cs_get_user_defuse(id))
    cs_set_user_defuse(id);
    }else if(get_user_team(id) == 1) set_user_info(id,"model","modelvipt");
    give_item(id,"weapon_hegrenade");
    give_item(id,"weapon_smokegrenade");
    give_item(id,"weapon_flashbang");
    set_user_health(id,150);
    set_user_armor(id,200);
    set_user_maxspeed(id,400.0);
    set_user_gravity(id,0.3);
    }
    }
    public Killed(victim, attacker, shouldgib)
    {
    if(!is_user_alive(attacker) || !is_user_connected(attacker)) return HAM_IGNORED
    if(get_pdata_int(victim, 75) == HIT_HEAD)
    {
    set_user_health(attacker,get_user_health(attacker) + clamp(25,0,300));
    cs_set_user_money(attacker,cs_get_user_money(attac ker) + clamp(1000,0,16000));
    }else{
    set_user_health(attacker,get_user_health(attacker) + clamp(15,0,300));
    cs_set_user_money(attacker,cs_get_user_money(attac ker) + clamp(500,0,16000));
    }
    return HAM_IGNORED
    }

    public client_putinserver(id)
    {
    jumpnum[id] = 0
    dojump[id] = false
    }
    public client_disconnect(id)
    {
    jumpnum[id] = 0
    dojump[id] = false
    }
    public client_PreThink(id)
    {
    if(!is_user_alive(id)) return PLUGIN_CONTINUE
    if(!is_user_vip[id]) return PLUGIN_CONTINUE
    new nbut = get_user_button(id)
    new obut = get_user_oldbutton(id)
    if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
    {
    if(jumpnum[id] < 2)
    {
    dojump[id] = true
    jumpnum[id]++
    return PLUGIN_CONTINUE
    }
    }
    if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
    jumpnum[id] = 0
    return PLUGIN_CONTINUE
    }
    return PLUGIN_CONTINUE
    }
    public client_PostThink(id)
    {
    if(!is_user_alive(id)) return PLUGIN_CONTINUE
    if(!is_user_vip[id]) return PLUGIN_CONTINUE
    if(dojump[id] == true)
    {
    new Float:velocity[3]
    entity_get_vector(id,EV_VEC_velocity,velocity)
    velocity[2] = random_float(265.0,285.0)
    entity_set_vector(id,EV_VEC_velocity,velocity)
    dojump[id] = false
    return PLUGIN_CONTINUE
    }
    return PLUGIN_CONTINUE
    }
    public plugin_cfg( )
    {
    new szDir[ 128 ];
    get_configsdir( szDir, charsmax( szDir ) );

    formatex( g_szFile, charsmax( g_szFile ), "%s/%s", szDir, g_szFileName );

    if ( !file_exists( g_szFile ) )
    {
    new fp = fopen( g_szFile, "a+" );
    if( fp )
    {
    fputs( fp, "; ================================================== =========^n" );
    fputs( fp, "; --------------------- VIP LIST ----------------------------^n" );
    fputs( fp, "; ================================================== =========^n" );
    fputs( fp, "; Nota: Incepe randul cu ^";^" pentru a dezactiva un VIP^n" );
    fputs( fp, "^b" );
    }

    fclose( fp );
    }

    ReadIniFile( )
    }
    public plugin_end( )
    {
    TrieDestroy( g_tVipList )
    }
    ReadIniFile( )
    {
    new fp = fopen( g_szFile , "rt" );
    if( !fp )
    {
    return 0;
    }

    new szData[ 256 ], i;

    while( !feof( fp ) )
    {
    fgets( fp, szData, charsmax( szData ) );
    trim( szData );

    if( !szData[ 0 ] || szData[ 0 ] == ';' || szData[ 0 ] == '#' || (szData[ 0 ] == '/' && szData[ 1 ] == '/'))
    {
    continue;
    }

    TrieSetCell( g_tVipList, szData, i )
    i ++
    }

    return 0
    }
    public client_connect( id )
    {
    new szName[ 32 ]; get_user_name( id, szName, charsmax( szName ) )
    if( TrieKeyExists( g_tVipList, szName ) )
    {
    is_user_vip[ id ] = true;
    }
    }
    public show_listvip(user)
    {
    new adminnames[33][32]
    new message[256]
    new id, count, x, len

    for(id = 1 ; id <= get_maxplayers() ; id++)
    {
    if(is_user_connected(id) && is_user_vip[id])
    get_user_name(id, adminnames[count++], 31)
    }
    len = format(message, 255, "%s Vips Online: ",COLOR)
    if(count > 0) {
    for(x = 0 ; x < count ; x++) {
    len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? "|":"")
    if(len > 96 ) {
    print_message(user, message)
    len = format(message, 255, "%s ",COLOR)
    }
    }
    print_message(user, message)
    }
    else {
    len += format(message[len], 255-len, "Nici un VIP Online !")
    print_message(user, message)
    }

    }
    print_message(id, msg[]) {
    message_begin(MSG_ONE,get_user_msgid("SayText"), {0,0,0}, id)
    write_byte(id)
    write_string(msg)
    message_end()
    }
    Last edited by Lexxu.; 09-08-15 at 06:24.

Similar Threads

  1. Cerere .amxx & .sma
    By Citadel in forum Suport CS
    Replies: 3
    Last Post: 10-12-15, 07:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •