-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaaaa2.sp
38 lines (33 loc) · 821 Bytes
/
aaaa2.sp
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
31
32
33
34
35
36
37
38
#include <sourcemod>
#include <console>
public void OnPluginStart()
{
PrintToServer("test");
}
public Action OnClientSayCommand(int client, const char[] command, const char[] argText)
{
// == 0 means the string starts with these
if
(
StrContains(argText, "!fov") == 0
||
StrContains(argText, "/fov") == 0
)
{
char strfov[512];
strcopy(strfov, sizeof(strfov), argText);
ReplaceString(strfov, sizeof(strfov), "!fov ", "");
ReplaceString(strfov, sizeof(strfov), "/fov ", "");
PrintToServer("strfov %s",strfov);
int ifov = StringToInt(strfov);
SetFov(client, ifov);
PrintToServer("ifov %i",ifov);
}
return Plugin_Continue;
}
void SetFov(int client, int ifov)
{
PrintToServer("test");
SetEntProp(client, Prop_Send, "m_iFOV", ifov);
SetEntProp(client, Prop_Send, "m_iDefaultFOV", ifov);
}