Название полученного оружия в чат!

Huslte[R]

Пользователь
Регистрация
10 Май 2018
Сообщения
2
Симпатии
0
Код:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

new weapons[24][] = {"weapon_usp","weapon_glock18","weapon_deagle","weapon_p228","weapon_elite","weapon_fiveseven",    "weapon_m3","weapon_xm1014","weapon_tmp","weapon_mac10","weapon_mp5navy","weapon_p90",
                "weapon_ump45","weapon_famas","weapon_galil",    "weapon_ak47","weapon_m4a1","weapon_sg552",    "weapon_aug",    "weapon_scout","weapon_sg550","weapon_awp","weapon_g3sg1","weapon_m249"}

public plugin_init()
{
    register_plugin("Random Weapon T", "1.0", "Noovey")

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

public evNewRound()
    set_task(0.01, "randPlayer")

public randPlayer()
{
    new players[32], count
    get_players(players, count, "ae", "TERRORIST")

    new player = players[random(count)]

    if(!player)
        return PLUGIN_HANDLED

    cs_set_weapon_ammo(give_item(player, weapons[random_num(0, 23)]), 1)

    return PLUGIN_HANDLED
}
 

Flymic24

Пользователь
Регистрация
15 Июн 2017
Сообщения
85
Симпатии
43
Пол
Мужской
Код:
cs_set_weapon_ammo(give_item(player, weapons[random_num(0, 23)]), 1)
-->
Код:
    new iWeapon = random_num(0, 23);
    
    cs_set_weapon_ammo(give_item(player, weapons[iWeapon]), 1);
    client_print(player, print_chat, "Вы получили оружие: %s", weapons[iWeapon]);
 
Сверху Снизу