[ Plugins ] - CS2 Cards - Plugins - GAMELIFE România Jump to content

Recommended Posts

  • Administrators
Posted

CS2 Cards


 

Nume: CS2 Card
Versiune: v.2.0
Autor: Yvezzaint

 

Instalare:
1. Fisierul cs2-cards.amxx il puneti in addons/amxmodx/plugins
2. Folderul sprites il puneti in cstrike
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Quote

cs2-cards.amxx

 

2jav9vS.jpeg


 

Donator: SteamDB

Donator: SteamLadder

Steam Level Up: https://slvlup.com/r/krrna6

Steam™ Hour Boosting!: https://freehourboost.com/?r=cosminzm

3177671.png

  • 11 months later...
  • Members
Posted

The plugin is good, but the cards don't reset after the round changes — they only reset when the player dies, which ends up causing an accumulation of cards from previous rounds.

Is it possible to fix it?

  • Administrators
Posted

i dont have source sma but if u find :  add this :

 

register_logevent("@RoundStart", 2, "1=Round_Start");
public @RoundStart()
{
    isDef = 0;
    isPlant = 0;

    new players[32], pnum;
    get_players(players, pnum, "ah");

    for (new i = 0; i < pnum; i++) {
        new id = players[i];
        kills[id] = 0;
        isKnife[id] = 0;
        isGrenade[id] = 0;
        isHeadshot[id] = 0;
        @SetSprite(id); 
    }
}

@ aEEk.# @ @LeX corecteaza ma daca gresesc !

  • Congrats ! 1

Blog personal : https://www.facebook.com/jurnalulunuivisator/

Canal youtube : https://www.youtube.com/gabytzuspecial

Grup muzica : https://www.facebook.com/groups/muzica2025

 

FQ9snHC.gif

  • Administrators
Posted
4 hours ago, th3#afk said:

 

Uite sursa! DAca stii sa modifici !
Eu nu am timp! Pe respawn merge perfect! Si e acelasi plugin!
https://pastebin.com/r71Z2je1

 

Donator: SteamDB

Donator: SteamLadder

Steam Level Up: https://slvlup.com/r/krrna6

Steam™ Hour Boosting!: https://freehourboost.com/?r=cosminzm

3177671.png

  • Administrators
Posted

#include < amxmodx >
#include < cstrike >
#include < reapi >

new kills[ 33 ];

enum _:MESSAGES {
    MSG_wpnlist,
    MSG_curwpn,
    MSG_setfov,
    MSG_hide
}

new Hooked_Msgs[ MESSAGES ];

new const Hooked_Msgs_Name[ MESSAGES ][ ] = {
    "WeaponList", "CurWeapon", "SetFOV", "HideWeapon"
}

new const sprites[ ][ ] = {
    "kill_1", "kill_2", "kill_3", "kill_4",
    "kill_5", "kill_6", "kill_7", "kill_8",
    "kill_9", "kill_10", "kill_knife", "kill_combo",
    "kill_he", "kill_headshot", "c4_set", "c4_defuse"
}

new isKnife[ 33 ], isGrenade[ 33 ], isHeadshot[ 33 ], isDef, isPlant;

public plugin_init()
{
    register_plugin("CS2: Cards", "1.1", "Yvezzaint + GameLife");
    RegisterHookChain( RG_CBasePlayer_Killed, "@PlayerKilled", true );

    register_event( "CurWeapon", "@SetSprite", "be", "1=1" );
    register_event( "TextMsg", "@BombPlanted", "a", "2&%!MRAD_BOMBPL" );
    register_event( "TextMsg", "@BombDefused", "a", "2&%!MRAD_BOMBDEF" );
    register_logevent("@RoundStart", 2, "1=Round_Start");

    for( new i = 0; i < sizeof Hooked_Msgs; i++ )
        Hooked_Msgs[ i ] = get_user_msgid( Hooked_Msgs_Name[ i ] );
}

public plugin_precache()
{
    for (new i = 0; i < sizeof sprites; i++)
    {
        precache_model( fmt( "sprites/combo_cards/%s.spr", sprites[ i ] ) );
        precache_generic( fmt( "sprites/combo_cards/%s.txt", sprites[ i ] ) );
    }
}

public @RoundStart()
{
    isDef = 0;
    isPlant = 0;

    new players[32], pnum;
    get_players(players, pnum, "ach");

    for (new i = 0; i < pnum; i++) {
        new id = players[i];
        kills[id] = 0;
        isKnife[id] = 0;
        isGrenade[id] = 0;
        isHeadshot[id] = 0;
        @SetSprite(id);
    }
}

public client_putinserver( id )
{
    kills[ id ] = 0;
    isKnife[ id ] = 0;
    isGrenade[ id ] = 0;
    isHeadshot[ id ] = 0;
}

public client_disconnected( id )
{
    kills[ id ] = 0;
    isKnife[ id ] = 0;
    isGrenade[ id ] = 0;
    isHeadshot[ id ] = 0;
}

public @PlayerKilled( iVictim, iKiller )
{
    if( !is_user_connected( iKiller ) )
        return HC_CONTINUE;

    if( iVictim == iKiller )
    {
        kills[ iVictim ] = 0;
        return HC_CONTINUE;
    }

    kills[ iVictim ] = 0;
    kills[ iKiller ] += 1;

    if( get_user_weapon( iKiller ) == CSW_KNIFE )
        isKnife[ iKiller ] = 1;
    else if( get_member( iVictim, m_bKilledByGrenade ) )
        isGrenade[ iKiller ] = 1;
    else if( get_member( iVictim, m_bHeadshotKilled ) )
        isHeadshot[ iKiller ] = 1;

    @SetSprite( iKiller );
    return HC_CONTINUE;
}

