Skip to content

Commit 556fcb6

Browse files
authored
Merge pull request #137 from MrDave1999/feat/GeneralCommands
feat: Add VIP commands
2 parents d912641 + 7ba5904 commit 556fcb6

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
namespace CTF.Application.Players.GeneralCommands;
2+
3+
public class VipCommands : ISystem
4+
{
5+
[PlayerCommand("saw")]
6+
public void Saw(Player player)
7+
{
8+
if (player.HasLowerRoleThan(RoleId.VIP))
9+
return;
10+
11+
player.GiveWeapon(Weapon.Chainsaw, 1);
12+
}
13+
14+
[PlayerCommand("spray")]
15+
public void Spray(Player player)
16+
{
17+
if (player.HasLowerRoleThan(RoleId.VIP))
18+
return;
19+
20+
player.GiveWeapon(Weapon.Spraycan, IWeapon.UnlimitedAmmo);
21+
}
22+
23+
[PlayerCommand("teargas")]
24+
public void Teargas(Player player)
25+
{
26+
if (player.HasLowerRoleThan(RoleId.VIP))
27+
return;
28+
29+
player.GiveWeapon(Weapon.Teargas, IWeapon.UnlimitedAmmo);
30+
}
31+
}

src/Application/Usings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
global using CTF.Application.Players;
2323
global using CTF.Application.Players.Accounts;
2424
global using CTF.Application.Players.Accounts.Services;
25+
global using CTF.Application.Players.Weapons;
2526
global using CTF.Application.Players.Ranks;
2627
global using CTF.Application.Players.Combos;
2728
global using CTF.Application.Players.Combos.Services;

0 commit comments

Comments
 (0)