Raised This Month: $32 Target: $400
 8% 

[CS:GO] Custom Viewmodel


Post New Thread Reply   
 
Thread Tools Display Modes
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 11-07-2015 , 04:09   Re: [CS:GO] Custom Viewmodel
Reply With Quote #21

Quote:
Originally Posted by CareFully View Post
PHP Code:
SetEntPropString(wpnidProp_Data"m_ModelName""modelname.mdl"); 
Setting this on weapon spawn (and when the weapon is dropped) will work. But it doesn't work on equipped weapons. I haven't found yet how to get worldmodels to work.
Doesn't work.
lingzhidiyu is offline
CareFully
Junior Member
Join Date: Oct 2015
Old 11-07-2015 , 06:57   Re: [CS:GO] Custom Viewmodel
Reply With Quote #22

Try what gubka said:

Quote:
Originally Posted by gubka View Post
new entity = MaxClients+1;

while( (entity = FindEntityByClassname(entity, "weaponworldmodel")) != -1 )
{
SetEntProp(entity, Prop_Send, "m_nModelIndex", 0);
}
CareFully is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 11-07-2015 , 07:12   Re: [CS:GO] Custom Viewmodel
Reply With Quote #23

hey i found this netprop m_iWorldDroppedModelIndex.
it return the right index, but i cant change it.
lingzhidiyu is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-07-2015 , 10:42   Re: [CS:GO] Custom Viewmodel
Reply With Quote #24

Quote:
Originally Posted by CareFully View Post
Did you try the full code thats in the op?

Yes I tried hooks swithweapon and tried set this when give weapon , nothing work
__________________
gubka is offline
Send a message via ICQ to gubka
CareFully
Junior Member
Join Date: Oct 2015
Old 11-07-2015 , 13:54   Re: [CS:GO] Custom Viewmodel
Reply With Quote #25

It is working for me.
You don't actually even have to add a model to the weapon entity. Just change it to 0:
SetEntProp(wpnid, Prop_Send, "m_nModelIndex", 0);

PHP Code:
public OnClientWeaponSwitchPost(clientwpnid)
{
    
decl String:szWpn[64];
    
GetEntityClassname(wpnid,szWpn,sizeof(szWpn));
    
    if(
StrEqual(szWpn"weapon_mac10")){
        
SetEntProp(wpnidProp_Send"m_nModelIndex"0);
        
SetEntProp(g_PVMid[client], Prop_Send"m_nModelIndex"g_iSMGModel);
    }


Last edited by CareFully; 11-07-2015 at 13:55.
CareFully is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-07-2015 , 15:32   Re: [CS:GO] Custom Viewmodel
Reply With Quote #26

I did it for knife , and it is didn't work
__________________
gubka is offline
Send a message via ICQ to gubka
Craft The Crafty Donut
Junior Member
Join Date: Dec 2013
Old 11-08-2015 , 02:17   Re: [CS:GO] Custom Viewmodel
Reply With Quote #27

Odd... When I do the fix for the flickering, prediction is all screwed up.
For example, the animations won't play sometimes and look really choppy depending on latency.
(Can be reproduced by going from firstperson to thirdperson and back to firstperson in old source games - CS:S still has this bug, in TF2 it was patched for taunting)

The animations are in order and work fine, it definitely has something to do with the prediction (I've worked with similar problems in the HL2 SDK but I have no idea what is causing it in this case)

Last edited by Craft The Crafty Donut; 11-08-2015 at 02:28.
Craft The Crafty Donut is offline
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 11-08-2015 , 09:42   Re: [CS:GO] Custom Viewmodel
Reply With Quote #28

Amazing! How can we convert more models ?
Thank you for your code!
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
CareFully
Junior Member
Join Date: Oct 2015
Old 11-08-2015 , 12:50   Re: [CS:GO] Custom Viewmodel
Reply With Quote #29

Well It's a long story . You have to decompile goldsrc models, convert the textures, update the .qc file, so it'll work with source and so that the sequences are in the right order.
But there are many problems on the way. Like viewmodel's origin being in wrong place, weapon in the wrong hand, and more.
CareFully is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-09-2015 , 03:17   Re: [CS:GO] Custom Viewmodel
Reply With Quote #30

I don't know why this method didn't work for claws , which have same animations
__________________
gubka is offline
Send a message via ICQ to gubka
Reply


Thread Tools
Display Modes

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 22:30.


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