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
 

FetaGreen - zdjęcie

FetaGreen

Rejestracja: 15.11.2010
Aktualnie: Nieaktywny
Poza forum Ostatnio: 06.08.2023 21:28
-----

#432876 Shop by waqu

Napisane przez FetaGreen w 16.07.2012 15:53

http://amxx.pl/topic...-pluginow-amxx/
  • +
  • -
  • 1


#377468 [HNS EasyBlock] Nowe funkcje na prośbę

Napisane przez FetaGreen w 08.03.2012 22:38

[PROŚBA] Zrobił byś poradnik jak dodać rendering do BCM taki jak w BM starym?
Chodzi mi o taki:
(Menu)
1. Type: Normal/Add etc.
2. Type FX: GLOW, FAST xxx etc.
3. Kolor
4. Kolor
5. Kolor
6. ilość
8. Pobierz rendering (pobiera rendering z danego blocka)
9. Ustaw rendering (po uzyciu nadaje rendering na dany block)
I jeszcze jedno jak dodać menu do bcm na jakimś przykładzie (nawet na renderingu)
Jeśli byś mógł bo wiem że wiele ludzi ma z tym problem, chyba że tego za free nie zrobisz :)
  • +
  • -
  • 1


#361649 Miotacz Ognia

Napisane przez FetaGreen w 10.02.2012 13:22

Wpisz w konsoli:

ft_give aQua

  • +
  • -
  • 1


#361178 Problem z copliliowanem pliku .sma

Napisane przez FetaGreen w 09.02.2012 17:07

A tutaj masz kod SKOMPILOWANY - http://amxx.pl/kompi...ss_amadeusz.sma
  • +
  • -
  • 1


#361031 [ROZWIĄZANE] Brak komend Rcona

Napisane przez FetaGreen w 09.02.2012 12:50

amx_rcon komenda
(ja tak używam i dziala np.)

amx_rcon mp_roundtime 9
  • +
  • -
  • 1


#361008 Quiz - DiabloMod !

Napisane przez FetaGreen w 09.02.2012 11:48

-Pijesz?
-Nie
-Palisz?
-Nie?
-A może sma?
  • +
  • -
  • -1


#360506 [ROZWIĄZANE] Nie mogę skompilowac pluginu....

Napisane przez FetaGreen w 08.02.2012 13:38

Znajdź:

