Skip to content
Permalink
Browse files
Update HitmanCommands.pwn (#807)
  • Loading branch information
FreakinsPL committed Aug 4, 2020
1 parent 4c8ed3c commit a1cb6a083e4119d7781bdf9e5743ff1394bd705e
Showing 1 changed file with 6 additions and 1 deletion.
@@ -52,11 +52,16 @@ class HitmanCommands {
@command("hitman")
public onHitmanCommand(playerId, params[]) {
new bountyAmount = Command->integerParameter(params, 1);
if (Command->parameterCount(params) != 2 || bountyAmount < 1) {
if (Command->parameterCount(params) != 2) {
SendClientMessage(playerId, Color::Information, "Usage: /hitman [player] [amount]");
return 1;
}

if (bountyAmount <= 0) {
SendClientMessage(playerId, Color::Error, "Bounty can't be zero or a negative integer");
return 1;
}

new victimId = Command->playerParameter(params, 0, playerId);
if (victimId == Player::InvalidId)
return 1;

0 comments on commit a1cb6a0

Please sign in to comment.