View Single Post
LucasFromDK
Member
Join Date: Sep 2016
Old 12-05-2016 , 09:58   Re: [CS:GO] Hide new arms?
Reply With Quote #42

Quote:
Originally Posted by hlstriker View Post
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/weapons/ct_arms_gign.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);

if i replace this:
PHP Code:
new const String:ARMS_MODEL[] = "models/weapons/ct_arms_gign.mdl"
with:

PHP Code:
new const String:ARMS_MODEL[] = "models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl"
it get the bloodhound gloves but without texture ( black ), why ?

Last edited by LucasFromDK; 12-05-2016 at 10:01.
LucasFromDK is offline