Skip to content

Commit a1cb6a0

Browse files
authored
Update HitmanCommands.pwn (#807)
1 parent 4c8ed3c commit a1cb6a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pawn/Features/Deathmatch/Hitman/HitmanCommands.pwn

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,16 @@ class HitmanCommands {
5252
@command("hitman")
5353
public onHitmanCommand(playerId, params[]) {
5454
new bountyAmount = Command->integerParameter(params, 1);
55-
if (Command->parameterCount(params) != 2 || bountyAmount < 1) {
55+
if (Command->parameterCount(params) != 2) {
5656
SendClientMessage(playerId, Color::Information, "Usage: /hitman [player] [amount]");
5757
return 1;
5858
}
5959

60+
if (bountyAmount <= 0) {
61+
SendClientMessage(playerId, Color::Error, "Bounty can't be zero or a negative integer");
62+
return 1;
63+
}
64+
6065
new victimId = Command->playerParameter(params, 0, playerId);
6166
if (victimId == Player::InvalidId)
6267
return 1;

0 commit comments

Comments
 (0)