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

[CSGO] ArmsFix


Post New Thread Reply   
 
Thread Tools Display Modes
rustaveli
Member
Join Date: Mar 2011
Old 12-02-2019 , 08: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 , 16: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 17:12.
andi67 is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 12-03-2019 , 00: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 00:57.
asdfxD is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-03-2019 , 04: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: 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
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-03-2019 , 14: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 , 22: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 , 06: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
FuHua
Member
Join Date: Nov 2019
Location: 天穹市
Old 01-04-2020 , 23:44   Re: [CSGO] ArmsFix
Reply With Quote #39

I created armsfix. Autoload, but it still hasn't been loaded. Why? ... thank you very much
FuHua is offline
FuHua
Member
Join Date: Nov 2019
Location: 天穹市
Old 01-04-2020 , 23:49   Re: [CSGO] ArmsFix
Reply With Quote #40

] sm exts list
[SM] Displaying 13 extensions:
[01] Automatic Updater (1.10.0.6459): Updates SourceMod gamedata files
[02] Webternet (1.10.0.6459): Extension for interacting with URLs
[03] <FAILED> file "ArmsFix.ext.2.csgo.dll": Plugin requires newer Metamod version (16 > 15)
[04] CS Tools (1.10.0.6459): CS extended functionality
[05] BinTools (1.10.0.6459): Low-level C/C++ Calling API
[06] SDK Tools (1.10.0.6459): Source SDK Tools
[07] Top Menus (1.10.0.6459): Creates sorted nested menus
[08] Client Preferences (1.10.0.6459): Saves client preference settings
[09] SQLite (1.10.0.6459): SQLite Driver
[10] GeoIP (1.10.0.6459): Geographical IP information
[11] SDK Hooks (1.10.0.6459): Source SDK Hooks
[12] Regex (1.10.0.6459): Provides regex natives for plugins
[13] <OPTIONAL> file "store_sm.ext.dll": *********Ҳ***************************ָ******* *****************************ģ*********顣

What do you mean by plugin requires new metamod Version (16 > 15)?
FuHua 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 14:45.


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