Skip to content

Commit

Permalink
Update to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
IL0co committed Mar 4, 2020
1 parent 9dca445 commit 93e003a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 51 deletions.
53 changes: 17 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@

<p align="center">
<img src="https://i.imgur.com/Iq20ugP.png" width="18%"/>
<img src="https://i.imgur.com/uvyFnPj.gif" width="50%"/>
<br/>
<h3 align="center">Shower modules</h3>
<p align="center">Affordable way to show hud to players.</p>
<h3 align="center">[FRS] Core</h3>
<p align="center">Synchronize the rank change!</p>
<h2></h2>
</p>
<br />

<p align="center">
<img src="https://img.shields.io/github/downloads/IL0co/Shower-modules/total?style=flat-square" /></a>
<a href="../../releases"><img src="https://img.shields.io/github/release/IL0co/Shower-modules?style=flat-square"/></a>
<a href="../../issues"><img src="https://img.shields.io/github/issues/IL0co/Shower-modules?style=flat-square" /></a>
<a href="../../pulls"><img src="https://img.shields.io/github/issues-pr/IL0co/Shower-modules?style=flat-square" /></a>
<img src="https://img.shields.io/github/downloads/IL0co/FRS-Core/total?style=flat-square" /></a>
<a href="../../releases"><img src="https://img.shields.io/github/release/IL0co/FRS-Core?style=flat-square"/></a>
<a href="../../issues"><img src="https://img.shields.io/github/issues/IL0co/FRS-Core?style=flat-square" /></a>
<a href="../../pulls"><img src="https://img.shields.io/github/issues-pr/IL0co/FRS-Core?style=flat-square" /></a>
</p>

## Supported games
* CS:GO
* CSS
* Other source games? Respond!
* only CS:GO

## Description
* Has a flexible adjustment of the position of the hud
* The core changer of ranks with different processing modes
<br>

This pack has 9 modules:
* 3 - for shop ([This module requires this core](https://hlmod.ru/resources/shop-core-fork.284/))
* 3 - for VIP ([This module requires this core](https://hlmod.ru/resources/vip-core.245/))
* 3 - independent


## Preview
The delays are reasoned by the fact that cs go cannot update all the icons in one tick (default for csgo)

<img src="https://i.imgur.com/OYx3ep3.gif" width="27%"> <img src="https://i.imgur.com/y3k0j6b.gif" width="27%">
<img src="https://i.imgur.com/jXnFN70.gif" width="27%">

<img src="https://i.imgur.com/YM3K7pX.gif" width="100%">

### An example of using all modules together:
<img src="https://i.imgur.com/ncDCIsV.gif" width="27%"> <img src="https://i.imgur.com/asqh8ee.gif" width="27%">
<img src="https://i.imgur.com/f0mtQfo.gif" width="27%">

# Installation

Expand All @@ -59,17 +49,11 @@ This pack has 9 modules:

## Configuration files

* **shop/shower_armor.cfg** - For plugin **shop_shower_armor**
* **shop/shower_damage.cfg** - For plugin **shop_shower_damage**
* **shop/shower_health.cfg** - For plugin **shop_shower_health**
* **cfg/sourcemod/FRS_Core.cfg**

+ **vip/shower_armor.cfg** - For plugin **vip_shower_armor**
+ **vip/shower_damage.cfg** - For plugin **vip_shower_damage**
+ **vip/shower_health.cfg** - For plugin **vip_shower_health**
## command

* **shower_armor.cfg** - For plugin **shower_armor**
* **shower_damage.cfg** - For plugin **shower_damage**
* **shower_health.cfg** - For plugin **shower_health**
+ **sm_frs_snapshot** - Create a snapshot of all ranks in the register and lock it to the log file

## Contributions
Contributions are always welcome!
Expand All @@ -79,11 +63,8 @@ Just make a [pull request](../../pulls).
* [Telegram](https://t.me/LocoCat)


# Plans
* Add modules to [<b>LR Core</b>](https://hlmod.ru/resources/levels-ranks-core.177/) core

# Changed Log
1.0
2.0
``` bash
1. Release
```
Binary file modified addons/sourcemod/plugins/FRS_Core.smx
Binary file not shown.
30 changes: 15 additions & 15 deletions addons/sourcemod/scripting/FRS_Core.sp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public Plugin myinfo =
{
name = "[FRS] Core",
version = "1.0.8.1",
version = "2.0",
description = "Sync all Fake Ranks",
author = "ღ λŌK0ЌЭŦ ღ ™",
url = "https://hlmod.ru/"
Expand Down Expand Up @@ -159,41 +159,41 @@ public void OnPlayerRunCmdPost(int client, int iButtons)

public void OnThinkPost(int iEnt)
{
// int id;
static int id;
for(int i = 1; i <= MaxClients; i++) if(IsClientInGame(i) && GetClientTeam(i) > 1)
{
// if((id = iRegisterValue[i][meTime[i]]) > 0)
if((id = iRegisterValue[i][meTime[i]]) > 0)
{
SetEntData(iEnt, m_iCompetitiveRanking + i*4, iRegisterValue[i][meTime[i]]);
SetEntData(iEnt, m_iCompetitiveRanking + i*4, id);
}
}

}

public Action TimeTimer(Handle timer)
{
int buffid[MAXPLAYERS+1];
for(int i = 1; i <= MaxClients; i++)
buffid[i] = meTime[i];
// int buffid[MAXPLAYERS+1];
// for(int i = 1; i <= MaxClients; i++)
// buffid[i] = meTime[i];

for(int i = 1; i <= MaxClients; i++) if(IsValidPlayer(i))
{
do
{
if(buffid[i]++ >= MaxRanks-1)
buffid[i] = 0;
if(meTime[i]++ >= MaxRanks-1)
meTime[i] = 0;

if(!iRegisterValue[i][buffid[i]])
if(!iRegisterValue[i][meTime[i]])
continue;

if(cType == 0)
break;
else if(cType == 1 && RegisterId[buffid[i]])
else if(cType == 1 && RegisterId[meTime[i]])
break;
}
while(buffid[i] < MaxRanks);
while(meTime[i] < MaxRanks);
}

meTime = buffid;
// meTime = buffid;

// PushToKv();
}
Expand Down Expand Up @@ -277,5 +277,5 @@ stock void PushToKv()

stock bool IsValidPlayer(int client)
{
return IsClientAuthorized(client) && IsClientInGame(client);
return IsClientAuthorized(client) && IsClientInGame(client) && IsClientConnected(client);
}

0 comments on commit 93e003a

Please sign in to comment.