Skip to content

edgegamers/TTT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cs2TTT

Contributing

TTT is in heavy development and I want you to know that contributions are always welcome. Please follow Microsoft's dependency injection system.

Tip

Microsoft has some good documentation on dependency injection here: Overview, Using Dependency Injection, Dependency Injection Guidelines.

Creating items

Creating new items or modifying existing ones is easy. Create a new class in the correct directory, mod/TTT.Shop/Items/{group}. Then create it to your liking. Afterwards, compile the plugin and it's all set. The plugin handles loading all the items.

Tip

Available groups are [All, Detective, Traitor].
SimpleName is used for /buy {name}

Example Item

namespace TTT.Shop.Items.Traitor;

public class AwpItem : IShopItem
{
    public string Name()
    {
        return "AWP";
    }

    public string SimpleName()
    {
        return "awp";
    }

    public int Price()
    {
        return 2000;
    }

    public BuyResult OnBuy(GamePlayer player)
    {
        if (player.Credits() < Price()) return BuyResult.NotEnoughCredits;
        if (player.PlayerRole() != Role.Traitor) return BuyResult.IncorrectRole;
        player.RemoveCredits(Price());
        player.Player().GiveNamedItem(CsItem.AWP);
        return BuyResult.Successful;
    }
}

Road Map

  • [✅] Role assignment
  • [✅] DNA Scanner
  • [✅] Tazer
  • Configuration
  • Karma system
  • Shop
  • RDM Manager
  • Add database support for logs and stats

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages