Thread: [CSGO] ArmsFix
View Single Post
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: Czech_Republic
Old 12-03-2019 , 05:12   Re: [CSGO] ArmsFix
Reply With Quote #35

Hmm, I tested in on some custom maps ...

There is only one issue, if you want to use new Agent models (arms overlapping). Because Valve uses the similar method as at gloves (paints), so you can't use SetEntPropString(client, Prop_Send, "m_szArmsModel", ""); and itemDefinitionIndex/PaintKit, because part of the hand will be missing.

Please check sm exts list to make sure extension is loaded.

You can also use N_ArmsFix_SetClientDefaultArms(client) - auto set default map arms, N_ArmsFix_SetClientDefaultModel(client) - auto set default map model or both N_ArmsFix_SetClientDefaults(client)

PHP Code:

#include <sourcemod>
#include <sdktools>
#include <n_arms_fix>

public Plugin myinfo =
{
...
}

public 
void OnPluginStart()
{
...
}

// Forward Event_PlayerSpawn, SetClientDefault
public void N_ArmsFix_OnClientReady(int client)
{
    
SetEntPropString(clientProp_Send"m_szArmsModel""models/player/custom_player/xxx/yyy_arms.mdl");
    
SetEntityModel(client"models/player/custom_player/xxx/yyy.mdl");
}

public 
Action setDefaultArms(Timer timerint client)
{

    
N_ArmsFix_SetClientDefaults(client);
    
//or
    
N_ArmsFix_SetClientDefaultArms(client);
    
N_ArmsFix_SetClientDefaultModel(client);

__________________
NomisCZ is offline