ShowChoiceMenu(id, choice, const title[96])
{
    new menu[128];
    
    g_choice_option[id] = choice;
    
    format(menu, charsmax(menu), g_choice_menu, title);
    
    show_menu(id, g_keys_choice_menu, menu, -1, "


ChoiceMenu");
}
 

oraz zamień na:

ShowChoiceMenu(id, choice, const title[96])
{
    new menu[128];
    
    g_choice_option[id] = choice;
    
    format(menu, charsmax(menu), g_choice_menu, title);
    
    show_menu(id, g_keys_choice_menu, menu, -1, "ChoiceMenu");
}
 

  • +
  • -
  • 1


#360488 Szukam pluginu który odradza gracza. Na CODa.

Napisane przez FetaGreen w 08.02.2012 13:13

Sprawdź:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>

new Float:g_spawn_vec[60][3];
new Float:g_spawn_angle[60][3];
new Float:g_spawn_v_angle[60][3];

new bool:g_first_spawn[33];

new g_total_spawn = 0;

public plugin_init() {
    register_plugin("Respawn", "0.1", "FetaGreen");
    
    register_event("DeathMsg", "event_Death", "a");
    
    csdm_respawn();
}

public event_death_msg(){
    new ofiara = read_data(2);
        
    if(!is_user_alive(ofiara)){
        set_task(3.0, "cmdRespawn", ofiara);
    }
}

public cmdRespawn(ofiara){
        ExecuteHamB(Ham_CS_RoundRespawn, ofiara);
}

csdm_respawn(){   
    new map[32], config[32],  mapfile[64];
    
    get_mapname(map, 31);
    get_configsdir(config, 31);
    format(mapfile, 63, "%s\csdm\%s.spawns.cfg", config, map);
    g_total_spawn = 0;
    
    if (file_exists(mapfile)) {
        new new_data[124], len;
        new line = 0;
        new pos[12][8];
        
        while(g_total_spawn < 60 && (line = read_file(mapfile , line , new_data , 123 , len) ) != 0 ) {
            if (strlen(new_data)<2 || new_data[0] == '[')
                continue;
            
            parse(new_data, pos[1], 7, pos[2], 7, pos[3], 7, pos[4], 7, pos[5], 7, pos[6], 7, pos[7], 7, pos[8], 7, pos[9], 7, pos[10], 7);
            
            g_spawn_vec[g_total_spawn][0] = str_to_float(pos[1]);
            g_spawn_vec[g_total_spawn][1] = str_to_float(pos[2]);
            g_spawn_vec[g_total_spawn][2] = str_to_float(pos[3]);
            
            g_spawn_angle[g_total_spawn][0] = str_to_float(pos[4]);
            g_spawn_angle[g_total_spawn][1] = str_to_float(pos[5]);
            g_spawn_angle[g_total_spawn][2] = str_to_float(pos[6]);
            
            g_spawn_v_angle[g_total_spawn][0] = str_to_float(pos[8]);
            g_spawn_v_angle[g_total_spawn][1] = str_to_float(pos[9]);
            g_spawn_v_angle[g_total_spawn][2] = str_to_float(pos[10]);
            
            g_total_spawn++;
        }
        
        if (g_total_spawn >= 2)
            RegisterHam(Ham_Spawn, "player", "csdm_player_spawn", 1);
    }
    return 1;
}

public csdm_player_spawn(id){
    if (!is_user_alive(id) || get_user_team(id) == 2)
        return;
    
    if (g_first_spawn[id]){
        g_first_spawn[id] = false;
        return;
    }
    
    new list[60];
    new num = 0;
    new final = -1;
    new total=0;
    new players[32], n, x = 0;
    new Float:loc[32][3], locnum;
    
    get_players(players, num);
    
    for (new i=0; i<num; i++){
        if (is_user_alive(players[i]) && players[i] != id){
            pev(players[i], pev_origin, loc[locnum]);
            locnum++;
        }
    }
    
    num = 0;
    
    while (num <= g_total_spawn){
        if (num == g_total_spawn)
            break;
        n = random_num(0, g_total_spawn-1);
        if (!list[n]){
            list[n] = 1;
            num++;
        }
        else {
            total++;
            if (total > 100)
                break;
            continue;
        }
        
        if (locnum < 1){
            final = n;
            break;
        }
        
        final = n;
        for (x = 0; x < locnum; x++){
            new Float:distance = get_distance_f(g_spawn_vec[n], loc[x]);
            if (distance < 250.0){
                final = -1;
                break;
            }
        }
        if (final != -1)
            break;
    }
    if (final != -1){
        new Float:mins[3], Float:maxs[3];
        pev(id, pev_mins, mins);
        pev(id, pev_maxs, maxs);
        engfunc(EngFunc_SetSize, id, mins, maxs);
        engfunc(EngFunc_SetOrigin, id, g_spawn_vec[final]);
        set_pev(id, pev_fixangle, 1);
        set_pev(id, pev_angles, g_spawn_angle[final]);
        set_pev(id, pev_v_angle, g_spawn_v_angle[final]);
        set_pev(id, pev_fixangle, 1);
    }
}  



  • +
  • -
  • 1


#360468 poszukuje pluginu ktory ustawia interp i sprawdza co runde

Napisane przez FetaGreen w 08.02.2012 12:18

Łapaj:

http://amxx.pl/topic/779-ex-interp/
http://amxx.pl/topic...-ex-interp-005/
http://amxx.pl/topic...erp-changer-14/
http://amxx.pl/topic...interp-manager/
http://amxx.pl/topic...2-menu-interpu/
http://amxx.pl/topic...rate-oraz-rate/
Strażnik ex_interp - AMXX.pl: Support AMX Mod X
http://amxx.pl/topic...-wybor-interpu/
http://amxx.pl/topic...ie-interpu-001/
http://amxx.pl/topic...rzadca-interpu/

+ ten plugin też posiada tą opcje:

http://amxx.pl/topic...server-manager/
  • +
  • -
  • 1


#360216 errory w logach - spawn protection

Napisane przez FetaGreen w 07.02.2012 20:30

public protect(id)
{
   new Float:SPTime = get_cvar_float("sv_sptime")
   new SPSecs = get_cvar_num("sv_sptime")
   new FTime = get_cvar_num("mp_freezetime")
   new SPShell = get_cvar_num("sv_spshellthick")
   set_user_godmode(id, 1)

   if(get_user_team(id) == 1)
   {
	  set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, SPShell)
   }

   if(get_user_team(id) == 2)
   {
	  set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, SPShell)
   }

   if(get_cvar_num("sv_spmessage") == 1)
   {
	  set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, SPTime+FTime, 0.1, 0.2, 4)
	  show_hudmessage(id, "Ochrona na poczatku rundy trwa %d sekund(y)", SPSecs)
   }

   set_task(SPTime+FTime, "sp_off", id)
   return PLUGIN_HANDLED
}

