Raised This Month: $51 Target: $400
 12% 

[CSGO] Set invisible knife model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
srvmil
Senior Member
Join Date: Oct 2010
Old 03-24-2018 , 23:17   [CSGO] Set invisible knife model
Reply With Quote #1

I've found a predator model from http://www.andi67.bplaced.net/Forum/...php?f=39&t=396 as it has a knife invisible model which Andi67 is member on this forum.

With the knife plugin, I'm aware he said which plugin to use but that is not what I'm looking for. I'd like a plugin where I can set the knife model for terrorist by default?

- Set Knife model?
SetEntityKnifeModel(client, "model file path");

Would that entity be correct?

I don't want a skin chooser or anything, no menu, no commands etc. Just set knife model by default every time. I've tried searching, doesn't seem there is one.

EDIT: This is an example but with arms, I'd like it to be the same for knife. I did not create this code
PHP Code:
#include <sourcemod> 

#define CTARMS "models/weapons/ct_arms.mdl" 
#define TTARMS "models/player/custom_player/avp/predator_invisible/predator_invisible_arms.mdl" 

public Plugin myinfo =
{
    
name "",
    
author "",
    
description "",
    
version "1.0",
    
url ""
}

public 
void OnPluginStart() 

    
HookEvent("player_spawn"PlayerSpawn); 


public 
OnMapStart() 

    
PrecacheModel(CTARMStrue); 
    
PrecacheModel(TTARMStrue); 


public 
Action PlayerSpawn(Handle event, const char[] namebool dbc

    
int client GetClientOfUserId(GetEventInt(event"userid")); 
     
    if(
client
    { 
        switch(
GetClientTeam(client)) 
        { 
            case 
2SetEntPropString(clientProp_Send"m_szArmsModel"TTARMS); 
            case 
3SetEntPropString(clientProp_Send"m_szArmsModel"CTARMS); 
        } 
    } 

Can change the define model file path and the code into knife world model entity?

Last edited by srvmil; 03-25-2018 at 02:14.
srvmil is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-25-2018 , 02:18   Re: [CSGO] Set invisible knife model
Reply With Quote #2

You need a knife model which either has no actual vertex, or what ever, or is an invisible texture in order to prevent the player from going into a T-Pose. That's what I atleast did in my csgo Hidden gamemode.
Mitchell is offline
srvmil
Senior Member
Join Date: Oct 2010
Old 03-25-2018 , 02:24   Re: [CSGO] Set invisible knife model
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
You need a knife model which either has no actual vertex, or what ever, or is an invisible texture in order to prevent the player from going into a T-Pose. That's what I atleast did in my csgo Hidden gamemode.
Wouldn't predator knife model works? From http://www.andi67.bplaced.net/Forum/...php?f=39&t=396 as you can see the;

Knife files:
Code:
materials/models/weapons/v_models/avp/dtb.vmt
materials/models/weapons/v_models/avp/dtb.vtf
models/weapons/avp/v_knife_pred.dx90.vtx
models/weapons/avp/v_knife_pred.mdl
models/weapons/avp/v_knife_pred.vvd
srvmil is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 03-29-2018 , 16:23   Re: [CSGO] Set invisible knife model
Reply With Quote #4

I had the same issue with my hidden:go gamemode, I was stumped trying to figure it out for weeks, but you can easily fix it by doing this

PHP Code:
stock void SetWorldModel(int weaponIndexint modelIndex)
{
    
int worldIndex GetEntPropEnt(weaponIndexProp_Send"m_hWeaponWorldModel");
    
    if(
IsValidEdict(worldIndex))
    {
        
SetEntProp(worldIndexProp_Send"m_nModelIndex"modelIndex);
    }


Last edited by CowGod; 03-29-2018 at 16:23.
CowGod is offline
Send a message via Skype™ to CowGod
Mitchell
~lick~
Join Date: Mar 2010
Old 03-29-2018 , 16:32   Re: [CSGO] Set invisible knife model
Reply With Quote #5

That's a view model
Mitchell is offline
Reply



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 19:34.


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