This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[CS] CS 1.5 (Retro) Knife


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 02-10-2024 , 01:50   [CS] CS 1.5 (Retro) Knife
Reply With Quote #1

Very simple addon to use the CS 1.5 knife model in CS 1.6.

Note that only the p_knife_r.mdl needs to be downloaded from server, since v_knife_r.mdl already exist by default in CS1.6 installation but is unused. The w_knife.mdl is still the same 1.5 model in 1.6, so it doesn't need to be changed.

edit: use the code from the post below, as it is more efficient

Also note that while it's supposedly better to hook v_ / p_ model using
PHP Code:
RegisterHam(Ham_Item_Deploy"weapon_knife""OnKnifeDeploy"1
It doesn't work with bots or on knife maps. While the event method below always works.



PHP Code:
#include <amxmodx>
#include <engine>

#define PLUGIN "CS 1.5 Knife"
#define VERSION "1.0"
#define AUTHOR "kebabstorm"

#pragma semicolon 1

new const V_KNIFE_R[] = "models/v_knife_r.mdl";
new const 
P_KNIFE_R[] = "models/p_knife_r.mdl";

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("CurWeapon""EV_CurWeapon""be""1=1");
}

public 
plugin_precache()
{
    
precache_model(V_KNIFE_R);
    
precache_model(P_KNIFE_R);
}

public 
EV_CurWeapon(player)
{
    if (
get_user_weapon(player) == CSW_KNIFE) {
        
entity_set_string(playerEV_SZ_viewmodelV_KNIFE_R);
        
entity_set_string(playerEV_SZ_weaponmodelP_KNIFE_R);
    }

Attached Files
File Type: zip cs15_knife_models.zip (123.1 KB, 56 views)
__________________

Last edited by anssik; 02-14-2024 at 12:25.
anssik is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode