View Single Post
TheWho
AlliedModders Donor
Join Date: Jul 2012
Old 11-30-2016 , 23:36   Re: [CS:GO] Hide new arms?
Reply With Quote #21

No problems when:
Setting default model then changing to custom arms.

This doesn't work:
Setting default model then changing to custom arms then changing to custom model.
In this case the arms will overlap again.

nvm, you snippet works without overlapping

Important note:
You have to have a game_player_equip with atleast one weapon eg.: weapon_knife to make it work.
That's why franc thought he fixed it, in some map this entity isn't implemented.
We have two options, whether to spawn the player a weapon and remove it or loop for game_player_equip and remove the ent and recreate it with a weapon.

And I'm not using a timer, I use 20 delayed frames.
Shout out to KissLick's stock:
PHP Code:
stock RequestFrame2(RequestFrameCallback:funcframesAhead 1any:data 0)
{
    if (
framesAhead 1)
        return;

    if (
framesAhead == 1) {
        
RequestFrame(funcdata);
    } else {
        new 
Handle:pack CreateDataPack();
#if SOURCEMOD_V_MAJOR >= 1 && SOURCEMOD_V_MINOR >= 7
        
WritePackFunction(packfunc);
#else
        
WritePackCell(packfunc);
#endif
        
WritePackCell(packframesAhead);
        
WritePackCell(packdata);

        
RequestFrame(RequestFrame2_CallBackpack);
    }
}

public 
RequestFrame2_CallBack(any:pack)
{
    
ResetPack(Handle:pack);
#if SOURCEMOD_V_MAJOR >= 1 && SOURCEMOD_V_MINOR >= 7
    
new RequestFrameCallback:func RequestFrameCallback:ReadPackFunction(Handle:pack);
#else
    
new RequestFrameCallback:func RequestFrameCallback:ReadPackCell(Handle:pack);
#endif
    
new framesAhead ReadPackCell(Handle:pack) - 1;
    new 
data ReadPackCell(Handle:pack);
    
CloseHandle(Handle:pack);

    
RequestFrame2(funcframesAheaddata);


Last edited by TheWho; 12-01-2016 at 01:37.
TheWho is offline