-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec.sp
More file actions
93 lines (80 loc) · 1.99 KB
/
exec.sp
File metadata and controls
93 lines (80 loc) · 1.99 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <sourcemod>
public Plugin myinfo =
{
name = "exec",
author = "뿌까",
description = "하하하하",
version = "1.0",
url = "x"
};
public OnPluginStart()
{
RegConsoleCmd("sm_ugc", pug);
}
public OnConfigsExecuted()
{
SetConVarInt(FindConVar("sm_chat_mode"),0)
}
public Action:pug(client, args)
{
if(args != 1)
{
ReplyToCommand(client, "[SM]\x03!ugc 66 hl pro bball ulti 0");
return Plugin_Handled;
}
new String:arg[32];
GetCmdArg(1, arg, sizeof(arg));
SetConfig(client, arg);
return Plugin_Handled;
}
stock SetConfig(client, String:ugc[])
{
if(StrEqual(ugc, "hl"))
{
// SetConVarInt(FindConVar("sm_pug_hl"), 1);
// SetConVarInt(FindConVar("sm_pug_max"), 18);
if(IsCpMap()) ServerCommand("exec ugc_HL_standard");
else if(IsPlMap()) ServerCommand("exec ugc_HL_stopwatch");
else if(IsKothMap()) ServerCommand("exec ugc_HL_koth");
}
else if(StrEqual(ugc, "66"))
{
// SetConVarInt(FindConVar("sm_pug_hl"), 0);
// SetConVarInt(FindConVar("sm_pug_max"), 12);
if(IsKothMap()) ServerCommand("exec afckoth");
else ServerCommand("exec afcpush");
}
else if(StrEqual(ugc, "pro"))
{
ServerCommand("exec afcpush");
ServerCommand("exec prolander");
}
else if(StrEqual(ugc, "bball")) ServerCommand("exec bball");
else if(StrEqual(ugc, "ulti")) ServerCommand("exec tfcl_ulti");
else if(StrEqual(ugc, "0")) ServerCommand("exec ugc_off");
else PrintToChat(client, "\x07FFFFFF66, 99 둘 중 하나만 적어주세요");
}
stock bool:IsCpMap2()
{
decl String:strMap[64];
GetCurrentMap(strMap, sizeof(strMap));
return StrContains(strMap, "cp_", false) == 0;
}
stock bool:IsCpMap()
{
decl String:strMap[64];
GetCurrentMap(strMap, sizeof(strMap));
return StrContains(strMap, "cp_", false) == 0;
}
stock bool:IsPlMap()
{
decl String:strMap[64];
GetCurrentMap(strMap, sizeof(strMap));
return StrContains(strMap, "pl_", false) == 0;
}
stock bool:IsKothMap()
{
decl String:strMap[64];
GetCurrentMap(strMap, sizeof(strMap));
return StrContains(strMap, "koth_", false) == 0;
}