add a round check to the $ for first kills plugin

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

add a round check to the $ for first kills plugin

Мнение от USA_CA » 06 Авг 2020, 17:41

Hi, can I please make the plugin work with 3 rounds

the plugin gives the first 3 players money that they made at the beginning of the round.

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <cstrike>
#include <amxmisc>

#define PLUGIN "Killer Bonus"
#define VERSION "0.1"
#define AUTHOR "def4u1t"

const MIN_PLAYER = 8;

new killCount, bool:checkPl[33];

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event("DeathMsg", "death", "a", "1>0")
    new szMapName[32], i, szBadMaps[][] = {"35hp_", "1hp_", "awp_", "fy_", "aim_"}; get_mapname(szMapName, sizeof(szMapName));
    for(i = 0; i < sizeof(szBadMaps); i++) if(containi(szMapName, szBadMaps[i]) != -1) pause("ad");

    register_event("HLTV", "RoundNew", "a", "1=0", "2=0");
}

public RoundNew() {
    killCount = 0;
    for(new i; i < sizeof(checkPl); i++) checkPl[i] = false;
}

public death() {
    if(checkPl[read_data(1)] == true || killCount >= 3 || is_user_alive(read_data(2)) || read_data(2) == read_data(1)) return;
    new i_Killer = read_data(1)
    new Victim = read_data(2)
    killCount++;
    new k_name[32], v_name[32], money
    get_user_name(i_Killer,k_name,31)
    get_user_name(Victim,v_name,31)
	
    if(get_playersnum(.flag = 0) < MIN_PLAYER)
		return;

    switch(killCount) {
        case 1: {
            money = 1000;
            cs_set_user_money(i_Killer, cs_get_user_money(i_Killer) + money, 1);
            client_print_color(0, i_Killer, "^1[^4Kill^1] ^3%s^1 made^4 1st ^ 1 kill, killing ^3%n^1. Bonus: ^4%d$", k_name, Victim, money);
        }
        case 2: {
            money = 500;
            cs_set_user_money(i_Killer, cs_get_user_money(i_Killer) + money, 1);
            client_print_color(0, i_Killer, "^1[^4Kill^1] ^3%s^1 made^4 2st ^ 1 kill, killing ^3%n^1. Bonus: ^4%d$", k_name, Victim, money);
        }
        case 3: {
            money = 100;
	    checkPl[read_data(1)] = true
            cs_set_user_money(i_Killer, cs_get_user_money(i_Killer) + money, 1);
            client_print_color(0, i_Killer, "^1[^4Kill^1] ^3%s^1 made^4 3st ^ 1 kill, killing ^3%n^1. Bonus: ^4%d$", k_name, Victim, money);
        }
    }
}
Последно промяна от USA_CA на 06 Авг 2020, 23:19, променено общо 3 пъти.

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

getting started with the plugin

Мнение от OciXCrom » 06 Авг 2020, 20:14

What does that mean? It should work only in the first 3 rounds, after the first 3 rounds or on each 3rd round?

Also, what kind of title is that? Edit it and add proper information in it!

Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

getting started with the plugin

Мнение от USA_CA » 06 Авг 2020, 20:48

OciXCrom написа: 06 Авг 2020, 20:14 What does that mean? It should work only in the first 3 rounds, after the first 3 rounds or on each 3rd round?

Also, what kind of title is that? Edit it and add proper information in it!
after the first three rounds

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

getting started with the plugin

Мнение от OciXCrom » 06 Авг 2020, 21:59

Edit it and add proper information in it!

Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

getting started with the plugin

Мнение от USA_CA » 06 Авг 2020, 22:01

OciXCrom написа: 06 Авг 2020, 21:59
Edit it and add proper information in it!
corrected

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

getting started with the plugin

Мнение от OciXCrom » 06 Авг 2020, 23:15

There's nothing corrected. The title is the exact same.

Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

getting started with the plugin

Мнение от USA_CA » 07 Авг 2020, 19:51

OciXCrom написа: 06 Авг 2020, 23:15 There's nothing corrected. The title is the exact same.
fixed something like

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 8 госта