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

[NMRiH] Skins 1.0.1 [2021/01/30]


Post New Thread Reply   
 
Thread Tools Display Modes
Lunreth
BANNED
Join Date: Dec 2019
Location: Argentina, Buenos Aires
Old 02-17-2020 , 19:36   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #21

You should add "(IsPlayerAlive(client))" check inside ToggleView since dead players should not need to see a player model preview

Code:
stock void ToggleView(int client)
{
	if((IsValidClient(client)) && (IsPlayerAlive(client)))
	{
		if(bTPView[client])
		{
			SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", 0);
			SetEntProp(client, Prop_Send, "m_iObserverMode", 1);
			SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 0);
			SetEntProp(client, Prop_Send, "m_iFOV", 70);
		}
		else
		{
			SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", client);
			SetEntProp(client, Prop_Send, "m_iObserverMode", 0);
			SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 1);
			SetEntProp(client, Prop_Send, "m_iFOV", 90);
		}
	}
}
Also, i don't know why but when someone gets a skin, the plugin will save it and give them the same skin even after server shutdown, this is not wanted for servers with premium or VIP users, since VIP users should only have temporary access to those models, maybe adding some CheckFlag in the next piece of code should help:

Code:
stock void ApplyModel(const int client, const char[] model)
{
	if(!model[0] || !IsModelPrecached(model)) return;
        if(put some admin flag check here also) return;
	SetEntityModel(client, model);
	SetEntityRenderColor(client);
}
Besides of that, nice plugin!
Lunreth is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 03-07-2020 , 18:45   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #22

Quote:
Originally Posted by Lunreth View Post
You should add "(IsPlayerAlive(client))" check inside ToggleView since dead players should not need to see a player model preview

Code:
stock void ToggleView(int client)
{
	if((IsValidClient(client)) && (IsPlayerAlive(client)))
	{
		if(bTPView[client])
		{
			SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", 0);
			SetEntProp(client, Prop_Send, "m_iObserverMode", 1);
			SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 0);
			SetEntProp(client, Prop_Send, "m_iFOV", 70);
		}
		else
		{
			SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", client);
			SetEntProp(client, Prop_Send, "m_iObserverMode", 0);
			SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 1);
			SetEntProp(client, Prop_Send, "m_iFOV", 90);
		}
	}
}
Also, i don't know why but when someone gets a skin, the plugin will save it and give them the same skin even after server shutdown, this is not wanted for servers with premium or VIP users, since VIP users should only have temporary access to those models, maybe adding some CheckFlag in the next piece of code should help:

Code:
stock void ApplyModel(const int client, const char[] model)
{
	if(!model[0] || !IsModelPrecached(model)) return;
        if(put some admin flag check here also) return;
	SetEntityModel(client, model);
	SetEntityRenderColor(client);
}
Besides of that, nice plugin!
When can it be updated?
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 03-08-2020 , 01:45   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #23