zamień na:

public protect(id){
   if(!is_user_connected(id) && !is_user_alive(id)) return PLUGIN_HANDLED;

   new Float:SPTime = get_cvar_float("sv_sptime")
   new SPSecs = get_cvar_num("sv_sptime")
   new FTime = get_cvar_num("mp_freezetime")
   new SPShell = get_cvar_num("sv_spshellthick")
   set_user_godmode(id, 1)

   if(get_user_team(id) == 1)
   {
	  set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, SPShell)
   }

   if(get_user_team(id) == 2)
   {
	  set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, SPShell)
   }

   if(get_cvar_num("sv_spmessage") == 1)
   {
	  set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, SPTime+FTime, 0.1, 0.2, 4)
	  show_hudmessage(id, "Ochrona na poczatku rundy trwa %d sekund(y)", SPSecs)
   }

   set_task(SPTime+FTime, "sp_off", id)
   return PLUGIN_HANDLED
}

Powinno dzialać
  • +
  • -
  • 1


#359996 Error logi: get_pcvar_num

Napisane przez FetaGreen w 07.02.2012 14:46

Dopisz debug po pluginie i zapodaj logi.
  • +
  • -
  • 1


#359963 [ROZWIĄZANE] Muzyka dla danej drużyny

Napisane przez FetaGreen w 07.02.2012 13:47

Sprawdź:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <colorchat>

new bool:block[33];

public plugin_precache(){
    precache_sound("test/test1.mp3");
    precache_sound("test/test2.mp3");
}

public plugin_init() {
    register_plugin("Pierwszy plug", "0.1", "MA1L0");
    
    register_clcmd("say /menu", "menu");
    
    register_logevent("runda",2,"1=Round_Start");
    
    register_event("HLTV", "NewRound", "a", "1=0", "2=0");
}

public client_connect(id)
    block[id] = false;

public menu(id){
    new menu = menu_create("\rMenu gry","sterowanie");
    
    menu_additem(menu,"\ntest1","1",0);
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id,menu,0);
}
public sterowanie(id, menu, item){
    if(item == MENU_EXIT){
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }  
    new data[6], iName[64];
    new acces, callback;
    menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback);
    new key = str_to_num(data);
    switch(key){
        case 1:{
            if(block[id])
                ColorChat(id, GREEN,"[Info]^x01 ?!");

            else{
                give_item(id, "weapon_ak47");
                set_user_health(id, 255);
                set_user_armor(id, 200);
                client_cmd(0, "spk sound/items/ammopickup1.wav");
                ColorChat(id, GREEN,"[Info]^x01 ?!");
                block[id] = true;
            }
            
        }  
        
    }
    return PLUGIN_CONTINUE;
}

public runda(id){
    new iPlayers[32], iNum;
    get_players(iPlayers, iNum);
    
    for(new g = 0; g < iNum ; g++){
    new id = iPlayers[g];
        
    if(get_user_team(id) == 2)
        client_cmd(id, "mp3 play sound/test/test1.mp3")
    else if(get_user_team(id) == 1)
        client_cmd(id, "mp3 play sound/test/test2.mp3")
}
}

public NewRound(id)
    block[id] = false

  • +
  • -
  • 1


#359932 [ROZWIĄZANE] Przerobienie Ruletki

Napisane przez FetaGreen w 07.02.2012 12:43

