forked from bklol/Misc-Plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restrict_nau.sp
78 lines (69 loc) · 2.06 KB
/
restrict_nau.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <sourcemod>
#include <sdktools>
int nau = -1;
public void OnPluginStart()
{
AddCommandListener(OnBhopCommand, "sm_zones");
AddCommandListener(OnBhopCommand, "sm_deletemap");
AddCommandListener(OnBhopCommand, "sm_wipeplayer");
AddCommandListener(OnBhopCommand, "sm_finishtest");
AddCommandListener(OnBhopCommand, "sm_whitelist");
AddCommandListener(OnBhopCommand, "sm_blacklist");
AddCommandListener(OnBhopCommand, "sm_deletereplay");
AddCommandListener(OnBhopCommand, "sm_setmaptier");
AddCommandListener(OnBhopCommand, "sm_settier");
AddCommandListener(OnBhopCommand, "sm_delete");
AddCommandListener(OnBhopCommand, "sm_deleterecord");
AddCommandListener(OnBhopCommand, "sm_deleterecords");
AddCommandListener(OnBhopCommand, "sm_deleteall");
AddCommandListener(OnBhopCommand, "sm_deletestylerecords");
AddCommandListener(OnBhopCommand, "sm_mapzones");
AddCommandListener(OnBhopCommand, "sm_deletezone");
AddCommandListener(OnBhopCommand, "sm_deleteallzones");
AddCommandListener(OnBhopCommand, "sm_zoneedit");
AddCommandListener(OnBhopCommand, "sm_editzone");
AddCommandListener(OnBhopCommand, "sm_modifyzone");
AddCommandListener(OnBhopCommand, "sm_inactivate");
AddCommandListener(OnBhopCommand, "sm_banhammer");
CreateTimer(15.0, Timer_CheckNau, _, TIMER_FLAG_NO_MAPCHANGE);
}
public Action Timer_CheckNau(Handle timer)
{
if(nau != -1)
{
char name[64];
GetClientName(nau, name, 64);
if(!StrEqual(name, "sG |"))
{
KickClient(nau, "tags");
}
}
return Plugin_Continue;
}
public void OnClientPutInServer(int client)
{
char auth[32];
GetClientAuthId(client, AuthId_Steam3, auth, sizeof(auth));
if(StrEqual(auth, "[U:1:36661343]"))
{
nau = client;
}
}
public void OnClientDisconnect(int client)
{
if(client == nau)
{
nau = -1;
}
}
public Action OnBhopCommand(int client, const char[] command, int argc)
{
char auth[32];
GetClientAuthId(client, AuthId_Steam3, auth, sizeof(auth));
if(StrEqual(auth, "[U:1:36661343]"))
{
PrintToChat(client, "[SM] You do not have access to this command.");
return Plugin_Stop;
}
return Plugin_Continue;
}