Skip to content

Commit

Permalink
metin girin...
Browse files Browse the repository at this point in the history
  • Loading branch information
thecroshel authored Aug 31, 2024
1 parent 95e19d7 commit 1be5e23
Show file tree
Hide file tree
Showing 100 changed files with 34,678 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Config.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Exiled.API.Interfaces;

namespace FlashbangGun
{
public class FlashbangGunConfig : IConfig
{
public bool IsEnabled { get; set; } = true;

public bool Debug { get; set; } = false;
}
}
34 changes: 34 additions & 0 deletions EventHandlers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Exiled.API.Enums;
using Exiled.API.Features;
using Exiled.API.Features.Items;
using Exiled.Events.EventArgs;
using Exiled.Events.EventArgs.Player;
using PlayerRoles;
using UnityEngine;

namespace FlashbangGun
{
public class EventHandlers
{
private readonly FlashbangGun _plugin;

public EventHandlers(FlashbangGun plugin) => _plugin = plugin;

public void OnShooting(ShootingEventArgs ev)
{
// you can change weapon type from there
if (ev.Player.CurrentItem?.Type == ItemType.GunCom45)
{
ev.IsAllowed = false;

// you can change to frag grenade if you want
ev.Player.ThrowGrenade(ProjectileType.Flashbang);

if (_plugin.Config.Debug)
{
Log.Info($"{ev.Player.Nickname} this guy fired the flashbang gun.");
}
}
}
}
}
119 changes: 119 additions & 0 deletions Flashbang45.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{15B0B09C-DE11-490A-AB4B-E52B453931A7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Flashbang45</RootNamespace>
<AssemblyName>Flashbang45</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-Publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomRoles, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.CustomRoles.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Mirror">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Mirror.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=13.1.3.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Unity.ProBuilder.KdTree">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Unity.ProBuilder.KdTree.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextCoreFontEngineModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.TextCoreFontEngineModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextCoreTextEngineModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.TextCoreTextEngineModule.dll</HintPath>
</Reference>
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.8.9.11\lib\net48\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Flashbang45.cs" />
<Compile Include="Config.cs" />
<Compile Include="EventHandlers.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
35 changes: 35 additions & 0 deletions FlashbangGun.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Exiled.API.Features;
using System;
using Player = Exiled.Events.Handlers.Player;

namespace FlashbangGun
{
public class FlashbangGun : Plugin<FlashbangGunConfig>
{
public override string Name => "FlashbangGun";
public override string Author => "thecroshel";
public override string Prefix => "flashgun";
public override Version Version => new Version(1, 0, 0);
public override Version RequiredExiledVersion => new Version(8, 9, 11);

private EventHandlers _eventHandlers;

public override void OnEnabled()
{
if (!Config.IsEnabled) return;

_eventHandlers = new EventHandlers(this);
Player.Shooting += _eventHandlers.OnShooting;

base.OnEnabled();
}

public override void OnDisabled()
{
Player.Shooting -= _eventHandlers.OnShooting;

_eventHandlers = null;
base.OnDisabled();
}
}
}
36 changes: 36 additions & 0 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Bir bütünleştirilmiş koda ilişkin Genel Bilgiler aşağıdaki öznitelikler kümesiyle
// denetlenir. Bütünleştirilmiş kod ile ilişkili bilgileri değiştirmek için
// bu öznitelik değerlerini değiştirin.
[assembly: AssemblyTitle("Flashbang45")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Flashbang45")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// ComVisible özniteliğinin false olarak ayarlanması bu bütünleştirilmiş koddaki türleri
// COM bileşenleri için görünmez yapar. Bu bütünleştirilmiş koddaki bir türe
// erişmeniz gerekirse ComVisible özniteliğini o türde true olarak ayarlayın.
[assembly: ComVisible(false)]

// Bu proje COM'un kullanımına sunulursa, aşağıdaki GUID tür kitaplığının kimliği içindir
[assembly: Guid("15b0b09c-de11-490a-ab4b-e52b453931a7")]

// Bir derlemenin sürüm bilgileri aşağıdaki dört değerden oluşur:
//
// Ana Sürüm
// İkincil Sürüm
// Yapı Numarası
// Düzeltme
//
// Tüm değerleri belirtebilir veya varsayılan Derleme ve Düzeltme Numaralarını kullanmak için
// aşağıda gösterildiği gibi '*' kullanabilirsiniz:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file added bin/Debug/Assembly-CSharp-firstpass.dll
Binary file not shown.
Binary file added bin/Debug/Assembly-CSharp.dll
Binary file not shown.
Binary file added bin/Debug/BouncyCastle.Cryptography.dll
Binary file not shown.
Binary file added bin/Debug/Caress.dll
Binary file not shown.
Binary file added bin/Debug/CommandSystem.Core.dll
Binary file not shown.
Binary file added bin/Debug/Exiled.API.dll
Binary file not shown.
Loading

0 comments on commit 1be5e23

Please sign in to comment.