Sma:
Spoiler


amxx - http://amxx.pl/kompi...me=ruletka3.sma
  • +
  • -
  • 1


#359925 [ROZWIĄZANE] Pobieranie czasu rundy

Napisane przez FetaGreen w 07.02.2012 12:23

by R3X

Half-Life 1 Game Events - AlliedModders Wiki


register_event("RoundTime", "eventRoundTime", "b");

public eventRoundTime(id){

}


Wysyłane jest osobno do każdego raz (a nie co sekundę) i nie masz pewności, że to początek rundy.

Musisz użyć set_task(1.0, ...) z flagą "b", na początku zapisywać w zmiennej globalnej czas, coś takiego (nie testowałem)


#define TASKID 146

new gRoundStart;

public plugin_init(){
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
}
public eventStartRound(){
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}
public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
new iRoundTime = get_systime() - gRoundStart;
//iRoundTime - tyle sekund minęło od początku rundy
}


by diablix


#include <amxmodx>

#define VERSION "0.1"

public plugin_init(){
register_plugin("Czas Rundy", VERSION, "diablix");
register_event("RoundTime", "eventRoundTime", "bc");
}

public eventRoundTime(){
new iTimer = read_data(1), iNum;
new iPlayers[32];
new Float:flCvarTime = (get_cvar_float("mp_roundtime") * 60.0);

set_hudmessage(100, 72, 12, 0.01, 0.16, 0, 0.1, 0.1, 0.1, 0.1, 3);
get_players(iPlayers, iNum);

for(new i = 0 ; i < iNum ; i ++)
ShowSyncHudMsg(i, CreateHudSyncObj(), "Czas do końca rundy: %d", floatround(flCvarTime - iTimer));
}

  • +
  • -
  • 1


#359636 [Gun Xp Mod 2.0] Jak dodać nowy item do sklepu.

Napisane przez FetaGreen w 06.02.2012 19:01

Witajcie.
W tym poradniku pokaże wam jak dodać nowy item do sklepu chodzi o ten plugin: http://amxx.pl/topic...-zapis-na-nick/ .
A więc zaczynajmy.

Glowna budowa pluginu wygląda tak:

#include <amxmodx>
#include <gunxpmod>

new PLUGIN_NAME[] = "Unlock : Item"
new PLUGIN_AUTHOR[] = "author"
new PLUGIN_VERSION[] = "1.0"

public plugin_init(){
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_gxm_item("Item", "Co daje item", koszt)
}

public gxm_item_enabled(id)


Teraz zrobimy poradnik jak dodać item np. więcej życia.

A więc tworzymy nowy plugin wpisując calą taką treść:

#include <amxmodx>
#include <gunxpmod>

new PLUGIN_NAME[] = "Unlock : +80 HP"
new PLUGIN_AUTHOR[] = "FetaGreen"
new PLUGIN_VERSION[] = "1.0"

public plugin_init(){
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
}

public gxm_item_enabled(id)


Potem w plugin init pod register_plugin dodajemy tą linijke:

register_gxm_item("Zycie", "Dodaje 80 HP",  50)

Zycie - Item
Dodaje 80 HP - Opis itemu
50 - Cena itemu (Liczone w XP)

Szukamy linijki:

public gxm_item_enabled(id)

I zamieniamy ją na tą:

public gxm_item_enabled(id) {
	set_user_health(id, get_user_health(id) + 80);
	client_print(id, 2, "Wlasnie zakupiles 80HP za 50XP");
}

W linijce ustawiania hp:

set_user_health - Ustawianie HP
get_user_health - Pobieranie HP
+ 80 - Ile HP chcemy dodać

W linijce wyświetlania wiadomości:

client_print - Drukowanie wiadomości
id - gracz
2 - rodzaj tekstu (print,console,center). 2 oznacza print_center
"Wlasnie zakupiles 80HP za 50XP" - Tekst wyświetlanej sie wiadomości

I to taki latwy item ktory polega na dokupieniu HP (80 życia)

Poradnik napisany w 100% przez FetaGreen.
Poradnik napisalem na odpracowanie warna.
Dlaczego taki? No bo nie ma żadnego tutoriala do tego pluginu/modu.
  • +
  • -
  • 5