Skip to content

Releases: partiusfabaa/cs2-VIPCore

v1.1.8

03 Feb 14:13
Compare
Choose a tag to compare
  1. Fixed css_vip_updatetime time update
  2. A port was added to the configuration (To avoid errors. Add the port as shown in the screenshot below)
  3. Now if a player is not on the server, you can still add him by SteamId64 or SteamId2
  4. Fixed an error when logging out of the server

image

v1.1.7

28 Jan 09:46
Compare
Choose a tag to compare

For correct operation, please update all modules.

  1. Function registration has been redesigned a bit
  2. The writing of modules has been slightly improved.

If you write modules like this, you no longer need to write _api. or _vip. only the Name of the function, and no need to pass the Feature anywhere else. You specify it 1 time at the beginning of the class.

The most important thing if you will update VIPCore update all modules!

Module example:

using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using Modularity;
using VipCoreApi;

namespace VIP_KillScreen;

public class VipKillScreen : BasePlugin, IModulePlugin
{
    public override string ModuleAuthor => "thesamefabius";
    public override string ModuleName => "[VIP] Kill Screen";
    public override string ModuleVersion => "v1.0.1";

    private KillScreen _killScreen;
    private IVipCoreApi _api = null!;
    
    public void LoadModule(IApiProvider provider)
    {
        _api = provider.Get<IVipCoreApi>();
        _killScreen = new KillScreen(this, _api);
        _api.RegisterFeature(_killScreen);
    }

    public override void Unload(bool hotReload)
    {
        _api.UnRegisterFeature(_killScreen);
    }
}

public class KillScreen : VipFeatureBase
{
    public override string Feature => "Killscreen";
    
    public KillScreen(VipKillScreen vipKillScreen, IVipCoreApi api) : base(api)
    {
        vipKillScreen.RegisterEventHandler<EventPlayerDeath>((@event, info) =>
        {
            var attacker = @event.Attacker;
            if (!attacker.IsValid) return HookResult.Continue;

            if (attacker == @event.Userid) return HookResult.Continue;

            if (!IsClientVip(attacker)) return HookResult.Continue;
            if (!PlayerHasFeature(attacker)) return HookResult.Continue;
            if (GetPlayerFeatureState(attacker) is not IVipCoreApi.FeatureState.Enabled) return HookResult.Continue;
            if(!GetFeatureValue<bool>(attacker)) return HookResult.Continue;
            
            var attackerPawn = attacker.PlayerPawn.Value;
            
            if (attackerPawn == null) return HookResult.Continue;
            
            attackerPawn.HealthShotBoostExpirationTime = Server.CurrentTime + 1.0f;
            Utilities.SetStateChanged(attackerPawn, "CCSPlayerPawn", "m_flHealthShotBoostExpirationTime");

            return HookResult.Continue;
        });
    }
}

v1.1.6

14 Jan 15:15
Compare
Choose a tag to compare

Added a command to update from the website - css_reload_vip_player <steamid>

Now if you add a vip via WEB panel, you can immediately update the player via rcon

v1.1.5

06 Jan 02:56
Compare
Choose a tag to compare

Added 2 new events to the api:

  1. PlayerLoaded // Triggered when a VIP Player is authorized
  2. PlayerRemoved // Triggered when the VIP Player is removed

v1.1.4

30 Dec 10:20
Compare
Choose a tag to compare

Fixed PlayerHasFeature method

v1.1.3

28 Dec 17:37
Compare
Choose a tag to compare

1. Bug fixes

2. Recompiled to CSSharp v142

v1.1.2

27 Dec 21:40
93fa7b0
Compare
Choose a tag to compare

Fixed user deletions

v1.1.1

27 Dec 21:24
Compare
Choose a tag to compare
  1. Fixed minor bugs
  2. Added multi-server.
    image

v1.1.0

24 Dec 18:24
Compare
Choose a tag to compare

1. Now the database connection is in vip_core.json. Cut it out of vip.json and paste it into vip_core.json as in the screenshot

image

2. Now you can use the name of the group here in your translations

image

{0} - the name of your group

{1} - time until the end of the VIP term

but you can also use plain text in place of {0}, such as VIP.

Please replace these 2 lines in your translations. Take them from the lang.example folder

v1.0.9

24 Dec 09:39
Compare
Choose a tag to compare
  1. Now you can add a player with steamid 64.
  2. Now players receive VIP immediately without the need to re-enter the server.