public @BombPlanted()
{
    isPlant = 1;
    TrigerAll();
}

public @BombDefused()
{
    isDef = 1;
    TrigerAll();
}

public @Reset( id )
{
    isDef = 0;
    isPlant = 0;
    isKnife[ id ] = 0;
    isGrenade[ id ] = 0;
    isHeadshot[ id ] = 0;
    @SetSprite( id );
}

public @SetSprite( id )
{
    if( kills[ id ] == 0 && !isKnife[ id ] && !isGrenade[ id ] && !isHeadshot[ id ] && !isDef && !isPlant )
        return PLUGIN_CONTINUE;

    if( cs_get_user_zoom( id ) != CS_SET_NO_ZOOM )
        return PLUGIN_CONTINUE;

    new wpn = get_user_weapon( id );
    if( wpn == CSW_AWP || wpn == CSW_SCOUT || wpn == CSW_G3SG1 || wpn == CSW_SG550 )
    {
        message_begin( MSG_ONE_UNRELIABLE, Hooked_Msgs[ MSG_hide ], _, id );
        write_byte( ( 1 << 6 ) );
        message_end();
    } else {
        message_begin( MSG_ONE_UNRELIABLE, Hooked_Msgs[ MSG_hide ], _, id );
        write_byte( 0 );
        message_end();
    }

    new Weapon, ammo, sprtxt[ 80 ];
    Weapon = get_user_weapon( id, ammo );

    switch( kills[ id ] )
    {
        case 1: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_1");
        case 2: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_2");
        case 3: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_3");
        case 4: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_4" );
        case 5: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_5" );
        case 6: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_6" );
        case 7: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_7" );
        case 8: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_8" );
        case 9: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_9" );
        case 10: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_10" );
        default: formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_combo" );
    }

    if( isPlant == 1 )
        formatex( sprtxt, charsmax( sprtxt ), "combo_cards/c4_set");
    else if( isDef == 1 )
        formatex( sprtxt, charsmax( sprtxt ), "combo_cards/c4_defuse");
    else if( isHeadshot[id] == 1 )
        formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_headshot");
    else if( isGrenade[id] == 1 )
        formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_he");
    else if( isKnife[id] == 1)
        formatex( sprtxt, charsmax( sprtxt ), "combo_cards/kill_knife");

    if( isKnife[ id ] || isGrenade[ id ] || isHeadshot[ id ] || isDef || isPlant )
        set_task( 3.0, "@Reset", id );

    Msg_SetFOV( id, 89 );
    Msg_CurWeapon( id, 1, 2, ammo );
    Msg_SetFOV( id, 90 );

    return PLUGIN_CONTINUE;
}

stock TrigerAll()
{
    new iPlayers[ 32 ], iPnum;
    get_players( iPlayers, iPnum, "achi" )

    for(new i = 0; i < iPnum; i++)
        @SetSprite( iPlayers[ i ] )
}

stock Msg_CurWeapon(id, IsActive, WeaponID, ClipAmmo)
{
    message_begin( MSG_ONE_UNRELIABLE, Hooked_Msgs[ MSG_curwpn ], { 0, 0, 0 }, id );
    write_byte( IsActive );
    write_byte( WeaponID );
    write_byte( ClipAmmo );
    message_end();
}

stock Msg_SetFOV( id, Degrees )
{
    message_begin( MSG_ONE_UNRELIABLE, Hooked_Msgs[ MSG_setfov ], { 0, 0, 0 }, id );
    write_byte( Degrees );
    message_end();
}

 

Blog personal : https://www.facebook.com/jurnalulunuivisator/

Canal youtube : https://www.youtube.com/gabytzuspecial

Grup muzica : https://www.facebook.com/groups/muzica2025

 

FQ9snHC.gif

  • Members
Posted (edited)

@ th3#afk

Unfortunately, the plugin bugged. After killing the first person, the kill card already shows 2 kills and it stays stuck on the 2-kill card regardless of how many people are killed. Also, the headshot/knife/grenade cards no longer appear.
 

Another bug also occurred: after picking up a dropped weapon from the ground, it comes with 0 reserve ammo.
 

Is it possible for spectators to see the player's kill card progression?

Edited by Filth
  • Like 1
  • Administrators
Posted

only if @ @LeX or @ aEEk.# try to make this !

  • Like 1

Blog personal : https://www.facebook.com/jurnalulunuivisator/

Canal youtube : https://www.youtube.com/gabytzuspecial

Grup muzica : https://www.facebook.com/groups/muzica2025

 

FQ9snHC.gif

  • Administrators
Posted
17 hours ago, Filth said:

 

Unfortunately, the plugin bugged. After killing the first person, the kill card already shows 2 kills and it stays stuck on the 2-kill card regardless of how many people are killed. Also, the headshot/knife/grenade cards no longer appear.
 

Another bug also occurred: after picking up a dropped weapon from the ground, it comes with 0 reserve ammo.
 

 

This is not related to the respective plugin!

The part with ammo reserve is related to your server! You get full support when you bring your server to our community.

The cs2 card plugin now works on my server! Go and test: respawn.gamelife.ro:27015

  • Fortzaa 2

Donator: SteamDB

Donator: SteamLadder

Steam Level Up: https://slvlup.com/r/krrna6

Steam™ Hour Boosting!: https://freehourboost.com/?r=cosminzm

3177671.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...

Important Information