Lunreth, phoenix0001, you should use skins_menu.ini for this purpose:
PHP Code:
"Models"
{
    
"Admin Models"
    
{
==>     
"Admin" "a"    <==
        
"List"
        
{
            
"Skin 1"
            
{
                
"path" "models/player/***.mdl"
            
}
            
"Skin 2"
            
{
                
"path" "models/player/***.mdl"
            
}
        }
    }

__________________

Last edited by Grey83; 03-08-2020 at 01:47.
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 03-09-2020 , 12:38   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #24

Quote:
Originally Posted by Grey83 View Post
Lunreth, phoenix0001, you should use skins_menu.ini for this purpose:
PHP Code:
"Models"
{
    
"Admin Models"
    
{
==>     
"Admin" "a"    <==
        
"List"
        
{
            
"Skin 1"
            
{
                
"path" "models/player/***.mdl"
            
}
            
"Skin 2"
            
{
                
"path" "models/player/***.mdl"
            
}
        }
    }

I have a question for you.
For example, the national guard model.
We need to upload the model to the server and client.
But if we help make the model a VPK and upload it to steam, everyone subscribes to the model.
In this way, you don't need to download the model through the server, which can speed up the speed of entering the game.
I tested it myself and it didn't work. Is it necessary to modify the plugin?
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 03-10-2020 , 06:56   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #25

Quote:
Originally Posted by phoenix0001 View Post
But if we help make the model a VPK and upload it to steam, everyone subscribes to the model.
In this way, you don't need to download the model through the server, which can speed up the speed of entering the game.
I tested it myself and it didn't work. Is it necessary to modify the plugin?
IDK what the plugin should do in this case.

Usually for this I use FastDL and there are no such problems.
__________________

Last edited by Grey83; 03-10-2020 at 06:57.
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 03-10-2020 , 13:16   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #26

Quote:
Originally Posted by Grey83 View Post
IDK what the plugin should do in this case.

Usually for this I use FastDL and there are no such problems.
I extracted 2 models in this map, 1 = juliet starling, 2 = pbear
https://steamcommunity.com/sharedfil...?id=2014714262
Model file path

1=\models\player\juliet_starling_nmrih
1=\materials\models\characters\l_c\lollipop_c hainsaw

2=\models\player\pbear
2=\materials\models\player\kuristaja\pbear


Then I am making a VPK file

Server plugin configuration
downloads_list.ini
//1=

models/player/juliet_starling_nmrih/juliet_starling.dx80.vtx
models/player/juliet_starling_nmrih/juliet_starling.dx90.vtx
models/player/juliet_starling_nmrih/juliet_starling.mdl
models/player/juliet_starling_nmrih/juliet_starling.phy
models/player/juliet_starling_nmrih/juliet_starling.sw.vtx
models/player/juliet_starling_nmrih/juliet_starling.vvd


//2=

models/player/pbear/pbear.dx80.vtx
models/player/pbear/pbear.dx90.vtx
models/player/pbear/pbear.mdl
models/player/pbear/pbear.phy
models/player/pbear/pbear.sw.vtx
models/player/pbear/pbear.vvd


forced_skins.ini
models/player/p_bateman.mdl
models/player/p_wally.mdl
models/player/p_badass.mdl
models/player/p_butcher.mdl
models/player/p_hunter.mdl
models/player/p_jive.mdl
models/player/p_molotov.mdl
models/player/p_roje.mdl

skins_menu.ini
PHP Code:
"Models"
{
    
"MOD"
    
{
        
"Admin" "a"
        "List"
        
{
            
"guard"
            
{
                
"path" "models/player/national_guard/national_guard.mdl"
            
}
            
"guard mask"
            
{
                
"path" "models/player/national_guard/national_guard_mask.mdl"
            
}
            
"juliet starling"
            
{
                
"path" "models/player/juliet_starling_nmrih/juliet_starling.mdl"
            
}
            
"pbear"
            
{
                
"path" "models/player/pbear/pbear.mdl"
            
}
        }
    } 
nmrih_skins_playermodels.ini
PHP Code:
"Models"
{
        
"Admin" "a"
        "List"
        
{
            
"national guard"
            
{
                
"path" "models/player/national_guard/national_guard.mdl"
            
}
            
"national guard mask"
            
{
                
"path" "models/player/national_guard/national_guard_mask.mdl"
            
}
            
"juliet starling"
            
{
                
"path" "models/player/juliet_starling_nmrih/juliet_starling.mdl"
            
}
            
"pbear"
            
{
                
"path" "models/player/pbear/pbear.mdl"
            
}
        }

The client subscribes to the completed MOD, and the MOD cannot be displayed normally.
But the VPK file is decompressed to the server and the client, and the MOD is normal.
Don't know where it is set wrong?
Attached Files
File Type: 7z root.7z (1.29 MB, 119 views)
__________________
I like this BBS sharing of spirit

I come from China, my English is poor

Last edited by phoenix0001; 03-10-2020 at 13:23.
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 03-10-2020 , 19:41   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #27

but file nmrih_skins_playermodels.ini must fill plugin
not You
bkz this file should look like
PHP Code:
"Models"
{
    
"STEAM_0:0:*********"        "models/player/p_hunter.mdl"
    "STEAM_0:0:*********"        "models/player/p_bateman.mdl"
    "STEAM_0:0:*********"        "models/player/national_guard/national_guard_mask.mdl"
    "STEAM_0:0:*********"        "models/player/p_roje.mdl"
...

__________________
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 03-11-2020 , 04:16   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #28

Quote:
Originally Posted by Grey83 View Post
but file nmrih_skins_playermodels.ini must fill plugin
not You
bkz this file should look like
PHP Code:
"Models"
{
    
"STEAM_0:0:*********"        "models/player/p_hunter.mdl"
    "STEAM_0:0:*********"        "models/player/p_bateman.mdl"
    "STEAM_0:0:*********"        "models/player/national_guard/national_guard_mask.mdl"
    "STEAM_0:0:*********"        "models/player/p_roje.mdl"
...

The problem is not here, but the installation method. The ROOT.7z in my post contains folders and VPK files.
Installing the mod on the server and client as a folder everything works fine.
Installed to the server and client in VPK format, MOD all show ERROR.
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 03-11-2020 , 05:53   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #29

Quote:
Originally Posted by phoenix0001 View Post
Installing the mod on the server and client as a folder everything works fine.
Installed to the server and client in VPK format, MOD all show ERROR.
Quote:
Originally Posted by Grey83 View Post
IDK what the plugin should do in this case.

Usually for this I use FastDL and there are no such problems.
__________________

Last edited by Grey83; 03-11-2020 at 05:53.
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 03-11-2020 , 12:20   Re: [NMRiH] Skins 1.0.0 [2017/09/16]
Reply With Quote #30

national_guard models
Where can these models be found?
Or can you provide more models for everyone to download?
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
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 15:25.


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