blob: b290d8f19b7867aeb203226e3963458160358ef7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
Hides weapon view model.
*/
// =====[ EVENTS ]=====
void OnPlayerSpawn_HideWeapon(int client)
{
UpdateHideWeapon(client);
}
void OnOptionChanged_HideWeapon(int client, HUDOption option)
{
if (option == HUDOption_ShowWeapon)
{
UpdateHideWeapon(client);
}
}
// =====[ PRIVATE ]=====
static void UpdateHideWeapon(int client)
{
SetEntProp(client, Prop_Send, "m_bDrawViewmodel",
GOKZ_HUD_GetOption(client, HUDOption_ShowWeapon) == ShowWeapon_Enabled);
}
|