Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Miczu pomoz !!


  • Zamknięty Temat jest zamknięty
Brak odpowiedzi do tego tematu

#1 Kr!S

    Nowy

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:2
Offline

Napisano 16.04.2008 15:40

Mam problem z pluginem weapon chance raczej tak sie zwie ! A wiec potrzebuje by w nim zmienic ilosc nabi ktore sa juz zaladowane nie w magazynku !!
scout_ammo = register_cvar("WC_762nato_ammo", "2")
tam gdzie pisze 2 to sie zmiania ilosc naboi w magazynku a ja potrzebuje zminic ilosc naboi juz zaladowanych !!

TU PODAM CALY KOD
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta_util>

#define TASK_TIME 10.0

new SayText
new awp_ammo, fiveseven_ammo, deagle_ammo, scout_ammo, shotgun_ammo, ammo_shotgun

public plugin_init()
{
    register_plugin("Weapon chance", "1.0", "none")
   
    register_logevent("round_start", 2, "1=Round_Start")   
    awp_ammo = register_cvar("WC_awp_ammo", "2")
   
    fiveseven_ammo = register_cvar("WC_fiveseven_ammo", "2")
    deagle_ammo = register_cvar("WC_50ae_ammo", "1")
   
    scout_ammo = register_cvar("WC_762nato_ammo", "2")
    shotgun_ammo = register_cvar("WC_buckshot_ammo", "0")
   
    ammo_shotgun = register_cvar("WC_m3_ammo", "1")
}

public round_start()
{
    set_task(TASK_TIME, "give_stuff")
}

public give_stuff()
{
    new players[32], num
    get_players(players, num, "ah")
   
    new player, ammo, text[100]
   
    for(new i = 0; i < num; i++)
    {
        player = players[i]
        fm_strip_user_weapons(player)
       
        if(cs_get_user_team(2))
        {
            fm_give_item(player, "weapon_knife")
        }
       
        if(random_num(0, 100) <= 1)
        {
            ammo = get_pcvar_num(awp_ammo)
            fm_give_item(player, "weapon_awp")
           
            cs_set_user_bpammo (player, 18, ammo)
           
            format(text,99,"You got an awp with %d bullet(1 % chance)", ammo)       
           
            green_print(player, text)
        }
       
        if(random_num(0, 100) <= 10)
        {
            ammo = get_pcvar_num(fiveseven_ammo)
            fm_give_item(player, "weapon_fiveseven")
           
            cs_set_user_bpammo (player, CSW_FIVESEVEN, ammo)
            format(text,99,"You got a fiveseven with %d bullets(10 % chance)", ammo)
            green_print(player, text)
        }
       
        if(random_num(0, 100) <= 1)
        {
            ammo = 20
            fm_give_item(player, "weapon_fiveseven")
           
            cs_set_user_bpammo (player, CSW_FIVESEVEN, ammo)
            format(text,99,"You got a fiveseven with %d bullets(1 % chance)", ammo)
            green_print(player,text)
        }
       
        if(random_num(0, 100) <= 10)
        {
            ammo = get_pcvar_num(deagle_ammo)
            fm_give_item(player, "weapon_deagle")
           
            cs_set_user_bpammo (player, CSW_DEAGLE, ammo)
            format(text,99,"You got an eagle with %d bullet(10 % chance)", ammo)
            green_print(player, text)
        }
       
        if(random_num(0, 100) <= 25)
        {
            ammo = get_pcvar_num(scout_ammo)
            fm_give_item(player, "weapon_scout")           
            cs_set_user_bpammo(player, CSW_SCOUT, ammo)
            green_print(player, "You got a scout to run faster(20 % chance")
        }
       
        if(random_num(0, 100) <= 10)
        {
            ammo = get_pcvar_num(shotgun_ammo)
            fm_give_item(player, "weapon_xm1014")           
            cs_set_user_bpammo (player, CSW_XM1014, ammo)
            format(text,99,"You got a shotgun with %d shot(10 % chance)", ammo)
            green_print(player, text)
        }
       
        if(random_num(0, 100) <= 7)
        {
            ammo = get_pcvar_num(ammo_shotgun)
            fm_give_item(player, "weapon_m3")
           
            cs_set_user_bpammo (player, CSW_XM1014, ammo)
            format(text,99,"You got a m3 with %d shot(7 % chance)", ammo)
            green_print(player, text)
        }
       
        if(random_num(0, 100) <= 33)
        {
            fm_give_item(player, "weapon_hegrenade")
            green_print(player, "You got a HE(33 % chance)")
        }
       
        if(random_num(0, 100) <= 5)
        {
            fm_set_user_health(player, 200)
            green_print(player, "You got 200 HP(5 % chance)")
        }
       
        if(random_num(0, 100) <= 15)
        {
            fm_set_user_health(player, 150)
            green_print(player, "You got 150 HP(15 % chance)")
        }
       
        if(random_num(0, 10) <= 10)
        {
            fm_give_item(player, "item_assaultsuit")
            green_print(player, "You got a kevlar and a helmet (10 % chance)")
        }
    }
}

stock get_weapon_id(id, const weapon[])
{
    new ent = -1
   
    while((ent = fm_find_ent_by_class(ent, weapon)) != 0)
    {
        if(id == fm_entity_get_edict(ent, EV_ENT_owner))
            return ent
    }
    return 0
}

stock green_print(index, const message[])
{
    new finalmsg[192];
    formatex(finalmsg, 191, "^x04%s", message);
    message_begin(MSG_ONE, SayText, _, index);
    write_byte(index);
    write_string(finalmsg);
    message_end();
}

  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych