LevelMod Forum Index


LevelMod
Reply to topic
Extreme AmxModx Knife Mod 1.0 (EAKM)
LordOfNothing
Developer
LordOfNothing
Joined: 29 Jul 2013
Posts: 71
Reply with quote
Only Knife
resource needed
a model for a ct kmct.mdl
a tip for a t kmt.mdl
a model for a new knife : ghosts_knife_p.mdl & ghosts_knife_v.mdl

Code:

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

#pragma semicolon 1

new const g_Ghost_knifeP[ ] = "models/ghosts_knife_p.mdl";
new const g_Ghost_knifeV[ ] = "models/ghosts_knife_v.mdl";
public plugin_init()

{
        register_plugin("KnifeMod","1.0","r3p - LordOfNothing - Row");
        RegisterHam(Ham_Spawn, "player","player_spawn", 1);
        register_event( "CurWeapon", "EV_CurWeapon", "be", "1=1" );
       
       
}
public plugin_precache( )
{
        precache_model( g_Ghost_knifeP );
        precache_model( g_Ghost_knifeV );
        precache_model("models/kmt.mdl");
        precache_model("models/kmct.mdl");
}
public player_spawn(id)
{
       
       
        if(is_user_alive(id))
        {
                if( get_user_team( id ) == 1 ) // tero team !
                {
                       
                        strip_user_weapons(id);
                        give_item(id, "weapon_knife");
                        cs_set_user_model(id, "kmt");
                        set_user_gravity(id, 0.5);
                        set_user_maxspeed(id, 800.0);
                        cs_set_user_money(id, 0);
                       
                }else if ( get_user_team( id ) == 2 )  // counter team
                {
                        strip_user_weapons(id);
                        give_item(id, "weapon_knife");
                        cs_set_user_model(id, "kmct");
                        set_user_gravity(id, 0.5);
                        set_user_maxspeed(id, 800.0);
                        cs_set_user_money(id, 0);
                       
                       
                }
        }
}
public EV_CurWeapon( id )
{
        if( get_user_weapon( id ) == CSW_KNIFE )
        {
                set_pev( id, pev_viewmodel2,g_Ghost_knifeP );
                set_pev( id, pev_weaponmodel2, g_Ghost_knifeV );
        }
}
View user's profileSend private message
Extreme AmxModx Knife Mod 1.0 (EAKM)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT + 2 Hours  
Page 1 of 1  

  
  
 Reply to topic