Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
Add personal broadcast on tranquilizer pickup
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonWizard committed Mar 12, 2019
1 parent c93f652 commit 4f44c63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TranquilizerGun/TranqGunPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace TranquilizerGun
[PluginDetails(
author = "Spooky",
name = "TranquilizerGun",
description = "shoood people make em drop",
description = "Adds a tranquilizer gun with temporarily ragdolls players.",
id = "xyz.wizardlywonders.TranquilizerGun",
version = "1.0.0",
version = "1.0.1",
SmodMajor = 3,
SmodMinor = 3,
SmodRevision = 0
Expand Down
9 changes: 9 additions & 0 deletions TranquilizerGun/TranquilizerGun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ public class TranquilizerGun : CustomWeapon

public int damage => TranqGunPlugin.Damage;

public override bool OnPickup()
{
Player p = new SmodPlayer(base.PlayerObject);

p.PersonalBroadcast(3, "<color=#fff8>You have picked up a tranquilizer gun.</color>", false);

return base.OnPickup();
}

// TODO: Redirect any damage done to ragdoll to player, make invisible player unshootable
protected override void OnValidShoot(GameObject target, ref float damage)
{
Expand Down

0 comments on commit 4f44c63

Please sign in to comment.