This repository has been archived by the owner on Feb 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c73de6c
commit 01e0097
Showing
11 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?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>{A26FD78B-48F8-45C3-8C4C-B407805D5850}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>F.ExperienceUI</RootNamespace> | ||
<AssemblyName>F.ExperienceUI</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</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, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\Assembly-CSharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\Assembly-CSharp-firstpass.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Rocket.API, Version=2.6.4.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\Rocket.API.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Rocket.Core, Version=2.4.8.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\Rocket.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Rocket.Unturned, Version=4.9.3.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\Rocket.Unturned.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<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="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\UnityEngine.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>libs\UnityEngine.CoreModule.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Config.cs" /> | ||
<Compile Include="Main.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30011.22 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "F.ExperienceUI", "F.ExperienceUI.csproj", "{A26FD78B-48F8-45C3-8C4C-B407805D5850}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A26FD78B-48F8-45C3-8C4C-B407805D5850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A26FD78B-48F8-45C3-8C4C-B407805D5850}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A26FD78B-48F8-45C3-8C4C-B407805D5850}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A26FD78B-48F8-45C3-8C4C-B407805D5850}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {DDB59E8D-B4FF-40AE-ADD0-112EB7C3619F} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using Rocket.Core.Logging; | ||
using Rocket.Core.Plugins; | ||
using Rocket.Unturned; | ||
using Rocket.Unturned.Events; | ||
using Rocket.Unturned.Player; | ||
using SDG.Unturned; | ||
using System; | ||
|
||
namespace F.ExperienceUI | ||
{ | ||
public class Main : RocketPlugin<Config> | ||
{ | ||
public static Main Instance; | ||
|
||
protected override void Load() | ||
{ | ||
Main.Instance = this; | ||
|
||
|
||
Logger.Log("####################################################", ConsoleColor.Red); | ||
Logger.Log("# F.ExperienceUI Loaded #", ConsoleColor.Red); | ||
Logger.Log("# Plugin By: Feli #", ConsoleColor.Red); | ||
Logger.Log("# Discord Support:https://discord.gg/6zQVJ9p #", ConsoleColor.Red); | ||
Logger.Log("# Plugin Ver: 2.0.0 #", ConsoleColor.Red); | ||
Logger.Log("####################################################", ConsoleColor.Red); | ||
|
||
|
||
U.Events.OnPlayerConnected += Events_OnPlayerConnected; | ||
U.Events.OnPlayerDisconnected += Events_OnPlayerDisconnected; | ||
UnturnedPlayerEvents.OnPlayerUpdateExperience += Events_OnPlayerUpdateExperience; | ||
} | ||
|
||
private void Events_OnPlayerConnected(UnturnedPlayer player) | ||
{ | ||
EffectManager.sendUIEffect(this.Configuration.Instance.ExperienceUI, (short)32401, player.CSteamID, true, this.Configuration.Instance.EconomySymbol + player.Experience.ToString()); | ||
EffectManager.sendUIEffect(this.Configuration.Instance.ServerNameUI, (short)32403, player.CSteamID, true, this.Configuration.Instance.ServerName.ToString()); | ||
} | ||
|
||
private void Events_OnPlayerUpdateExperience(UnturnedPlayer player, uint experience) | ||
{ | ||
EffectManager.sendUIEffect(this.Configuration.Instance.ExperienceUI, (short)32401, player.CSteamID, true, this.Configuration.Instance.EconomySymbol + player.Experience.ToString()); | ||
} | ||
|
||
private void Events_OnPlayerDisconnected(UnturnedPlayer player) | ||
{ | ||
EffectManager.askEffectClearByID(this.Configuration.Instance.ExperienceUI, player.CSteamID); | ||
EffectManager.askEffectClearByID(this.Configuration.Instance.ServerNameUI, player.CSteamID); | ||
} | ||
|
||
protected override void Unload() | ||
{ | ||
U.Events.OnPlayerConnected -= Events_OnPlayerConnected; | ||
U.Events.OnPlayerDisconnected -= Events_OnPlayerDisconnected; | ||
UnturnedPlayerEvents.OnPlayerUpdateExperience -= Events_OnPlayerUpdateExperience; | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.