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

block hiding v_model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 03-25-2024 , 11:57   block hiding v_model
Reply With Quote #1

Task: enable v_model display when changing FOV

I have already tried different methods of replacing data in (I will list the methods in a confused way)
player pdata_cbase
weapon pdata_cbase
m_flFieldOfView
m_iFOV
m_iClientFOV
message_begin(MSG_ONE, get_user_msgid("SetFOV"), _, idx_player);
set_rendering
m_iObserverWeapon
ExecuteHamB(Ham_DOD_Weapon_ZoomIn,idx_wpn)
pev_viewmodel
pev_viewmodel2

I also tried to create an entity separately, and place it directly in front of the player's screen, assigning a model, but it has an intermittent motion function tied to nextthink and its origin and pitch still doesn't look very attractive to me, and the most important thing in processing CliettData is hiding the entity from other players, a very bad idea

In the end, I want to make iron sights for Day Of Defeat to change the angle of view by at least 5-10 degrees, I can just rebuild the model and make it visible without changing the FOV, but the task is to see this model with a changed FOV.
Perhaps someone tried reverse engineering of the grandfather's library to find in which function the relationship occurs that disables v_model

...Someone was able to solve this problem in CS 1.6. You can see how AUG has a model instead of a sight sprite with a modified FOV.I have not been able to adapt this method for DOD
__________________
TheVaskov is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 03-25-2024 , 12:19   Re: block hiding v_model
Reply With Quote #2

If you are talking about the sniper v_model invisible when applying FOV to values below the 90 default,
currently the only solution is the bypass method We did in our plugin:

https://gamebanana.com/mods/311932

Are you talking about this?
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 03-25-2024 , 13:06   Re: block hiding v_model
Reply With Quote #3

Quote:
Originally Posted by WATCH_D0GS UNITED View Post
If you are talking about the sniper v_model invisible when applying FOV to values below the 90 default,
currently the only solution is the bypass method We did in our plugin:

https://gamebanana.com/mods/311932

Are you talking about this?
I looked at your plugin.
I have already tried using the pev_viewmodel2 method
I have already tried using the write_byte to get_user_msgid("SetFOV") method
I can't tune get_user_msgid("Crosshair") 'cause DOD have not this HL_message\event

Always I have one result:
Change FOV in rifle/pistol/knife/nade == Hiding v_model
Change FOV in sniperrifle == Hiding v_model + showing Sprite scope
__________________
TheVaskov is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 03-25-2024 , 13:38   Re: block hiding v_model
Reply With Quote #4

You need to remove the v_ from the file name.

For example, if the file name is v_nagant.mdl, rename it to dod_nagant.mdl.

Precache the file and use
PHP Code:
set_pev(idpev_viewmodel2"dod_nagant.mdl"
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 03-25-2024 at 13:39.
WATCH_D0GS UNITED is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 03-25-2024 , 14:55   Re: block hiding v_model
Reply With Quote #5

Quote:
Originally Posted by WATCH_D0GS UNITED View Post
You need to remove the v_ from the file name.

For example, if the file name is v_nagant.mdl, rename it to dod_nagant.mdl.

Precache the file and use
PHP Code:
set_pev(idpev_viewmodel2"dod_nagant.mdl"

I did:
PHP Code:

precache_model
("models/dod_nagant.mdl")
set_pev(idpev_viewmodel2"models/dod_nagant.mdl")

resultno v_model
____
precache_model
("models/dod_nagant.mdl")  
set_pev(idpev_viewmodel2"dod_nagant.mdl")

resultcrash server
_____
precache_model
("dod_nagant.mdl") (file mod-direectory not im "models")
set_pev(idpev_viewmodel2"dod_nagant.mdl")

resultno v_model 
maybe Is there something else I'm missing? Moreover, there are at least 2 ways to change the FOV
__________________
TheVaskov is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 03-25-2024 , 15:04   Re: block hiding v_model
Reply With Quote #6

Could you please send a PM with full .sma file or leave it here?

We will take a look and try a way to bypass in DOD.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 03-25-2024 , 15:19   Re: block hiding v_model
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <dodx>
#include <fakemeta>
#include <hamsandwich>
#include <engine>

public plugin_init() 
{
    
register_plugin("DOD SNIPER LEARNING""0.0""America")

    
register_clcmd("say 1","idx_player_retune")
    
register_clcmd("say 2","change_FOV1"// change FOV method
    
register_clcmd("say 3","change_FOV2")  // change FOV method 2

}


public 
plugin_precache()
{
    
precache_model("models/v_garand.mdl")
    
// precache_model("models/garand.mdl")
}

public 
idx_player_retune(idx_player)
{     
    
set_pev(idx_playerpev_viewmodel2"models/v_garand.mdl")
}
 
public 
change_FOV1(idx_player)
{    
    new 
m_iFOV 365 // offset cbaseplayer  
    
set_pdata_int(idx_playerm_iFOV894)
}

public 
change_FOV2(idx_player)
{   
    static 
iMsgID_SetFOV;
    if (!
iMsgID_SetFOV)
        
iMsgID_SetFOV get_user_msgid("SetFOV");

    
message_begin(MSG_ONEget_user_msgid("SetFOV"), _idx_player);
    
write_byte(89);
    
message_end();

__________________
TheVaskov is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 03-25-2024 , 17:11   Re: block hiding v_model
Reply With Quote #8

mmm.

That's not the same thing as in CS.

The v_garand.mdl is still visible, but hidden.

It will require more research.

Sorry for now.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED 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 09:30.


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