View Single Post
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-30-2016 , 23:04   Re: [CS:GO] Hide new arms?
Reply With Quote #20

Quote:
Originally Posted by hlstriker View Post
Arms only appear if:
- You are using a custom player model (custom player models use Leet & IDF arms).
- You are using a default player model specified in the maps kv file.
- You are using a Leet or IDF player model.

Arms don't appear to change after the initial player model is set (set player models during SpawnPost).

Using this knowledge you can hide player arms. Keep in mind I'm not sure if the new gloves will appear no matter what.
Quote:
Originally Posted by TheWho View Post
So you want to tell us that for ex.: Zombie servers
- Should use a default player model but can't change arms since it would overlap
- Should use custom player models but no custom arms ( they will see the ugly leet arms )
No, I don't think I was telling anyone that at all. See the underlined part of my quoted original post? You might have to write some ghetto code but if you want arms hidden bad enough it's possible.

An extended example (note I added custom arms in this example just to show it's possible, this thread was about hiding arms):
PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools_functions>

#pragma semicolon 1

new const String:PLAYER_MODEL_DEFAULT[] = "models/player/custom_player/legacy/ctm_swat_variantd.mdl";
new const 
String:PLAYER_MODEL_CUSTOM[] = "path/to/custom/model.mdl";

new const 
String:ARMS_MODEL[] = "models/weapons/ct_arms_gign.mdl";


public 
OnMapStart()
{
    
PrecacheModel(PLAYER_MODEL_DEFAULT);
    
PrecacheModel(PLAYER_MODEL_CUSTOM);
    
PrecacheModel(ARMS_MODEL);
}

public 
OnClientPutInServer(iClient)
{
    
SDKHook(iClientSDKHook_SpawnPostOnSpawnPost);
}

public 
OnSpawnPost(iClient)
{
    if(
IsClientObserver(iClient) || !IsPlayerAlive(iClient))
        return;
    
    
SetEntityModel(iClientPLAYER_MODEL_DEFAULT);
    
SetEntPropString(iClientProp_Send"m_szArmsModel"ARMS_MODEL);
    
    
CreateTimer(0.1Timer_CustomModelGetClientSerial(iClient));
}

public 
Action:Timer_CustomModel(Handle:hTimerany:iClientSerial)
{
    new 
iClient GetClientFromSerial(iClientSerial);
    if(!
iClient)
        return;
    
    
SetEntityModel(iClientPLAYER_MODEL_CUSTOM);


Last edited by hlstriker; 11-30-2016 at 23:06.
hlstriker is offline