Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSModel for deagle


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hi, I need to add model to this deagle. (v_model)
Could someone help me ?

PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>


#define DEAGLE_COST 16000

#define IsPlayer(%0)    ( 1 <= %0 <= MaxPlayers )

native fcs_get_user_credits Index );
native fcs_set_user_credits IndexAmount );

const 
SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)

new 
boolHasDeagle [33], MaxPlayers;

public 
plugin_init (  )
{
    
RegisterHam Ham_Spawn"player""HamPlayerSpawnPost");

    
RegisterHam Ham_TakeDamage"player""HamPlayerTakeDamage" );

    
register_clcmd "say /deagle""ClCmdDeagle", -);

    
MaxPlayers get_maxplayers (  );
}

public 
client_putinserver id HasDeagle [id] = false;

public 
ClCmdDeagle id )
{
    if ( 
cs_get_user_team id ) != CS_TEAM_CT )
    {
        
client_print idprint_chat"U have to be CT" );

        return 
PLUGIN_HANDLED;
    }

    if ( 
fcs_get_user_credits id ) < DEAGLE_COST )
    {
        
client_print idprint_chat"Not enough credits. U need %d more."DEAGLE_COST fcs_get_user_credits id ) );

        return 
PLUGIN_HANDLED;
    }

    if ( 
HasDeagle [id] )
    {
        
client_print idprint_chat"U used this already!" );

        return 
PLUGIN_HANDLED;
    }

    
DropSecondary id );

    
fcs_set_user_credits idfcs_get_user_credits id ) - DEAGLE_COST );

    
give_item id"weapon_deagle" );

    
cs_set_user_bpammo idCSW_DEAGLE30 );

    
HasDeagle [id] = true;
    
    return 
PLUGIN_HANDLED;
}

public 
HamPlayerSpawnPost id )
{
    if ( 
is_user_alive id ) )
    {
        
HasDeagle [id] = false;
    }
}

public 
HamPlayerTakeDamage VictimInflictorAttackerFloatDamage )
{
    if ( 
Inflictor == Attacker && IsPlayer Attacker ) && get_user_weapon Attacker ) == CSW_DEAGLE && HasDeagle [Attacker] && cs_get_user_team Attacker ) == CS_TEAM_CT 
    {
        
SetHamParamFloat 4Damage 3.0 );

        return 
HAM_HANDLED;
    }

    return 
HAM_IGNORED;
}

stock DropSecondary id )
{
    static 
Weapons [32], NumiWeaponID;

    
Num 0;

    
get_user_weapons idWeaponsNum );

    for ( 
0Num++ )
    {
        
WeaponID Weapons ] ;

        if ( 
<< WeaponID SECONDARY_WEAPONS_BIT_SUM )
        {
            static 
WName [32];

            
get_weaponname WeaponIDWNamecharsmax WName ) );

            
engclient_cmd id"drop"WName );
        }
    }

    return 
1;


Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...