Raised This Month: $51 Target: $400
 12% 

[CSGO] ArmsFix


Post New Thread Reply   
 
Thread Tools Display Modes
rustaveli
Member
Join Date: Mar 2011
Old 12-02-2019 , 09:55   Re: [CSGO] ArmsFix
Reply With Quote #31

after installation, the hands of the default player models disappear
rustaveli is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-02-2019 , 17:58   Re: [CSGO] ArmsFix
Reply With Quote #32

you can try this together with the extension:

PHP Code:
#pragma semicolon 1
 
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

#define PLUGIN_VERSION "1.0"

// Default models / arms - community maps
#define ARMS_T            "models/weapons/t_arms_phoenix.mdl"
#define ARMS_CT            "models/weapons/ct_arms_sas.mdl"



public OnPluginStart()
{
    
CreateConVar("sm_def_arms"PLUGIN_VERSION" SM DEF ARMS Version"FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
    
    
HookEvent("player_spawn"Event_PlayerSpawn);    
}

public 
void OnMapStart()
{
    
PrecacheModelARMS_T);
    
PrecacheModelARMS_CT);
}

public 
Event_PlayerSpawn(Handle event,const char[] name,bool dontBroadcast)
{
    
int client;
    
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if (
IsValidClient(client))
    {
        
CreateTimer(0.1,defarmsclient);
        
PrintToChat(client"Setting Armsmodel !!!");
    }
}    

public 
Action defarms(Handle timer ,any client)
{
    
int team GetClientTeam(client);
    
    if (
team == 2)
    {
    
// Set the Armsmodel
        
SetEntPropString(clientProp_Send"m_szArmsModel"ARMS_T);
    }
    else if (
team == 3)
    {
        
SetEntPropString(clientProp_Send"m_szArmsModel"ARMS_CT);
    }
}    

stock bool IsValidClient(int client)
{
    if (
client <= 0) return false;
    if (
client MaxClients) return false;
    if (!
IsClientConnected(client)) return false;
    return 
IsClientInGame(client);

__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<

Last edited by andi67; 12-02-2019 at 18:12.
andi67 is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 12-03-2019 , 01:54   Re: [CSGO] ArmsFix
Reply With Quote #33

Quote:
Originally Posted by andi67 View Post
you can try this together with the extension:

PHP Code:
#pragma semicolon 1
 
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

#define PLUGIN_VERSION "1.0"

// Default models / arms - community maps
#define ARMS_T            "models/weapons/t_arms_phoenix.mdl"
#define ARMS_CT            "models/weapons/ct_arms_sas.mdl"



public OnPluginStart()
{
    
CreateConVar("sm_def_arms"PLUGIN_VERSION" SM DEF ARMS Version"FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
    
    
HookEvent("player_spawn"Event_PlayerSpawn);    
}

public 
void OnMapStart()
{
    
PrecacheModelARMS_T);
    
PrecacheModelARMS_CT);
}

public 
Event_PlayerSpawn(Handle event,const char[] name,bool dontBroadcast)
{
    
int client;
    
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if (
IsValidClient(client))
    {
        
CreateTimer(0.1,defarmsclient);
        
PrintToChat(client"Setting Armsmodel !!!");
    }
}    

public 
Action defarms(Handle timer ,any client)
{
    
int team GetClientTeam(client);
    
    if (
team == 2)
    {
    
// Set the Armsmodel
        
SetEntPropString(clientProp_Send"m_szArmsModel"ARMS_T);
    }
    else if (
team == 3)
    {
        
SetEntPropString(clientProp_Send"m_szArmsModel"ARMS_CT);
    }
}    

stock bool IsValidClient(int client)
{
    if (
client <= 0) return false;
    if (
client MaxClients) return false;
    if (!
IsClientConnected(client)) return false;
    return 
IsClientInGame(client);

does not work correctly, it sets the arms yes, but looks wired and after setting the arms.

Extension + Your Plugin:



.
.
.
.
the extension + NomisCZ plugin works, but it changes arms models too when changing gloves on custom workshop maps only.

Last edited by asdfxD; 12-03-2019 at 01:57.
asdfxD is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-03-2019 , 05:48   Re: [CSGO] ArmsFix
Reply With Quote #34

It works on official maps that come with the game , the Problem now seems to be the custommaps...
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 12-03-2019 , 06: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);

__________________



Steam: NomisCZ
NomisCZ is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-03-2019 , 15:21   Re: [CSGO] ArmsFix
Reply With Quote #36

Quote:
.
the extension + NomisCZ plugin works, but it changes arms models too when changing gloves on custom workshop maps only.
And witch plugin you are using for changing models/gloves?
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 12-03-2019 , 23:28   Re: [CSGO] ArmsFix
Reply With Quote #37

agents chooser and franugs gloves. i got random arms when i change the gloves on custom workshop maps, it works fine on standard game maps.
asdfxD is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-04-2019 , 07:02   Re: [CSGO] ArmsFix
Reply With Quote #38

You´re totally right , checked it with differant methods and as soon you choose one of the agentmodels gloves/arms get f......up
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:34.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode