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
 

Chrupek235 - zdjęcie

Chrupek235

Rejestracja: 28.06.2014
Aktualnie: Nieaktywny
Poza forum Ostatnio: 01.11.2020 21:56
-----

Moje tematy

Problem z pluginem ut_pl

19.10.2020 10:16

Witam. Mam problem z pluginem ut_pl (Polski KillStreak 1.6 !B! !E! !T! !A!)

 

Mianowicie chodzi o to, że te dźwięki generowane z pluginu słychać u innych graczy. Przykładowo, gram w CT i jestem na gali na DD2, a terrorysta jest w dolnym i zabija CT w głowę, to słychać wtedy dźwięk jakby model postaci mówił. Słychać "O kurw*, jaki dupszot". Zdradza to pozycję wroga. Tak samo gdy ktoś zostaje sam na x wrogów. Słychać wydawany przez plugin dźwięk i wtedy mniej więcej wiadomo, gdzie jest gracz. W pluginie chodzi o to by każdy gracz z osobna słyszał te dźwięki, ale nie, żeby było je słychać jakby mówił to model gracza.

 

/* AMXMODX Plugin

Polski KillStreak 1.6 !B! !E! !T! !A!
Wersja polska (polskie dzwieki i napisy) oraz wszelkie modyfikacje by Sn!ff3r
Oryginalnie by Dizzy - http://forums.alliedmods.net/showthread.php?p=67632

---

Mini Opis:
Kazdy chyba zna dzwieki HeadShot, MultiKill (Ultimate Sounds) itd? To jest wlasnie taki plugin tylko dzwieki oraz teksty po polsku.
Dodatkowo zmodyfikowany, np. 3 rozne dzwieki na headshot.
*/

#include <amxmodx>

#define KNIFFMESSAGES 4
#define LEVELS 7
#define MESSAGESNOHP 4
#define MESSAGESHP 4

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[7] = {3, 5, 7, 9, 10, 13, 15};

new stksounds[7][] = {
"misc/utma/multikill",
"misc/utma/ultrakill",
"misc/utma/monsterkill",
"misc/utma/killingspree",
"misc/utma/rampage",
"misc/utma/holyshit",
"misc/utma/godlike"};

new stkmessages[7][] = {
"%s: O S T R O ! ! !",
"%s: W Y P I E R D A L A C ! ! !",
"%s: M O N S T E R K O L O ! ! !",
"%s: W S C I E K L S I E ! ! !",
"%s: R Z A D Z I S Z ! ! !",
"%s: R O B I W R A Z E N I E ! ! !",
"%s: P R Z E Z N A C Z E N I E ! ! !"};


new kniffmessages[KNIFFMESSAGES][] = {
"%s pokroil na plasterki %s!",
"%s odcial jaja %s!",
"%s przetestowal noz na %s!",
"%s dziabnal %s!"}

new messagesnohp[MESSAGESNOHP][] = {
"%i terrorystow vs %i CT^n%s: Wszystko zalezy od Ciebie!",
"%i terrorystow vs %i CT^n%s: Mam nadzieje ze masz apteczke?",
"%i terrorystow vs %i CT^n%s: Zostales sam. Dobrej zabawy!",
"%i terrorystow vs %i CT^n%s: Tylko Ty jestes zywy!"}

new messageshp[MESSAGESHP][] = {
"%i terrorystow vs %i CT^n%s (%i hp): Wszystko zalezy od Ciebie!",
"%i terrorystow vs %i CT^n%s (%i hp): Mam nadzieje ze masz apteczke?",
"%i terrorystow vs %i CT^n%s (%i hp): Zostales sam. Dobrej zabawy!",
"%i terrorystow vs %i CT^n%s (%i hp): Tylko Ty jestes zywy!"}

get_streak()
{
    new streak[3]
    get_cvar_string("streak_mode",streak,2)
    return read_flags(streak)
}

public death_event(id)
{
    new streak = get_streak()

    if ((streak&1) || (streak&2))
    {
        new killer = read_data(1);
        new victim = read_data(2);

        kills[killer] += 1;
        kills[victim] = 0;
        deaths[killer] = 0;
        deaths[victim] += 1;

        for (new i = 0; i < LEVELS; i++)
        {
        if (kills[killer] == levels[i])
            {
              announce(killer, i);
              return PLUGIN_CONTINUE;
            }
        }
    }
    return PLUGIN_CONTINUE;
}

announce(killer, level)
{
    new streak = get_streak()

    if (streak&1)
    {
        new name[32];

        get_user_name(killer, name, 32);
        set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
        show_hudmessage(0, stkmessages[level], name);
    }

    if (streak&2){
        client_cmd(0, "spk %s", stksounds[level]);
    }
}

public reset_hud(id)
{
    new streak = get_streak()

    if (streak&1)
    {

        if (kills[id] > levels[0])
        {
         client_print(id, print_chat,
            "* Twoj killstreak wynosi %d zabojstw.", kills[id]);

        }

        else if (deaths[id] > 1)
        {
            client_print(id, print_chat,
            "* Twoj deathstreak wynosi %d smierci.", deaths[id]);
        }
    }
}

public client_connect(id)
{
    new streak = get_streak()

    if ((streak&1) || (streak&2))
    {
        kills[id] = 0;
        deaths[id] = 0;
    }
}

public knife_kill()
{
    new kniffmode[4]
    get_cvar_string("kniff_mode",kniffmode,4)
    new kniffmode_bit = read_flags(kniffmode)

    if (kniffmode_bit & 1)
    {
        new killer_id = read_data(1)
        new victim_id = read_data(2)
        new killer_name[33], victim_name[33]

        get_user_name(killer_id,killer_name,33)
        get_user_name(victim_id,victim_name,33)


        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
        show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name)
    }

    if (kniffmode_bit & 2)
    {
        client_cmd(0,"spk misc/utma/humiliation")
    }
}


public roundend_msg(id)

    alone_ann = 0

public death_msg(id)
{

    new lmmode[8]
    get_cvar_string("lastman_mode",lmmode,8)
    new lmmode_bit = read_flags(lmmode)

    new players_ct[32], players_t[32], ict, ite, last
    get_players(players_ct,ict,"ae","CT")
    get_players(players_t,ite,"ae","TERRORIST")

    if (ict==1&&ite==1)
    {
        new name1[32], name2[32]
        get_user_name(players_ct[0],name1,32)
        get_user_name(players_t[0],name2,32)
        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

        if (lmmode_bit & 1)
        {
            if (lmmode_bit & 2)
            {
                show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
            }

            else
            {
                show_hudmessage(0,"%s vs. %s",name1,name2)
            }

            if (lmmode_bit & 4)
            {
                client_cmd(0,"spk misc/utma/maytheforce")
            }
        }
    }
    else
{
    if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
    {
        last=players_ct[0]
        client_cmd(last,"spk misc/utma/oneandonly")
    }

    else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
    {
        last=players_t[0]
        client_cmd(last,"spk misc/utma/oneandonly")
    }

    else
    {
        return PLUGIN_CONTINUE
    }
    alone_ann = last
    new name[32]
    get_user_name(last,name,32)

    if (lmmode_bit & 1)
    {
        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

        if (lmmode_bit & 2)
        {
            show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
        }

        else
        {
            show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
        }
    }

    if (lmmode_bit & 4)
    {
        client_cmd(last,"spk misc/utma/maytheforce")
    }
}
    return PLUGIN_CONTINUE 
}


public hs()
{
new hsmode[4]
get_cvar_string("hs_mode",hsmode,4)
new hsmode_bit = read_flags(hsmode)
new rand = random_num(0,2)

if (hsmode_bit & 1)
{
new killer_id = read_data(1)
new victim_id = read_data(2)
new victim_name[33]
get_user_name(victim_id,victim_name,33)

set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)

switch(rand)
{
case 0: show_hudmessage(killer_id,"L E B S Z O T !^n Pwn3d %s !!",victim_name)
case 1: show_hudmessage(killer_id,"D U P S Z O T !^n Zownowales %s !!",victim_name)
case 2: show_hudmessage(killer_id,"H E A D S H O T !^n %s poszedl sie pier**lic!!",victim_name)
}

}

if (hsmode_bit & 2)
{

switch(rand)
{
case 0: client_cmd(0,"spk misc/utma/headshot")
case 1: client_cmd(0,"spk misc/utma/dupszot")
case 2: client_cmd(0,"spk misc/utma/pier**l")
}

}
}

public plugin_precache()
{
precache_sound("misc/utma/monsterkill.mp3")
precache_sound("misc/utma/godlike.mp3")
precache_sound("misc/utma/headshot.mp3")
precache_sound("misc/utma/humiliation.mp3")
precache_sound("misc/utma/killingspree.mp3")
precache_sound("misc/utma/multikill.mp3")
precache_sound("misc/uutma/ultrakill.mp3")
precache_sound("misc/utma/maytheforce.mp3")
precache_sound("misc/utma/oneandonly.mp3")
precache_sound("misc/utma/prepare.mp3")
precache_sound("misc/utma/rampage.mp3")
precache_sound("misc/utma/holyshit.mp3")
precache_sound("misc/utma/dupszot.mp3")
precache_sound("misc/utma/pier**l.mp3")

return PLUGIN_CONTINUE
}


public plugin_init()
{
    register_plugin("Polski KillStreak","1.6","Dizzy & Sn!ff3r")
    register_event("DeathMsg","hs","a","3=1")
    register_event("DeathMsg","knife_kill","a","4&kni")
    register_event("ResetHUD", "reset_hud", "b");
    register_event("DeathMsg", "death_event", "a")
    register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
    register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")
    register_event("DeathMsg","death_msg","a")
    register_cvar("lastman_mode","abc")
    register_cvar("streak_mode","ab")
    register_cvar("kniff_mode","ab")
    register_cvar("hs_mode","ab")
    register_cvar("polish_killstreak", "1.6", FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)

    return PLUGIN_CONTINUE
}

[ROZWIĄZANE] Problem ze spadochronem

29.09.2020 19:34

Witam. Mam problem ze spadochronem. Chodzi o to, że chciałbym go trochę zmienić. Mianowicie chodzi o to, że gdy gracz go używa to nie widać modelu rozkładającego się spadochronu. Nie wiem jak zmienić to w .sma.
 

#include <amxmodx>
#include <fakemeta>
#include <engine>

new bool:has_parachute[33]
new para_ent[33]
new pDetach, pFallSpeed, pEnabled

public plugin_precache()
   precache_model("models/parachute.mdl")

public plugin_init()
{
    register_plugin("Parachute", "1.3", "KRoT@L/JTP10181") // edited by ^^KaMaZZ~.^
    pEnabled = register_cvar("sv_parachute", "1" )
    pFallSpeed = register_cvar("parachute_fallspeed", "100")
    pDetach = register_cvar("parachute_detach", "1")
    
    register_event("ResetHUD", "newSpawn", "be")
    register_event("DeathMsg", "death_event", "a")
    
    //Setup jtp10181 CVAR
    new cvarString[256], shortName[16]
    copy(shortName,15,"chute")
    
    register_cvar("jtp10181","",FCVAR_SERVER|FCVAR_SPONLY)
    get_cvar_string("jtp10181",cvarString,255)
    
    if (strlen(cvarString) == 0)
    {
        formatex(cvarString,255,shortName)
        set_cvar_string("jtp10181",cvarString)
    }
    else if (contain(cvarString,shortName) == -1) {
        format(cvarString,255,"%s,%s",cvarString, shortName)
        set_cvar_string("jtp10181",cvarString)
    }
}

public client_connect(id)
  parachute_reset(id)

public client_disconnect(id)
  parachute_reset(id)
 
public newSpawn(id)
{
    if(para_ent[id] > 0)
    {
        remove_entity(para_ent[id])
        fm_set_user_gravity(id, 1.0)
        para_ent[id] = 0
    }
    has_parachute[id] = true;
}
 
public death_event()
{
    new id = read_data(2)
    parachute_reset(id)
}

parachute_reset(id)
{
    if(para_ent[id] > 0)
    {
        if (is_valid_ent(para_ent[id]))
          remove_entity(para_ent[id])
    }
    
    if (is_user_alive(id))
      fm_set_user_gravity(id, 1.0)
    
    has_parachute[id] = false
    para_ent[id] = 0
}

public client_PreThink(id)
{
    if (!get_pcvar_num(pEnabled)) return
    if (!is_user_alive(id) || !has_parachute[id]) return
    
    new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0
    new Float:frame
    
    new button = get_user_button(id)
    new oldbutton = get_user_oldbutton(id)
    new flags = get_entity_flags(id)
    
    if (para_ent[id] > 0 && (flags & FL_ONGROUND))
    {
        if (get_pcvar_num(pDetach))
        {    
            if (fm_get_user_gravity(id) == 0.1) fm_set_user_gravity(id, 1.0)
            
            if (entity_get_int(para_ent[id],EV_INT_sequence) != 2)
            {
                entity_set_int(para_ent[id], EV_INT_sequence, 2)
                entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
                entity_set_float(para_ent[id], EV_FL_frame, 0.0)
                entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
                entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
                entity_set_float(para_ent[id], EV_FL_framerate, 0.0)
                return
            }
            
            frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0
            entity_set_float(para_ent[id],EV_FL_fuser1,frame)
            entity_set_float(para_ent[id],EV_FL_frame,frame)
            
            if (frame > 254.0)
            {
                remove_entity(para_ent[id])
                para_ent[id] = 0
            }
        }
        else
        {
            remove_entity(para_ent[id])
            fm_set_user_gravity(id, 1.0)
            para_ent[id] = 0
        }
        return
    }
    if (button & IN_USE)
    {
        new Float:velocity[3]
        entity_get_vector(id, EV_VEC_velocity, velocity)
        
        if (velocity[2] < 0.0)
        {    
            if(para_ent[id] <= 0)
            {
                para_ent[id] = create_entity("info_target")
                if(para_ent[id] > 0)
                {
                    entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
                    entity_set_edict(para_ent[id], EV_ENT_aiment, id)
                    entity_set_edict(para_ent[id], EV_ENT_owner, id)
                    entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)
                    entity_set_model(para_ent[id], "models/parachute.mdl")
                    entity_set_int(para_ent[id], EV_INT_sequence, 0)
                    entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
                    entity_set_float(para_ent[id], EV_FL_frame, 0.0)
                    entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
                }
            }
            if (para_ent[id] > 0)
            {
                entity_set_int(id, EV_INT_sequence, 3)
                entity_set_int(id, EV_INT_gaitsequence, 1)
                entity_set_float(id, EV_FL_frame, 1.0)
                entity_set_float(id, EV_FL_framerate, 1.0)
                fm_set_user_gravity(id, 0.1)
                
                velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
                entity_set_vector(id, EV_VEC_velocity, velocity)
                
                if (entity_get_int(para_ent[id],EV_INT_sequence) == 0)
                {    
                    frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0
                    entity_set_float(para_ent[id],EV_FL_fuser1,frame)
                    entity_set_float(para_ent[id],EV_FL_frame,frame)
                    
                    if (frame > 100.0)
                    {
                        entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
                        entity_set_float(para_ent[id], EV_FL_framerate, 0.4)
                        entity_set_int(para_ent[id], EV_INT_sequence, 1)
                        entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
                        entity_set_float(para_ent[id], EV_FL_frame, 0.0)
                        entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
                    }
                }
            }
        }
        else if (para_ent[id] > 0)
        {
            remove_entity(para_ent[id])
            fm_set_user_gravity(id, 1.0)
            para_ent[id] = 0
        }
    }
    else if ((oldbutton & IN_USE) && para_ent[id] > 0 )
    {
        remove_entity(para_ent[id])
        fm_set_user_gravity(id, 1.0)
        para_ent[id] = 0
    }
}


stock Float:fm_get_user_gravity(index)
{
    new Float:gravity;
    pev(index, pev_gravity, gravity);
    
    return gravity;
}

stock fm_set_user_gravity(index, Float:gravity = 1.0)
{
    set_pev(index, pev_gravity, gravity);
    
    return 1;
}

Wyłączenie toggle_adminlisten

09.07.2020 22:35

Witam. Potrzebuję wyłączyć/usunąć z pluginu toggle_adminlisten, nie chcę by admini mogli słyszeć wszystkich graczy podczas gdy żyją, a nie mam na to wpływu, ktos może tego nadużywać.
 

Spoiler

task_complete.amxx dodanie dzwieku przy zminimalizowanym CS

05.07.2020 22:58

Witam. Tak jak w temacie. Niestety nie wiem jak dodać do pluginu taką możliwość, że gdy CS jest zminimalizowany to dźwięk jest odtwarzany. By ludzie którzy coś przeglądają coś na forum, czy jakieś media społecznościowe wiedzieli kiedy zaczyna się runda. (Dodam, że nie korzystam z RoundSoundów i nie chcę korzystać). Dzięki za pomoc!

 

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Task Complete"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)    
    register_message(get_user_msgid("SendAudio"),"task_complete")
}

public task_complete()
{
    static dummy[33]
    get_msg_arg_string(2, dummy, 32)        
    if(contain(dummy,"win") != -1)
    {
        set_msg_arg_string(2, "events/task_complete.wav")
    }
}

Plugin VIP nie wyświetla modelu VIP'a dla TT

28.06.2020 01:45

Witam. Mam problem. Wygenerowałem sobie VIP'a w generatorze AMXX, tam też go skompilowałem. Dodałem sobie w tym pluginie VIP aby gracz z daną flagą posiadał model VIP'a. Dla CT działa i model VIP'a się wyświetla, lecz dla TT nie widać tego modelu, po prostu jest jakby nie widzialny. Nie wiem co z tym zrobić. Dodam, że próbowałem kompilować plugin lokalnie i wyskakują błędy

 

Problemy po kompilacji lokalnej:

 

error 025: function heading differs from prototype

error 088: number of arguments does not match definition

 

W załączniku plik VIP'a .sma. Z góry dziękuję za pomoc!