Quote:
Originally Posted by hlstriker
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
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(iClient, SDKHook_SpawnPost, OnSpawnPost);
}
public OnSpawnPost(iClient)
{
if(IsClientObserver(iClient) || !IsPlayerAlive(iClient))
return;
SetEntityModel(iClient, PLAYER_MODEL_DEFAULT);
SetEntPropString(iClient, Prop_Send, "m_szArmsModel", ARMS_MODEL);
CreateTimer(0.1, Timer_CustomModel, GetClientSerial(iClient));
}
public Action:Timer_CustomModel(Handle:hTimer, any:iClientSerial)
{
new iClient = GetClientFromSerial(iClientSerial);
if(!iClient)
return;
SetEntityModel(iClient, PLAYER_MODEL_CUSTOM);
}