Raised This Month: $226 Target: $400
 56% 

[CS:GO] Kill Streak Rewards


Post New Thread Reply   
 
Thread Tools Display Modes
Author
genuine
Junior Member
Join Date: Nov 2019
Plugin ID:
7630
Plugin Version:
1.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Give weapons/equipments as reward for kills.
    Old 05-04-2021 , 16:46   [CS:GO] Kill Streak Rewards
    Reply With Quote #1

    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
    __________________

    Last edited by genuine; 05-06-2021 at 01:19. Reason: prefix
    genuine is offline
    genuine
    Junior Member
    Join Date: Nov 2019
    Old 05-06-2021 , 01:21   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #2

    Updated plugin (update by Grey83)

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

    - Removed cvars, added config file.
    __________________
    genuine is offline
    Mac67
    New Member
    Join Date: May 2021
    Old 05-09-2021 , 11:37   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #3

    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 ?
    Mac67 is offline
    genuine
    Junior Member
    Join Date: Nov 2019
    Old 05-11-2021 , 05:26   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #4

    Quote:
    Originally Posted by Mac67 View Post
    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?
    __________________
    genuine is offline
    Mac67
    New Member
    Join Date: May 2021
    Old 05-11-2021 , 07:09   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #5

    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");

    Last edited by Mac67; 05-11-2021 at 10:08.
    Mac67 is offline
    genuine
    Junior Member
    Join Date: Nov 2019
    Old 05-11-2021 , 07:47   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #6

    Quote:
    Originally Posted by Mac67 View Post
    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
    __________________
    genuine is offline
    Mac67
    New Member
    Join Date: May 2021
    Old 05-11-2021 , 08:20   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #7

    OK Request is send
    Mac67 is offline
    genuine
    Junior Member
    Join Date: Nov 2019
    Old 05-12-2021 , 16:34   Re: [CS:GO] Kill Streak Rewards
    Reply With Quote #8

    Quote:
    Originally Posted by Mac67 View Post
    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
    __________________
    genuine is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 05:52.


    Powered by vBulletin®
    Copyright ©2000 - 2021, vBulletin Solutions, Inc.
    Theme made by Freecode