#include <sourcemod>
#define CTARMS "models/player/custom_player/sergeant_ct/skulltrooper_arms.mdl"
#define TTARMS "models/player/custom_player/sergeant_t/skulltrooper_arms.mdl"
public void OnPluginStart()
{
HookEvent("player_spawn", PlayerSpawn);
}
public OnMapStart()
{
PrecacheModel(CTARMS, true);
PrecacheModel(TTARMS, true);
}
public Action PlayerSpawn(Handle event, const char[] name, bool dbc)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if(client)
{
switch(GetClientTeam(client))
{
case 2: SetEntPropString(client, Prop_Send, "m_szArmsModel", TTARMS);
case 3: SetEntPropString(client, Prop_Send, "m_szArmsModel", CTARMS);
}
}
}