AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Kill Streak Rewards (https://forums.alliedmods.net/showthread.php?t=332305)

genuine 05-04-2021 16:46

[CS:GO] Kill Streak Rewards
 
Note: This is my first plugin so code might be a bit "dirty".

Description:

This plugin gives rewards aka weapons/equipments for kills. Any CS:GO guns, utilites, equipments can be given. I personally use it in my server for giving healthshot.

Config:

Code:

"Rewards"
{
        // Plugin mode:        0 - disabled, 1 - counts every kills including team kills, except suicide (for FFA),
        //                                                        2 - counts only enemy team kills
        "mode"        "2"

        // Kill counts and rewards for those kills
        "1"                "weapon_smokegrenade"
        "2"                "weapon_flashbang"
        "3"                "weapon_hegrenade"
}

List of gun/equipment names that you can put on ks_reward

Spoiler


Credits:

lugui - For helping on debug :)
Grey83 - big thanks for optimizing plugin and making it more usefull.


Github Repository

genuine 05-06-2021 01:21

Re: [CS:GO] Kill Streak Rewards
 
Updated plugin (update by Grey83)

- Now you can give multiple rewards for kills (step by step)

- Removed cvars, added config file.

Mac67 05-09-2021 11:37

Re: [CS:GO] Kill Streak Rewards
 
used you config for testing, but the message
[ks_reward.smx] [Kill Streak Rewards] Config 'addons\sourcemod\configs\ks_rewards.ini' is empty
occurs.
Any idea ?

genuine 05-11-2021 05:26

Re: [CS:GO] Kill Streak Rewards
 
Quote:

Originally Posted by Mac67 (Post 2746358)
used you config for testing, but the message
[ks_reward.smx] [Kill Streak Rewards] Config 'addons\sourcemod\configs\ks_rewards.ini' is empty
occurs.
Any idea ?

Did you add config file to server? And are you sure that it is not empty?

Mac67 05-11-2021 07:09

Re: [CS:GO] Kill Streak Rewards
 
Yes it is in the right place, otherwise an error would occur that the file is not found.
The file is not empty, but it looks like that GotoFirstSubKey does not find anything.
I tired to debug, but I have no clue why

Quote:

// mode - 0 - disabled, 1 - counts every kills including team kills, except suicide (for FFA), 2 - counts only enemy team kills
// Kill counts and rewards for those kills

"Rewards"
{
"mode" "2"

"1" "weapon_hegrenade"
"2" "weapon_molotov"
"3" "weapon_healthshot"

}
I also tried to modify the script, but also no success

Quote:

if (FileExists(buffer))
{
LogError("Error! configs/ks_rewards.ini not exists");
}
else
{
LogError("configs/ks_rewards.ini exists");
}

FileToKeyValues(kvRevards, buffer);

if(!kvRevards.GotoFirstSubKey()) LogError("[Kill Streak Rewards] Config is empty");

genuine 05-11-2021 07:47

Re: [CS:GO] Kill Streak Rewards
 
Quote:

Originally Posted by Mac67 (Post 2746521)
Yes it is in the right place, otherwise an error would occur that the file is not found.
The file is not empty, but it looks like that GotoFirstSubKey does not find anything.
I tired to debug, but I have no clue why



I also tried to modify the script, but also no success



BTW the num variable is not used

message me on discord please, it is on my signature

Mac67 05-11-2021 08:20

Re: [CS:GO] Kill Streak Rewards
 
OK Request is send

genuine 05-12-2021 16:34

Re: [CS:GO] Kill Streak Rewards
 
Quote:

Originally Posted by Mac67 (Post 2746358)
used you config for testing, but the message
[ks_reward.smx] [Kill Streak Rewards] Config 'addons\sourcemod\configs\ks_rewards.ini' is empty
occurs.
Any idea ?

this bug fixed, check github


All times are GMT -4. The time now is 09:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.