-
Notifications
You must be signed in to change notification settings - Fork 15
/
readyup_test.sp
56 lines (48 loc) · 2.05 KB
/
readyup_test.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
/*
SourcePawn is Copyright (C) 2006-2008 AlliedModders LLC. All rights reserved.
SourceMod is Copyright (C) 2006-2008 AlliedModders LLC. All rights reserved.
Pawn and SMALL are Copyright (C) 1997-2008 ITB CompuPhase.
Source is Copyright (C) Valve Corporation.
All trademarks are property of their respective owners.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <sourcemod>
#include <readyup>
public OnPluginStart()
{
RegAdminCmd("sm_rdy_addstring", AddString_Cmd, ADMFLAG_BAN);
RegAdminCmd("sm_rdy_isinready", IsInReady_Cmd, ADMFLAG_BAN);
RegAdminCmd("sm_rdy_isclientcaster", IsClientCaster_Cmd, ADMFLAG_BAN);
}
public Action:AddString_Cmd(client, args)
{
decl String:buffer[65];
GetCmdArg(1, buffer, sizeof(buffer));
PrintToChat(client, "native bool:AddStringToReadyFooter(%s) = %s", buffer, AddStringToReadyFooter(buffer) ? "true" : "false");
}
public Action:IsInReady_Cmd(client, args)
{
PrintToChat(client, "native bool:IsInready() = %s", IsInReady() ? "true" : "false");
}
public Action:IsClientCaster_Cmd(client, args)
{
decl String:buffer[65];
GetCmdArg(1, buffer, sizeof(buffer));
new target = FindTarget(client, buffer, false, false);
GetClientAuthString(target, buffer, sizeof(buffer));
PrintToChat(client, "native bool:IsClientCaster(%N) = %s", target, IsClientCaster(target) ? "true" : "false");
PrintToChat(client, "native bool:IsBufferCaster(%s) = %s", buffer, IsIDCaster(buffer) ? "true" : "false");
}
public OnRoundIsLive()
{
PrintToChatAll("foward OnRoundIsLive()");
}