AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   make invisible but weapon visible (https://forums.alliedmods.net/showthread.php?t=278736)

siriusmd99 02-07-2016 07:04

make invisible but weapon visible
 
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.

siriusmd99 02-12-2016 06:33

Re: make invisible but weapon visible
 
i tried to use fm set user model from basebuilder but it doesn't work,even with 3 seconds task.

siriusmd99 02-14-2016 06:36

Re: make invisible but weapon visible
 
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....

JusTGo 02-14-2016 07:33

Re: make invisible but weapon visible
 
check this https://forums.alliedmods.net/showthread.php?t=69386


All times are GMT -4. The time now is 09:28.

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