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

losowanie xp mod


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

#1 Kaska

    Życzliwy

  • Użytkownik

Reputacja: -1
Nowy

  • Postów:25
  • Steam:steam
  • Lokalizacja:KRK
Offline

Napisano 21.07.2010 11:44

Witam mogłby ktos mi przerobic zeby wyskakiwalo okienko na poczatku rundy:

Chcesz losować??
Tak
NIe


#include <amxmodx>
#include <cstrike>
#include <fakemeta_util> // wymagany modul

#define WAIT 0.1

new
 PLUG[] = "HNSExtras"
new VERS[] = "1.2"
new AUTH[] = "Stewie! Modifited by silversurfer"

new hnse_on;

new awp_on;
new fiveseven_on;
new deagle_on;
new scout_on;
new nade_on;
new tmp_on;
new m3_on;
new duals_on;
new m4_on;

public plugin_init()
{
    register_plugin(PLUG, VERS, AUTH);
    register_cvar("HNSExtras", VERS, FCVAR_SERVER|FCVAR_UNLOGGED);
    
    register_logevent("round_start", 2, "1=Round_Start");
    
    register_forward(FM_ClientKill, "client_kill")
    
    hnse_on = register_cvar("hnse_on", "1");
    
    awp_on = register_cvar("hnse_awp_on", "1", ADMIN_ADMIN);
    fiveseven_on = register_cvar("hnse_fiveseven_on", "1", ADMIN_ADMIN);
    deagle_on = register_cvar("hnse_deagle_on", "1", ADMIN_ADMIN);
    scout_on = register_cvar("hnse_scout_on", "1", ADMIN_ADMIN);
    nade_on = register_cvar("hnse_nade_on", "1", ADMIN_ADMIN);
    tmp_on = register_cvar("hnse_tmp_on", "1", ADMIN_ADMIN);
    m3_on = register_cvar("hnse_m3_on", "1", ADMIN_ADMIN);
    duals_on = register_cvar("hnse_duals_on", "1", ADMIN_ADMIN);
    m4_on = register_cvar("hnse_m4_on", "1", ADMIN_ADMIN);    
}

public round_start()
{
    set_task(WAIT, "strip");
}

public strip()
{
    if(get_pcvar_num(hnse_on))
    {
        new players[32], num;
        get_players(players, num, "ah");
        new player;
        for(new i = 0; i < num; i++)
        {
            player = players[i];
            
            
            cs_set_user_money(player, 0);
            fm_give_item(player, "weapon_knife");
        }
    }
    set_task(WAIT, "weapon_chance");
}

public weapon_chance()
{
    new Players[32], playerCount, i, id;
    get_players(Players, playerCount, "ah");
    for(i=0; i<playerCount; i++)
    {
        id = Players[i];
        
        new number = random_num(0, 100);
        
        switch(number)
        {
            case 1 .. 5:
            {
                if(get_pcvar_num(scout_on))
                {
                    new scout = fm_give_item(id, "weapon_scout");
                    cs_set_user_bpammo(id, CSW_SCOUT, 0);
                    cs_set_weapon_ammo(scout, 1);
                    client_print(id, print_chat, "[5%%] Twoja nagroda to scout z 1 nabojem!");
                }
            }
            case 6 .. 15:
            {
                if(get_pcvar_num(deagle_on))
                {
                    new deagle = fm_give_item(id, "weapon_deagle");
                    cs_set_user_bpammo(id, CSW_DEAGLE, 0);
                    cs_set_weapon_ammo(deagle, 2);
                    client_print(id, print_chat, "[10%%] Twoja nagroda to deagle z 2 nabojami!");
                }
            }
            case 16 .. 20:
            {
                if(get_pcvar_num(fiveseven_on))
                {
                    new fiveseven = fm_give_item(id, "weapon_fiveseven");
                    cs_set_user_bpammo(id, CSW_FIVESEVEN, 0);
                    cs_set_weapon_ammo(fiveseven, 3);
                    client_print(id, print_chat, "[5%%] Twoja nagroda to czterdziestkasiodemka z 3 nabojami!");
                }
            }
            case 21 .. 22:
            {
                if(get_pcvar_num(awp_on))
                {
                    new awp = fm_give_item(id, "weapon_awp");
                    cs_set_user_bpammo(id, CSW_AWP, 0);
                    cs_set_weapon_ammo(awp, 1);
                    client_print(id, print_chat, "[1%%] Twoja nagroda to awp z 1 nabojem!");
                }
            }
            case 23 .. 37:
            {   
                if(get_pcvar_num(nade_on))
                {   
                    new nade = fm_give_item(id, "weapon_hegrenade");
                    cs_set_user_bpammo(id, CSW_HEGRENADE, 0);
                    cs_set_weapon_ammo(nade, 1);
                    client_print(id, print_chat, "[15%%] Twoja nagroda to 1 granat HE!")
                }   
            }   
            case 38 .. 57:
            {   
                if(get_pcvar_num(tmp_on))
                {      
                    new nade = fm_give_item(id, "weapon_tmp");
                    cs_set_user_bpammo(id, CSW_TMP, 0);
                    cs_set_weapon_ammo(nade, 2);
                    client_print(id, print_chat, "[20%%] Twoja nagroda to Wiertara!")
                }       
            }   
            case 58 .. 66: 
            {
           if(get_pcvar_num(m3_on))
           {     
                 new nade = fm_give_item(id, "weapon_m3");
          cs_set_user_bpammo(id, CSW_M3, 0);
          cs_set_weapon_ammo(nade, 1);          
          client_print(id, print_chat, "[10%%] Twoja nagroda to Pompa!")
           }   
       }      
       case 67 .. 81:
       {   
                if(get_pcvar_num(duals_on))       
           {
               new nade = fm_give_item(id, "weapon_elite");  
               cs_set_user_bpammo(id, CSW_ELITE, 0);
          cs_set_weapon_ammo(nade, 5);
          client_print(id, print_chat, "[20%%] Twoja nagroda to Dualsy")
           }
            }  
       case 82 .. 91:
       {   
           if(get_pcvar_num(m4_on))
           {   
               new nade = fm_give_item(id, "weapon_m4a1");
          cs_set_user_bpammo(id, CSW_M4A1, 0);
          cs_set_weapon_ammo(nade, 1);
          client_print(id, print_chat, "[10%%] Twoja nagroda to M4")
           }
       }   
       case 92 .. 100:
            {
                client_print(id, print_chat, "Niestety...nic nie wygrales :(");
            }
        }
    }
}

public client_kill(id) // c*******.**
{
    if(is_user_alive(id))
    {
        console_print(id, "Nie mozesz sie teraz zabic!");
        
        return PLUGIN_HANDLED;
    }
    else
    {
        console_print(id, "Mozesz zabic sie tylko wtedy gdy jestes zywy!")
        
        return PLUGIN_HANDLED;
    }
    
    return PLUGIN_CONTINUE;
}

  • +
  • -
  • 0




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

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