Raised This Month: $ Target: $400
 0% 

make invisible but weapon visible


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-07-2016 , 07:04   make invisible but weapon visible
Reply With Quote #1

I've searched but didn't find.

I need to make player invisible to put model on it. (from biohazard)

PHP Code:
stock check_user_model(indexhumanv_user){
        
    
set_pev(indexpev_renderamt0.0)
        
    
set_pev(indexpev_rendermodekRenderTransAlpha// this makes weapons invisible, if i put kRenderNone then weapons are visible but and the default player model is visible and there are 2 different models (custom and default one) seen on players , it looks very ugly
    

    
if(!pev_valid(g_modelent[index]))
    {
        static 
ent
        ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
        if(
pev_valid(ent))
        {
            if(
v_user)
            
engfunc(EngFunc_SetModelenthuman VIP_HUMAN VIP_ZM)
            else if(
human)
            
engfunc(EngFunc_SetModelentMNX_HUMAN)
            
            
set_pev(entpev_classnameMODEL_CLASSNAME)
            
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
            
set_pev(entpev_aimentindex)
            
set_pev(entpev_ownerindex)
            
            
g_modelent[index] = ent
        
}
    }
    else
    {
        if(
v_user)
        
engfunc(EngFunc_SetModelg_modelent[index], human VIP_HUMAN VIP_ZM)
        else if(
human)
        
engfunc(EngFunc_SetModelg_modelent[index], MNX_HUMAN)
        
        
fm_set_entity_visibility(g_modelent[index], 1)
    }
    
}



//the stock
stock fm_set_entity_visibility(indexvisible 1)
    
set_pev(indexpev_effectsvisible == pev(indexpev_effects) & ~EF_NODRAW pev(indexpev_effects) | EF_NODRAW
The problem is default biohazard doesnt have custom model for humans (cts) and after i added it works but weapon is not visible. I don't know how to do, i tried to do with glow but when it makes weapon visible the default model is visible and there are 2 models on player its very ugly.

Can i make player invisible but weapon remain visible.(with fakemeta only (set_pev))

P.S. I tried to use set_pev(id, pev_viewmodel, 1) to make weapons visible but it crashes the server.

Last edited by siriusmd99; 02-07-2016 at 07:06.
siriusmd99 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-12-2016 , 06:33   Re: make invisible but weapon visible
Reply With Quote #2

i tried to use fm set user model from basebuilder but it doesn't work,even with 3 seconds task.
siriusmd99 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-14-2016 , 06:36   Re: make invisible but weapon visible
Reply With Quote #3

i've helped about 10 people , answering perfectly their questions and still nobody can't help me?

If it were a hard question but it's just how to make weapon's viewmodel visible....

Last edited by siriusmd99; 02-14-2016 at 06:37.
siriusmd99 is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-14-2016 , 07:33   Re: make invisible but weapon visible
Reply With Quote #4

check this https://forums.alliedmods.net/showthread.php?t=69386
__________________
JusTGo 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:28.


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