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

[CS:GO] Custom Viewmodel


Post New Thread Reply   
 
Thread Tools Display Modes
CareFully
Junior Member
Join Date: Oct 2015
Old 11-15-2015 , 06:41   Re: [CS:GO] Custom Viewmodel
Reply With Quote #51

Quote:
Originally Posted by gubka View Post
May be this m_iWorldDroppedModelIndex?
I've already tried that.

PHP Code:
SetEntPropString(entidProp_Data"m_ModelName""models/weapons/paintball/w_pbgun_dropped.mdl"); 
This works when you spawn the weapon (ex "give weapon_mac10") but when you pick it up, it resets to deafult.

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

At first I check this offset using swithpost , and after told you this )
but after respawn , players have knife, i dont know why(
__________________

Last edited by gubka; 11-15-2015 at 14:02.
gubka is offline
Send a message via ICQ to gubka
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-17-2015 , 13:50   Re: [CS:GO] Custom Viewmodel
Reply With Quote #53

How to solve problem with weapons which have skins, and stickers

Quote:
SetEntProp(entid,Prop_Send,"m_iItemIDLow",0);
SetEntProp(entid,Prop_Send,"m_iItemIDHigh",0) ;
This didn't help
__________________
gubka is offline
Send a message via ICQ to gubka
CareFully
Junior Member
Join Date: Oct 2015
Old 11-17-2015 , 15:15   Re: [CS:GO] Custom Viewmodel
Reply With Quote #54

It should work. How did you use it?
For me it's working.
CareFully is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-17-2015 , 20:40   Re: [CS:GO] Custom Viewmodel
Reply With Quote #55

In switch post
__________________
gubka is offline
Send a message via ICQ to gubka
CareFully
Junior Member
Join Date: Oct 2015
Old 11-18-2015 , 00:20   Re: [CS:GO] Custom Viewmodel
Reply With Quote #56

Try it like i showed it in the first page:
PHP Code:
public OnEntityCreated(entid){
    
decl String:szWpn[32];
    
GetEntityClassname(entidszWpnsizeof(szWpn));
    if(
StrEqual(szWpn"weapon_mac10"){
        
SDKHook(entidSDKHook_SpawnOnEntitySpawn);
    }
}
public 
OnEntitySpawn(entid){
    
SetEntProp(entid,Prop_Send,"m_iItemIDLow",0);
    
SetEntProp(entid,Prop_Send,"m_iItemIDHigh",0);

CareFully is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-18-2015 , 09:49   Re: [CS:GO] Custom Viewmodel
Reply With Quote #57

I need to check Client bool, called Survivor, i can not take owner index using OnEntitySpawn and OnEntityCreated
__________________
gubka is offline
Send a message via ICQ to gubka
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-18-2015 , 12:57   Re: [CS:GO] Custom Viewmodel
Reply With Quote #58

I solved

Just do this in swithpost for removing p_ model , work after respawn

PHP Code:
int iWorldModel GetEntPropEnt(iWeaponProp_Send"m_hWeaponWorldModel");
        if(
IsValidEdict(iWorldModel)) SetEntProp(iWorldModelProp_Send"m_nModelIndex"0); 
__________________
gubka is offline
Send a message via ICQ to gubka
Andersso
Member
Join Date: Nov 2009
Location: E8 2A 2A 2A 2A
Old 12-11-2015 , 20:28   Re: [CS:GO] Custom Viewmodel
Reply With Quote #59

Thought I could promote my own script here for changing view model..

It's been on GitHub for quite some time, but it was never finished. I have now spent some more time on the project and hopefully it's more "work" and less "not work"

I wrote this script in goal of having no glitches at all, and a lot of voodoo magic has gone in to making that possible. (At least, as close as possible)
However, the API and file config should be easy enough for most people to use

Not much time has gone into testing. Maybe I could get some help with that

Source: https://github.com/Andersso/SM-WeaponModels

Here is some old video i posted some time ago on a different thread

Mini example of API:
PHP Code:
#include <sourcemod>
#include <weaponmodels>

public void OnMapStart()
{
    
WeaponModels_AddWeaponByClassName("weapon_knife""models/weapons/v_my_custom_knife.mdl"NULL_STRINGWeaponModels_OnWeapon);
}

public 
bool WeaponModels_OnWeapon(int weaponIndexint clientint weapon, const char[] classNameint itemDefIndex)
{
    return 
true;

Andersso is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 12-11-2015 , 21:41   Re: [CS:GO] Custom Viewmodel
Reply With Quote #60

Quote:
Originally Posted by Andersso View Post
Thought I could promote my own script here for changing view model..

It's been on GitHub for quite some time, but it was never finished. I have now spent some more time on the project and hopefully it's more "work" and less "not work"

I wrote this script in goal of having no glitches at all, and a lot of voodoo magic has gone in to making that possible. (At least, as close as possible)
However, the API and file config should be easy enough for most people to use

Not much time has gone into testing. Maybe I could get some help with that

Source: https://github.com/Andersso/SM-WeaponModels

Here is some old video i posted some time ago on a different thread

Mini example of API:
PHP Code:
#include <sourcemod>
#include <weaponmodels>

public void OnMapStart()
{
    
WeaponModels_AddWeaponByClassName("weapon_knife""models/weapons/v_my_custom_knife.mdl"NULL_STRINGWeaponModels_OnWeapon);
}

public 
bool WeaponModels_OnWeapon(int weaponIndexint clientint weapon, const char[] classNameint itemDefIndex)
{
    return 
true;

where can i download custom models with custom path ?.. because i don't want to replace original ones
ESK0 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 15:04.


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