Skip to content

Commit e6f86e5

Browse files
committed
fix thinking error
1 parent 5d1bfb6 commit e6f86e5

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

CustomCommands/Commands.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
"sv_cheats 1",
2828
"sv_falldamage_scale 0",
2929
"sv_party_mode 1",
30-
"mp_freezetime 2.5",
31-
"mp_round_restart_delay 2.5",
30+
"mp_freezetime 1",
31+
"mp_round_restart_delay 2",
3232
"cl_ragdoll_gravity 0",
3333
"sv_accelerate 10",
3434
"sv_airaccelerate 1400",
35-
"sv_gravity 800.0"
35+
"sv_gravity 800.0",
36+
"say hello"
3637
],
3738
"Permission": {
3839
"ReguiresAllPermissions": false,

CustomCommands/Functions.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ private void RegisterListeners()
2727

2828
});
2929
}
30+
3031
private void AddCommands(Commands com)
3132
{
3233
string[] aliases = com.Command.Split(',');
@@ -47,20 +48,21 @@ private void AddCommands(Commands com)
4748

4849
private bool RequiresPermissions(CCSPlayerController player, PermissionsElement permissions)
4950
{
50-
if (!permissions.ReguiresAllPermissions)
51+
if (permissions.ReguiresAllPermissions)
5152
{
5253
foreach (var permission in permissions.PermissionList)
5354
{
54-
if (AdminManager.PlayerHasPermissions(player, new string[]{permission})) return true;
55+
if (AdminManager.PlayerHasPermissions(player, new string[]{permission}))
56+
return true;
5557
}
56-
PrintToChat(Receiver.Client, player, "You don't have the required permissions to execute this command");
58+
PrintToChat(Receiver.Client, player, "You don't have the required permissions to execute this command1");
5759
return false;
5860
}
5961
else
6062
{
6163
if (!AdminManager.PlayerHasPermissions(player, permissions.PermissionList.ToArray()))
6264
{
63-
PrintToChat(Receiver.Client, player, "You don't have the required permissions to execute this command");
65+
PrintToChat(Receiver.Client, player, "You don't have the required permissions to execute this command2");
6466
return false;
6567
}
6668
return true;

0 commit comments

Comments
 (0)